feat(radio): add track radio submenu to playlist and favorites views
Thread onCreateQbzRadio/onCreateQobuzRadio through TrackRow, VirtualizedTrackList, PlaylistDetailView, and FavoritesView so track context menus in playlists and favorites show the radio submenu with QBZ Radio and Qobuz Radio options.
This commit is contained in:
5 files changed
+89
No files matched your search
@@ -51,6 +51,8 @@
|
||||
onPlayFromHere?: () => void;
|
||||
onPlayNext?: () => void;
|
||||
onPlayLater?: () => void;
|
||||
onCreateQbzRadio?: () => void;
|
||||
onCreateQobuzRadio?: () => void;
|
||||
onAddToPlaylist?: () => void;
|
||||
onRemoveFromPlaylist?: () => void;
|
||||
onFindReplacement?: () => void;
|
||||
@@ -300,6 +302,8 @@
|
||||
onPlayFromHere={menuActions?.onPlayFromHere}
|
||||
onPlayNext={menuActions?.onPlayNext}
|
||||
onPlayLater={menuActions?.onPlayLater}
|
||||
onCreateQbzRadio={menuActions?.onCreateQbzRadio}
|
||||
onCreateQobuzRadio={menuActions?.onCreateQobuzRadio}
|
||||
onAddFavorite={trackId !== undefined ? () => toggleTrackFavorite(trackId) : undefined}
|
||||
onAddToPlaylist={menuActions?.onAddToPlaylist}
|
||||
onRemoveFromPlaylist={menuActions?.onRemoveFromPlaylist}
|
||||
|
||||
@@ -58,6 +58,8 @@
|
||||
onGoToArtist?: (artistId: number) => void;
|
||||
onShowInfo?: (trackId: number) => void;
|
||||
onReDownload?: (track: Track) => void;
|
||||
onCreateQbzRadio?: (trackId: number, trackTitle: string, artistId?: number) => void;
|
||||
onCreateQobuzRadio?: (trackId: number, trackTitle: string) => void;
|
||||
// For getting artist/album IDs from non-local tracks
|
||||
getArtistId?: (track: Track) => number | undefined;
|
||||
getAlbumId?: (track: Track) => string | undefined;
|
||||
@@ -101,6 +103,8 @@
|
||||
onGoToArtist,
|
||||
onShowInfo,
|
||||
onReDownload,
|
||||
onCreateQbzRadio,
|
||||
onCreateQobuzRadio,
|
||||
getArtistId,
|
||||
getAlbumId,
|
||||
}: Props = $props();
|
||||
@@ -347,6 +351,8 @@
|
||||
onPlayNow: () => onTrackPlay(item.track),
|
||||
onPlayNext: onTrackPlayNext ? () => onTrackPlayNext(item.track) : undefined,
|
||||
onPlayLater: onTrackPlayLater ? () => onTrackPlayLater(item.track) : undefined,
|
||||
onCreateQbzRadio: !isLocal && onCreateQbzRadio ? () => onCreateQbzRadio(trackId, getTrackTitle(item.track), artistId) : undefined,
|
||||
onCreateQobuzRadio: !isLocal && onCreateQobuzRadio ? () => onCreateQobuzRadio(trackId, getTrackTitle(item.track)) : undefined,
|
||||
onAddToPlaylist: onTrackAddToPlaylist ? () => onTrackAddToPlaylist(trackId) : undefined,
|
||||
onShareQobuz: onShareQobuz ? () => onShareQobuz(trackId) : undefined,
|
||||
onShareSonglink: onShareSonglink ? () => onShareSonglink(item.track) : undefined,
|
||||
|
||||
@@ -101,6 +101,8 @@
|
||||
onTrackDownload?: (track: DisplayTrack) => void;
|
||||
onTrackRemoveDownload?: (trackId: number) => void;
|
||||
onTrackReDownload?: (track: DisplayTrack) => void;
|
||||
onTrackCreateQbzRadio?: (trackId: number, trackTitle: string, artistId?: number) => void;
|
||||
onTrackCreateQobuzRadio?: (trackId: number, trackTitle: string) => void;
|
||||
getTrackOfflineCacheStatus?: (trackId: number) => { status: OfflineCacheStatus; progress: number };
|
||||
onPlaylistSelect?: (playlistId: number) => void;
|
||||
onPlaylistPlay?: (playlistId: number) => void;
|
||||
@@ -158,6 +160,8 @@
|
||||
onTrackDownload,
|
||||
onTrackRemoveDownload,
|
||||
onTrackReDownload,
|
||||
onTrackCreateQbzRadio,
|
||||
onTrackCreateQobuzRadio,
|
||||
getTrackOfflineCacheStatus,
|
||||
onPlaylistSelect,
|
||||
onPlaylistPlay,
|
||||
@@ -1581,6 +1585,8 @@
|
||||
onGoToArtist={onTrackGoToArtist}
|
||||
onShowInfo={onTrackShowInfo}
|
||||
onReDownload={onTrackReDownload ? (trk) => onTrackReDownload(buildDisplayTrackFromFavorite(trk)) : undefined}
|
||||
onCreateQbzRadio={onTrackCreateQbzRadio}
|
||||
onCreateQobuzRadio={onTrackCreateQobuzRadio}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -164,6 +164,8 @@
|
||||
onTrackDownload?: (track: DisplayTrack) => void;
|
||||
onTrackRemoveDownload?: (trackId: number) => void;
|
||||
onTrackReDownload?: (track: DisplayTrack) => void;
|
||||
onTrackCreateQbzRadio?: (trackId: number, trackTitle: string, artistId?: number) => void;
|
||||
onTrackCreateQobuzRadio?: (trackId: number, trackTitle: string) => void;
|
||||
getTrackOfflineCacheStatus?: (trackId: number) => { status: OfflineCacheStatus; progress: number };
|
||||
downloadStateVersion?: number;
|
||||
onLocalTrackPlay?: (track: LocalLibraryTrack) => void;
|
||||
@@ -193,6 +195,8 @@
|
||||
onTrackDownload,
|
||||
onTrackRemoveDownload,
|
||||
onTrackReDownload,
|
||||
onTrackCreateQbzRadio,
|
||||
onTrackCreateQobuzRadio,
|
||||
getTrackOfflineCacheStatus,
|
||||
downloadStateVersion,
|
||||
onLocalTrackPlay,
|
||||
@@ -2263,6 +2267,8 @@
|
||||
onPlayNow: () => handleTrackClick(track, idx),
|
||||
onPlayNext: track.isLocal ? () => handleTrackPlayNext(track) : (onTrackPlayNext ? () => onTrackPlayNext(track) : undefined),
|
||||
onPlayLater: track.isLocal ? () => handleTrackPlayLater(track) : (onTrackPlayLater ? () => onTrackPlayLater(track) : undefined),
|
||||
onCreateQbzRadio: !track.isLocal && onTrackCreateQbzRadio ? () => onTrackCreateQbzRadio(track.id, track.title, track.artistId) : undefined,
|
||||
onCreateQobuzRadio: !track.isLocal && onTrackCreateQobuzRadio ? () => onTrackCreateQobuzRadio(track.id, track.title) : undefined,
|
||||
onAddToPlaylist: !track.isLocal && onTrackAddToPlaylist ? () => onTrackAddToPlaylist(track.id) : undefined,
|
||||
onRemoveFromPlaylist: () => removeTrackFromPlaylist(track),
|
||||
onShareQobuz: !track.isLocal && onTrackShareQobuz ? () => onTrackShareQobuz(track.id) : undefined,
|
||||
|
||||
Reference in new issue
Block a user