Skip to content

Conversation

@Oduanir
Copy link
Contributor

@Oduanir Oduanir commented Jan 9, 2026

Playlist Improvements: Pagination, Folder Organization & Stability Fixes

Description

This PR addresses stability issue regarding playlist handling, and introduces a new configuration option for file organization.

The primary goal was to resolve the 100-track limit on playlist downloads by properly paginating API requests. Additionally, a new feature allows users to force downloads into a dedicated playlist folder, bypassing the standard Artist/Album structure.

Changes

1. Feature: Standalone Playlist Folders

  • Added a "Download tracks to playlist folder" option in the Monitor/Sync modal.
  • Behavior: When enabled, tracks are downloaded directly into tidaloader_playlists/{PlaylistName}/.
  • Scope: Applies to all Monitored Playlists (Tidal & ListenBrainz).
  • Context: This allows users to keep playlist files self-contained. Note that this may result in file duplication if the tracks already exist in the main library, which is the intended behavior for this specific mode.

2. Fix: 100-Track Limit

  • ADDRESSED: Issue where only the first 100 tracks of a playlist were retrieved.
  • IMPLEMENTATION: Added pagination logic in get_playlist_tracks to iteratively fetch all available tracks (with a safety cap at 10,000).

3. Fix: Settings Attribute Error

  • ADDRESSED: AttributeError: group_compilations causing manual sync tasks to fail.
  • IMPLEMENTATION: Added the missing default group_compilations attribute to the Settings model in backend/api/settings.py.

4. Code Refactor

  • Refactored backend/tidal_client.py to simplify the get_playlist_tracks method.
  • Reduced cyclomatic complexity and improved readability of the pagination loop and response extraction logic.

How to Test

  1. Sync Fix: Trigger a manual sync on an existing playlist to verify the process no longer crashes.
  2. Pagination: Add a playlist containing more than 100 tracks and verify that the total track count is correct in the UI and that all files are queued/downloaded.
  3. Folder Feature:
    • Add a new playlist to monitor (Tidal or ListenBrainz).
    • Check the "Download tracks to playlist folder" option.
    • Verify that files are downloaded into downloads/tidaloader_playlists/{PlaylistName}/ as a flat list, alongside the .m3u8 and cover image.

Type of Change

  • Bug fix
  • New feature
  • Refactoring

@RayZ3R0 RayZ3R0 merged commit 709fe11 into RayZ3R0:main Jan 12, 2026
2 checks passed
@RayZ3R0
Copy link
Owner

RayZ3R0 commented Jan 12, 2026

Great PR, thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants