feat: added lyrics metadata
This commit is contained in:
@@ -6,6 +6,11 @@ from .parents import OuterProxy
|
||||
from .source import Source, SourceCollection
|
||||
from .formatted_text import FormattedText
|
||||
from .country import Language
|
||||
from .metadata import (
|
||||
Mapping as id3Mapping,
|
||||
ID3Timestamp,
|
||||
Metadata
|
||||
)
|
||||
|
||||
|
||||
class Lyrics(OuterProxy):
|
||||
@@ -25,3 +30,10 @@ class Lyrics(OuterProxy):
|
||||
def __init__(self, text: FormattedText = None, language: Language = None, source_list: SourceCollection = None,
|
||||
**kwargs) -> None:
|
||||
super().__init__(text=text, language=language, source_list=source_list, **kwargs)
|
||||
|
||||
@property
|
||||
def metadata(self) -> Metadata:
|
||||
return Metadata({
|
||||
id3Mapping.UNSYNCED_LYRICS
|
||||
})
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ from typing import Optional, Dict, Tuple, List, Type, Generic, Any, TypeVar, Set
|
||||
from .metadata import Metadata
|
||||
from ..utils.config import logging_settings
|
||||
from ..utils.shared import HIGHEST_ID
|
||||
from ..utils.support_classes.hacking import MetaClass
|
||||
from ..utils.hacking import MetaClass
|
||||
|
||||
LOGGER = logging_settings["object_logger"]
|
||||
|
||||
|
||||
@@ -146,16 +146,6 @@ class Song(Base):
|
||||
return main_artists
|
||||
return f"{main_artists} feat. {feature_artists}"
|
||||
|
||||
"""
|
||||
def __str__(self) -> str:
|
||||
artist_credit_str = ""
|
||||
artist_credits = self.get_artist_credits()
|
||||
if artist_credits != "":
|
||||
artist_credit_str = f" by {artist_credits}"
|
||||
|
||||
return f"\"{self.title}\"{artist_credit_str}"
|
||||
"""
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return f"Song(\"{self.title}\")"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user