music-kraken-core/src/music_kraken/objects/lyrics.py

28 lines
764 B
Python
Raw Normal View History

2023-02-25 21:16:32 +00:00
from typing import List
import pycountry
from .parents import DatabaseObject
from .source import SourceAttribute, Source
from .metadata import MetadataAttribute
from .formatted_text import FormattedText
class Lyrics(DatabaseObject, SourceAttribute, MetadataAttribute):
def __init__(
self,
text: FormattedText,
language: pycountry.Languages,
_id: str = None,
dynamic: bool = False,
source_list: List[Source] = None,
**kwargs
) -> None:
DatabaseObject.__init__(_id=_id, dynamic=dynamic)
self.text: FormattedText = text
self.language: pycountry.Languages = language
if source_list is not None:
self.source_list = source_list