Bugfix/playlists not appearing on windows (#631)

* update filter condition for user playlists to support windows filesystems

fixes issue where playlists weren't showing up in the library for Windows Jellyfin users
This commit is contained in:
Violet Caulfield
2025-10-31 16:45:28 -05:00
committed by GitHub
parent e7f11cbb71
commit 3820aa6eb2

View File

@@ -55,14 +55,9 @@ export async function fetchUserPlaylists(
})
.then((response) => {
if (response.data.Items)
// Playlists must be stored in Jellyfin's internal config directory
return resolve(
response.data.Items.filter(
(playlist) =>
// Unix Filesystem compatibility
playlist.Path?.includes('/data/playlists') ||
// Windows Filesystem compatibility
playlist.Path?.includes('\\data\\playlists'),
),
response.data.Items.filter((playlist) => playlist.Path?.includes('data')),
)
else return resolve([])
})
@@ -96,10 +91,9 @@ export async function fetchPublicPlaylists(
console.log(response)
if (response.data.Items)
// Playlists must not be stored in Jellyfin's internal config directory
return resolve(
response.data.Items.filter(
(playlist) => !playlist.Path?.includes('/data/playlists'),
),
response.data.Items.filter((playlist) => !playlist.Path?.includes('data')),
)
else return resolve([])
})