Various fixes

This commit is contained in:
marc
2025-04-04 22:18:49 +02:00
parent 26aa4579b1
commit d5eb40e300
14 changed files with 1135 additions and 101 deletions

View File

@@ -133,6 +133,19 @@ class Tema:
result = next(filter(lambda prop: prop.field is PropertyField.ORIGEN, self.properties), None)
return result.value if result else None
@property
def has_score(self) -> bool:
return bool(self.main_score())
@property
def has_audio(self) -> bool:
audio_links = filter(lambda l: l.content_type is ContentType.AUDIO, self.links)
return any(audio_links)
@property
def has_lyrics(self) -> bool:
return bool(self.lyrics)
class TemaCols(enum.Enum):
NOM = "nom"