fix: only record spotify's trackid, ignore local ones
This commit is contained in:
+1
-2
@@ -71,8 +71,7 @@ class CacheEngine:
|
||||
expires_at INTEGER,
|
||||
artist TEXT,
|
||||
title TEXT,
|
||||
album TEXT,
|
||||
length INTEGER
|
||||
album TEXT
|
||||
)
|
||||
""")
|
||||
# Migrations
|
||||
|
||||
@@ -141,6 +141,8 @@ async def _fetch_metadata_dbus(
|
||||
trackid = trackid.removeprefix("spotify:track:")
|
||||
elif trackid.startswith("/com/spotify/track/"):
|
||||
trackid = trackid.removeprefix("/com/spotify/track/")
|
||||
else:
|
||||
trackid = None
|
||||
|
||||
# Extract length (usually microseconds)
|
||||
length = metadata.get("mpris:length", None)
|
||||
|
||||
Reference in New Issue
Block a user