lastfm: dump failed scrobbles locally

+ bump tinytag to v2.0.0 and refactor taglib.py
+ add explicit flag to track model
This commit is contained in:
cwilvx
2025-01-06 00:18:17 +03:00
parent 2cc063ad76
commit 2a12487220
10 changed files with 188 additions and 198 deletions
+3
View File
@@ -50,6 +50,7 @@ class Track:
_pos: int = 0
_ati: str = ""
image: str = ""
explicit: bool = False
fav_userids: list[int] = field(default_factory=list)
@property
@@ -78,6 +79,8 @@ class Track:
self.og_album = self.album
self.folder = self.folder + "/"
self.weakhash = create_hash(self.title, self.artists)
explicit_tag = self.extra.get("explicit", ["0"])
self.explicit = int(explicit_tag[0]) == 1
self.image = self.albumhash + ".webp"
self.extra = {