Problem
When viewing albums in Finamp, no tracks are displayed in the album view. However, the same tracks appear correctly in:
- The track view within Finamp
- The Jellyfin web interface
This suggests the issue is specific to how Finamp fetches album tracks, not a server-side problem.
Environment:
- Jellyfin Server: 12.0
- Finamp: 1.0.1
- Device/OS: Android 16, macOS 12, macOS 15
Root Cause Analysis
After analyzing the code, the issue appears to be in lib/services/jellyfin_api_helper.dart (line 120). When fetching album tracks, Finamp uses the following API call:
response = await jellyfinApi.getItems(
userId: currentUser.id,
parentId: parentItem?.id, // Album ID
includeItemTypes: includeItemTypes, // "Audio"
recursive: true, // ← Potential problem
sortBy: sortBy,
sortOrder: sortOrder,
// ...
);
The problem: The recursive: true parameter may have changed behavior in Jellyfin 12.0, or there's a compatibility issue with how it handles album queries. For album tracks specifically, recursion shouldn't be necessary since tracks are direct children of the album.
Why the Jellyfin web interface works: The web interface doesn't use recursive=true when fetching album tracks.
Steps to Reproduce
- Open Finamp and navigate to the Albums view
- Click on an album to view its details
- Observe: No tracks are displayed in the album view
- Navigate to the Tracks view
- Observe: The same tracks appear correctly
Expected Behavior
Album view should display all tracks for the selected album, just like the tracks view does.
Suggested Fix
Disable the recursive parameter (or set it to false) when fetching tracks for a MusicAlbum item type:
} else {
// This will be run when getting albums, songs in albums, and stuff like that.
response = await jellyfinApi.getItems(
userId: currentUser.id,
parentId: parentItem?.id,
includeItemTypes: includeItemTypes,
recursive: parentItem?.type == "MusicAlbum" ? false : true, // Don't recurse for albums
sortBy: sortBy,
sortOrder: sortOrder,
searchTerm: searchTerm,
filters: filters,
startIndex: startIndex,
limit: limit,
);
}
This aligns with how the Jellyfin web client handles album track queries.
Problem
When viewing albums in Finamp, no tracks are displayed in the album view. However, the same tracks appear correctly in:
This suggests the issue is specific to how Finamp fetches album tracks, not a server-side problem.
Environment:
Root Cause Analysis
After analyzing the code, the issue appears to be in
lib/services/jellyfin_api_helper.dart(line 120). When fetching album tracks, Finamp uses the following API call:The problem: The
recursive: trueparameter may have changed behavior in Jellyfin 12.0, or there's a compatibility issue with how it handles album queries. For album tracks specifically, recursion shouldn't be necessary since tracks are direct children of the album.Why the Jellyfin web interface works: The web interface doesn't use
recursive=truewhen fetching album tracks.Steps to Reproduce
Expected Behavior
Album view should display all tracks for the selected album, just like the tracks view does.
Suggested Fix
Disable the
recursiveparameter (or set it tofalse) when fetching tracks for a MusicAlbum item type:This aligns with how the Jellyfin web client handles album track queries.