Skip to content

Album view not showing tracks with Jellyfin 12.0 #1766

Description

@JhonnyMnemonic320

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

  1. Open Finamp and navigate to the Albums view
  2. Click on an album to view its details
  3. Observe: No tracks are displayed in the album view
  4. Navigate to the Tracks view
  5. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions