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,15 @@ import CloudDownloadOutlinedIcon from '@material-ui/icons/CloudDownloadOutlined'
|
||||
import { RiPlayListAddFill, RiPlayList2Fill } from 'react-icons/ri'
|
||||
import QueueMusicIcon from '@material-ui/icons/QueueMusic'
|
||||
import { httpClient } from '../dataProvider'
|
||||
import { playNext, addTracks, playTracks, shuffleTracks } from '../actions'
|
||||
import {
|
||||
playNext,
|
||||
addTracks,
|
||||
playTracks,
|
||||
shuffleTracks,
|
||||
openDownloadMenu,
|
||||
DOWNLOAD_MENU_PLAY,
|
||||
} from '../actions'
|
||||
import { M3U_MIME_TYPE, REST_URL } from '../consts'
|
||||
import subsonic from '../subsonic'
|
||||
import PropTypes from 'prop-types'
|
||||
import { formatBytes } from '../utils'
|
||||
import { useMediaQuery, makeStyles } from '@material-ui/core'
|
||||
@@ -79,8 +85,8 @@ const PlaylistActions = ({ className, ids, data, record, ...rest }) => {
|
||||
}, [getAllSongsAndDispatch])
|
||||
|
||||
const handleDownload = React.useCallback(() => {
|
||||
subsonic.download(record.id)
|
||||
}, [record])
|
||||
dispatch(openDownloadMenu(record, DOWNLOAD_MENU_PLAY))
|
||||
}, [dispatch, record])
|
||||
|
||||
const handleExport = React.useCallback(
|
||||
() =>
|
||||
|
||||
@@ -31,6 +31,7 @@ import { AddToPlaylistDialog } from '../dialogs'
|
||||
import { AlbumLinkField } from '../song/AlbumLinkField'
|
||||
import { playTracks } from '../actions'
|
||||
import PlaylistSongBulkActions from './PlaylistSongBulkActions'
|
||||
import DownloadMenuDialog from '../dialogs/DownloadMenuDialog'
|
||||
import ExpandInfoDialog from '../dialogs/ExpandInfoDialog'
|
||||
|
||||
const useStyles = makeStyles(
|
||||
@@ -214,6 +215,7 @@ const PlaylistSongs = ({ playlistId, readOnly, actions, ...props }) => {
|
||||
</Card>
|
||||
</div>
|
||||
<AddToPlaylistDialog />
|
||||
<DownloadMenuDialog />
|
||||
<ExpandInfoDialog content={<SongInfo />} />
|
||||
{React.cloneElement(props.pagination, listContext)}
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user