Skip to content

Group YouTube playlist downloads into a single album bucket via playlist metadata fallback#19

Draft
Copilot wants to merge 6 commits into
masterfrom
copilot/fix-youtube-playlists-albums
Draft

Group YouTube playlist downloads into a single album bucket via playlist metadata fallback#19
Copilot wants to merge 6 commits into
masterfrom
copilot/fix-youtube-playlists-albums

Conversation

Copilot AI commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

YouTube playlist imports were often landing as a flat list of songs because many tracks lacked standard album tags. This change makes playlist metadata act as the album source when album tags are missing, so playlist tracks group as an album in the library view.

  • Album resolution logic

    • Keep existing precedence for real album tags (TALB, album, ©alb).
    • Add fallback support for playlist metadata tags (TXXX:PLAYLIST, TXXX:playlist, playlist).
    • Refactor tag-value extraction into a small reusable helper (Library._tag_text) for clearer parsing behavior.
  • Behavioral guarantees

    • Playlist metadata is used only as fallback, not as override.
    • If both album and playlist metadata exist, album metadata still wins.
  • Focused coverage

    • Added tests for:
      • playlist fallback when album metadata is absent
      • album-tag precedence when both album and playlist metadata are present
for key in ("album", "©alb"):
    if key in tags:
        text = self._tag_text(tags[key])
        if text:
            return text

for key in ("TXXX:PLAYLIST", "TXXX:playlist", "playlist"):
    if key in tags:
        text = self._tag_text(tags[key])
        if text:
            return text

Copilot AI linked an issue Apr 15, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix issue with YouTube playlists not turning into albums Group YouTube playlist downloads into a single album bucket via playlist metadata fallback Apr 15, 2026
Copilot finished work on behalf of JP1Q April 15, 2026 16:31
Copilot AI requested a review from JP1Q April 15, 2026 16:31
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.

Youtube playlists dont turn into albums

2 participants