Snapshot of the existing codebase before working through the TASKS.md backlog. Real library data (data/) and the iTunes import fixture (itunes-test-library/) are gitignored. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
17 lines
590 B
Python
17 lines
590 B
Python
from dataclasses import dataclass, field
|
|
from typing import Optional
|
|
|
|
from .track import Track
|
|
from .playlist import Playlist, PlaylistSettings
|
|
|
|
|
|
@dataclass
|
|
class Library:
|
|
tracks: dict[int, Track] = field(default_factory=dict) # track_id -> Track
|
|
playlists: dict[str, Playlist] = field(default_factory=dict) # persistent_id -> Playlist
|
|
music_folder: str = ""
|
|
import_date: Optional[str] = None
|
|
# Column/sort settings for the all-tracks Library view
|
|
library_settings: PlaylistSettings = field(
|
|
default_factory=lambda: PlaylistSettings(sort_column="artist"))
|