rekordbox_set_list_manager.models.project#
Project domain model — top-level container for all set-manager data.
Classes#
Top-level container: one project per save file. |
Module Contents#
- class rekordbox_set_list_manager.models.project.Project(/, **data)[source]#
Bases:
pydantic.BaseModelTop-level container: one project per save file.
- Parameters:
data (Any)
- sections: list[rekordbox_set_list_manager.models.section.Section] = None[source]#
- tracks: dict[uuid.UUID, rekordbox_set_list_manager.models.track.Track] = None[source]#
- section_color_map: dict[rekordbox_set_list_manager.models.enums.SectionType, rekordbox_set_list_manager.models.enums.RekordboxColor] = None[source]#
- themes: list[rekordbox_set_list_manager.models.section_name_theme.SectionNameTheme] = None[source]#
- add_track(track)[source]#
Add track to the project track dictionary.
- Parameters:
track (Track) – The track to register; stored under
track.id.- Return type:
None
- remove_track(track_id)[source]#
Remove the track and all its section references from the project.
- Parameters:
track_id (UUID) – ID of the track to delete from the track store and all sections.
- Return type:
None
- get_track(track_id)[source]#
Return the track with track_id, or None if not found.
- Parameters:
track_id (UUID) – The ID of the track to look up.
- Returns:
The matching track, or
Noneif no track has that ID.- Return type:
Track | None
- add_section(section)[source]#
Append section to the project’s section list.
- Parameters:
section (Section) – The section to append.
- Return type:
None
- remove_section(section_id)[source]#
Remove the section with section_id from the project.
- Parameters:
section_id (UUID) – ID of the section to remove.
- Return type:
None
- get_section(section_id)[source]#
Return the section with section_id, or None if not found.
- Parameters:
section_id (UUID) – The ID of the section to look up.
- Returns:
The matching section, or
Noneif not found.- Return type:
Section | None
- move_section(section_id, new_index)[source]#
Move the section with section_id to new_index in the list.
- Parameters:
section_id (UUID) – ID of the section to reposition.
new_index (int) – Target zero-based position in the sections list.
- Return type:
None
- property all_track_ids: list[uuid.UUID][source]#
All track IDs across all sections, in order.
- Return type:
list[uuid.UUID]
- property total_track_count: int[source]#
Return the total number of tracks across all sections.
- Return type:
int
- add_theme(theme)[source]#
Append theme to the project’s theme list.
- Parameters:
theme (SectionNameTheme) – The theme preset to add.
- Return type:
None
- remove_theme(theme_name)[source]#
Remove the theme named theme_name from the project.
- Parameters:
theme_name (str) – Exact name of the theme to remove.
- Return type:
None
- get_theme(theme_name)[source]#
Return the theme named theme_name, or None if not found.
- Parameters:
theme_name (str) – Exact name of the theme to look up.
- Returns:
The matching theme, or
Noneif not found.- Return type:
SectionNameTheme | None
- apply_theme(theme_name)[source]#
Rename sections using the named theme.
Only sections whose SectionType appears in the theme’s
namesmapping are renamed; all others are left unchanged.- Parameters:
theme_name (str) – Name of the theme to apply.
- Raises:
ValueError – If no theme with theme_name exists in the project.
- Return type:
None
- default_color_for(section_type)[source]#
Return the configured default color for section_type.
- Parameters:
section_type (SectionType) – The section type whose default color to retrieve.
- Returns:
The mapped default color, or
RekordboxColor.NONEif not set.- Return type: