Stop dropping Jellyfin playlists without a media type - #95
Merged
Merged
Conversation
The playlist request filtered server-side with MediaTypes=Audio. Since Jellyfin 10.10 playlists can hold mixed content, so audio playlists are frequently reported with an empty or Unknown MediaType and the filter dropped them, leaving the Playlists tab empty on an otherwise working Jellyfin connection. Drop the query parameter and reject only playlists that explicitly declare another media type, and log when the server reports no audio playlists at all. Fixes #89
|
| Filename | Overview |
|---|---|
| app/src/main/java/com/lostf1sh/pixelplayeross/data/network/jellyfin/JellyfinApiService.kt | Removes the server-side media-type filter and applies client-side playlist and child filtering; the previous mixed-child persistence issue is addressed. |
| app/src/main/java/com/lostf1sh/pixelplayeross/data/network/jellyfin/JellyfinResponseParser.kt | Adds case-insensitive predicates that retain ambiguous playlists while requiring playlist children to identify as audio. |
| app/src/test/java/com/lostf1sh/pixelplayeross/data/network/jellyfin/JellyfinResponseParserTest.kt | Covers audio, ambiguous playlist, explicit non-audio playlist, and mixed-child classification cases. |
| app/src/main/java/com/lostf1sh/pixelplayeross/data/jellyfin/JellyfinRepository.kt | Adds a diagnostic warning when no audio playlists are returned without altering synchronization behavior. |
| .github/workflows/pr-build.yml | Adds a minimally permissioned pull-request workflow that builds, verifies, and uploads signed split APKs. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Jellyfin playlists API] --> B[Keep Audio, Unknown, or missing MediaType]
B --> C[Fetch playlist children]
C --> D{MediaType or Type is Audio?}
D -- Yes --> E[Parse and persist as songs]
D -- No --> F[Skip child]
Reviews (3): Last reviewed commit: "Skip non-audio children of mixed Jellyfi..." | Re-trigger Greptile
Reviewers and issue reporters had no way to try a change short of building the app themselves or waiting for the change to land on main and ride the next nightly. Build signed split APKs on every pull request and attach them to the run, versioned with the PR number and commit so a tester can tell which build they are on. Fork pull requests get no repo secrets, so those fall back to the throwaway keystore the other workflows already use.
Playlists that survive the media-type filter can still hold mixed content, and their video children were parsed as songs into both the playlist and the unified library. Keep only children that declare themselves audio. Real media items always carry a concrete media type, so unlike playlist containers they can be filtered on it.
Collaborator
Author
|
Good catch — fixed in 4572856. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #89.
Problem
getPlaylists()asked the server forIncludeItemTypes=Playlist&MediaTypes=Audio. Since Jellyfin 10.10 playlists can hold mixed content, so audio playlists are frequently reported with an empty orUnknownMediaType— the server-side filter drops them and the response comes back with zero items.That matches the report exactly: the account is connected, Jellyfin tracks play fine, the server shows a playlist, but the app reports
0 synced playlistsand the Playlists tab is empty.Change
MediaTypes=Audiofrom the request and reject only playlists that explicitly declare another media type (Video,Photo,Book), viaJellyfinResponseParser.isAudioPlaylist. Non-audio content in a kept playlist is already ignored, sincesyncPlaylistSongs()parses items as audio.syncPlaylists()now logs when the server reports no audio playlists, so a genuinely empty result is distinguishable from a filtered-away one in a bug report.Testing
./gradlew testDebugUnitTest --tests '*JellyfinResponseParserTest*'— 3 passing.Not verified against a live Jellyfin 10.10+ server; the reporter offered to test.