Skip to content

Support multi-disc albums and artist folder detection

jedmund requested to merge jedmund/multi-disc-scanning into main

Summary

  • Replace isArtistDirectory() with classifyDirectory() that distinguishes regular albums, multi-disc albums (Disc 1/, CD2/, etc.), and artist folders
  • Recursively scan subdirectories within albums, tagging files with their subfolder name and disc number from audio metadata
  • Detect artist folders that have loose audio files alongside album subdirectories — loose files become a separate album entry
  • Group tracks by disc in the FileList UI with disc headers when multiple discs are present

Schema changes

  • album_files.subfolder (text, nullable) — relative subfolder within album dir
  • album_files.tag_disc_number (integer, nullable) — disc number from audio tags

Test plan

  • Scan a multi-disc album with Disc 1/ and Disc 2/ subfolders, verify all tracks appear grouped by disc
  • Scan an artist folder with loose audio files at root, verify loose files and subdirectory albums are detected separately
  • Scan a regular album with no subfolders, verify behavior is unchanged
  • Verify sort copies preserve subdirectory structure
  • Build passes

Merge request reports

Loading