toktokkie.metadata.music package

Submodules

toktokkie.metadata.music.Music module

class toktokkie.metadata.music.Music.Music(directory_path: str, json_data: Optional[Dict[str, Any]] = None, no_validation: bool = False)

Bases: toktokkie.metadata.base.Metadata.Metadata, toktokkie.metadata.music.MusicRenamer.MusicRenamer, toktokkie.metadata.music.MusicPrompter.MusicPrompter, toktokkie.metadata.music.MusicValidator.MusicValidator

Metadata class that handles music/artists

directory_path: str

The path to the directory this metadata describes

json: Dict[str, Any]
classmethod media_type()toktokkie.enums.MediaType
Returns

The MusicArtist media type

classmethod valid_id_types() → List[toktokkie.enums.IdType]
Returns

A list of valid ID types

toktokkie.metadata.music.MusicExtras module

class toktokkie.metadata.music.MusicExtras.MusicExtras

Bases: toktokkie.metadata.base.MetadataBase.MetadataBase, abc.ABC

Additional methods and attributes for music metadata objects

add_album(album_data: toktokkie.metadata.music.components.MusicAlbum.MusicAlbum)

Adds an album to the metadata :param album_data: The album metadata to add :return: None

add_theme_song(theme_song: toktokkie.metadata.music.components.MusicThemeSong.MusicThemeSong)

Adds a theme song to the metadata :param theme_song: The theme song to add :return: None

property albums
Returns

All albums in the metadata, regardless if they’re just normal albums or theme songs

apply_tags(force_art_refresh: bool = False)

Applies MP3 tags :param force_art_refresh: Forces refresh of cover art :return: None

directory_path: str

The path to the directory this metadata describes

json: Dict[str, Any]
property non_theme_song_albums
Returns

Any albums that are not also theme songs

property theme_songs
Returns

All theme songs for this music artist

toktokkie.metadata.music.MusicPrompter module

class toktokkie.metadata.music.MusicPrompter.MusicPrompter

Bases: toktokkie.metadata.base.Prompter.Prompter, toktokkie.metadata.music.MusicExtras.MusicExtras, abc.ABC

Implements the Prompter functionality for music metadata

directory_path: str

The path to the directory this metadata describes

json: Dict[str, Any]
classmethod prompt(directory_path: str) → Dict[str, Any]

Generates new Metadata JSON using prompts for a directory :param directory_path: The path to the directory for which to generate

the metadata object

Returns

The generated metadata JSON

toktokkie.metadata.music.MusicRenamer module

class toktokkie.metadata.music.MusicRenamer.MusicRenamer

Bases: toktokkie.metadata.base.Renamer.Renamer, toktokkie.metadata.music.MusicExtras.MusicExtras, abc.ABC

Implements the Renamer functionality for music metadata

create_rename_operations() → List[toktokkie.metadata.base.components.RenameOperation.RenameOperation]

Creates renaming operations for movie metadata :return: The renaming operations

directory_path: str

The path to the directory this metadata describes

json: Dict[str, Any]

toktokkie.metadata.music.MusicValidator module

class toktokkie.metadata.music.MusicValidator.MusicValidator

Bases: toktokkie.metadata.base.Validator.Validator, toktokkie.metadata.music.MusicExtras.MusicExtras, abc.ABC

Implements the Validator functionality for music metadata

classmethod build_schema() → Dict[str, Any]

Generates the JSON schema :return: The JSON schema

directory_path: str

The path to the directory this metadata describes

json: Dict[str, Any]
validate()

Validates the JSON data to make sure everything has valid values :raises InvalidMetadataException: If any errors were encountered :return: None

Module contents