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
+8 -2
View File
@@ -124,9 +124,15 @@ class ProcessArtistColors:
artist.set_color(colors[0])
# INFO: Write to the database.
print("RECORD")
print(record)
if record is None:
LibDataTable.insert_one(
{"itemhash": artisthash, "color": colors[0], "itemtype": "artist"}
{
"itemhash": "artist" + artisthash,
"color": colors[0],
"itemtype": "artist",
}
)
else:
LibDataTable.update_one(artisthash, {"color": colors[0]})
LibDataTable.update_one("artist" + artisthash, {"color": colors[0]})