Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Provide default story args and filter track paths

+18 -4
+7 -1
webui/rockbox/src/Components/PlaylistDetails/PlaylistDetails.stories.tsx
··· 16 16 17 17 // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args 18 18 export const Default: Story = { 19 - args: {}, 19 + args: { 20 + tracks: [], 21 + onGoBack: () => {}, 22 + onPlayAll: () => {}, 23 + onShuffleAll: () => {}, 24 + onPlayTrack: () => {}, 25 + }, 20 26 };
+2 -2
webui/rockbox/src/Components/PlaylistDetails/PlaylistDetailsWithData.tsx
··· 83 83 playSmart({ variables: { id: id! } }); 84 84 } else { 85 85 if (shuffle) { 86 - const paths = tracks.map((t) => t.path); 86 + const paths = tracks.map((t) => t.path).filter((p): p is string => !!p); 87 87 const shuffled = [...paths].sort(() => Math.random() - 0.5); 88 88 insertTracks({ 89 89 variables: { position: PLAYLIST_INSERT_FIRST, tracks: shuffled }, ··· 98 98 if (isSmart) { 99 99 playSmart({ variables: { id: id! } }); 100 100 } else { 101 - const paths = tracks.map((t) => t.path); 101 + const paths = tracks.map((t) => t.path).filter((p): p is string => !!p); 102 102 const ordered = [...paths.slice(position), ...paths.slice(0, position)]; 103 103 insertTracks({ 104 104 variables: { position: PLAYLIST_INSERT_FIRST, tracks: ordered },
+9 -1
webui/rockbox/src/Components/Playlists/Playlists.stories.tsx
··· 16 16 17 17 // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args 18 18 export const Default: Story = { 19 - args: {}, 19 + args: { 20 + savedPlaylists: [], 21 + smartPlaylists: [], 22 + onPlay: () => {}, 23 + onEdit: () => {}, 24 + onDelete: () => {}, 25 + onCreate: async () => {}, 26 + onUpdate: async () => {}, 27 + }, 20 28 };