Enable transcoding of downlods (#1667)
* feat(download): Enable transcoding of downlods - #573 Signed-off-by: Kendall Garner <17521368+kgarner7@users.noreply.github.com> * feat(download): Make automatic transcoding of downloads optional Signed-off-by: Kendall Garner <17521368+kgarner7@users.noreply.github.com> * Fix spelling * address changes * prettier * fix config * use previous name Signed-off-by: Kendall Garner <17521368+kgarner7@users.noreply.github.com>
This commit is contained in:
@@ -14,9 +14,11 @@ import {
|
||||
playTracks,
|
||||
shuffleTracks,
|
||||
openAddToPlaylist,
|
||||
openDownloadMenu,
|
||||
openExtendedInfoDialog,
|
||||
DOWNLOAD_MENU_ALBUM,
|
||||
DOWNLOAD_MENU_ARTIST,
|
||||
} from '../actions'
|
||||
import subsonic from '../subsonic'
|
||||
import { LoveButton } from './LoveButton'
|
||||
import config from '../config'
|
||||
import { formatBytes } from '../utils'
|
||||
@@ -83,7 +85,16 @@ const ContextMenu = ({
|
||||
label: `${translate('resources.album.actions.download')} (${formatBytes(
|
||||
record.size
|
||||
)})`,
|
||||
action: () => subsonic.download(record.id),
|
||||
action: () => {
|
||||
dispatch(
|
||||
openDownloadMenu(
|
||||
record,
|
||||
record.duration !== undefined
|
||||
? DOWNLOAD_MENU_ALBUM
|
||||
: DOWNLOAD_MENU_ARTIST
|
||||
)
|
||||
)
|
||||
},
|
||||
},
|
||||
...(!hideInfo && {
|
||||
info: {
|
||||
|
||||
@@ -12,8 +12,9 @@ import {
|
||||
setTrack,
|
||||
openAddToPlaylist,
|
||||
openExtendedInfoDialog,
|
||||
openDownloadMenu,
|
||||
DOWNLOAD_MENU_SONG,
|
||||
} from '../actions'
|
||||
import subsonic from '../subsonic'
|
||||
import { LoveButton } from './LoveButton'
|
||||
import config from '../config'
|
||||
import { formatBytes } from '../utils'
|
||||
@@ -67,7 +68,9 @@ export const SongContextMenu = ({
|
||||
label: `${translate('resources.song.actions.download')} (${formatBytes(
|
||||
record.size
|
||||
)})`,
|
||||
action: (record) => subsonic.download(record.mediaFileId || record.id),
|
||||
action: (record) => {
|
||||
dispatch(openDownloadMenu(record, DOWNLOAD_MENU_SONG))
|
||||
},
|
||||
},
|
||||
info: {
|
||||
enabled: true,
|
||||
|
||||
Reference in New Issue
Block a user