fix sidebar playlist handlers (#1318)

This commit is contained in:
jeffvli
2025-12-07 16:48:22 -08:00
parent 65a7c3440b
commit adbcca00de
2 changed files with 88 additions and 64 deletions
@@ -289,7 +289,14 @@ export const PlayerProvider = ({ children }: { children: React.ReactNode }) => {
toast.hide(toastId);
}
const sortedSongs = sortSongsByFetchedOrder(songs, id, itemType);
let sortedSongs: Song[] = [];
// Playlists should use the native order of the playlist
if (itemType === LibraryItem.PLAYLIST) {
sortedSongs = songs;
} else {
sortedSongs = sortSongsByFetchedOrder(songs, id, itemType);
}
const filters = useSettingsStore.getState().playback.filters;
const filteredSongs = filterSongsByPlayerFilters(sortedSongs, filters);