Fix downloading and sharing from a playlist. Fix #2123
This commit is contained in:
@@ -84,9 +84,8 @@ const ContextMenu = ({
|
||||
enabled: config.enableSharing,
|
||||
needData: false,
|
||||
label: translate('ra.action.share'),
|
||||
action: (record) => {
|
||||
dispatch(openShareMenu([record.id], resource, record.name))
|
||||
},
|
||||
action: (record) =>
|
||||
dispatch(openShareMenu([record.id], resource, record.name)),
|
||||
},
|
||||
download: {
|
||||
enabled: config.enableDownloads && record.size,
|
||||
|
||||
@@ -67,16 +67,16 @@ export const SongContextMenu = ({
|
||||
share: {
|
||||
enabled: config.enableSharing,
|
||||
label: translate('ra.action.share'),
|
||||
action: (record) => {
|
||||
dispatch(openShareMenu([record.id], 'song', record.title))
|
||||
},
|
||||
action: (record) =>
|
||||
dispatch(
|
||||
openShareMenu([record.mediaFileId || record.id], 'song', record.title)
|
||||
),
|
||||
},
|
||||
download: {
|
||||
enabled: config.enableDownloads,
|
||||
label: `${translate('ra.action.download')} (${formatBytes(record.size)})`,
|
||||
action: (record) => {
|
||||
dispatch(openDownloadMenu(record, DOWNLOAD_MENU_SONG))
|
||||
},
|
||||
action: (record) =>
|
||||
dispatch(openDownloadMenu(record, DOWNLOAD_MENU_SONG)),
|
||||
},
|
||||
info: {
|
||||
enabled: true,
|
||||
|
||||
Reference in New Issue
Block a user