sok.media.music.album
Album media class for music organization.
Provides the Album class for representing and organizing music albums with track lists, artist info, and release metadata.
Album
class Album(title: str, artist: str = '', year: Optional[int] = None)Bases: MediaItem
Class for managing music albums.
Represents a music album with tracks, artist info, and release metadata.
Initialize an Album instance.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
title | str | The album title. | |
artist | str | '' | Artist or band name (default: empty). |
year | Optional[int] | None | Release year (default: None). |
Attributes
| Name | Type | Description |
|---|---|---|
artist | Album artist or band name. | |
genre | Primary musical genre. | |
label | Record label name. | |
tracks | List[Dict[str, Any]] | List of track dictionaries with metadata. |
year | Release year. |
get_folder_structure
def get_folder_structure() -> List[str]:Return the recommended folder hierarchy.
Returns
List[str]List of folder names [artist, album].
get_formatted_name
def get_formatted_name() -> str:Return the formatted album folder name.
Returns
strFormatted string like 'Artist - Album (Year)'.
get_track_filename
def get_track_filename(track_number: int, track_title: str) -> str:Generate the filename for a track.
Parameters
| Name | Type | Description |
|---|---|---|
track_number | int | The track's position on the album. |
track_title | str | The track's title. |
Returns
strFormatted filename like '01 - Track Title'.