From eafc0bf39699336dc98192f2ad21c4430bdf21c3 Mon Sep 17 00:00:00 2001 From: Uyanide Date: Thu, 2 Apr 2026 10:15:50 +0200 Subject: [PATCH] fix: only record spotify's trackid, ignore local ones --- lrx_cli/cache.py | 3 +-- lrx_cli/mpris.py | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lrx_cli/cache.py b/lrx_cli/cache.py index c5b2b1e..b7bb767 100644 --- a/lrx_cli/cache.py +++ b/lrx_cli/cache.py @@ -71,8 +71,7 @@ class CacheEngine: expires_at INTEGER, artist TEXT, title TEXT, - album TEXT, - length INTEGER + album TEXT ) """) # Migrations diff --git a/lrx_cli/mpris.py b/lrx_cli/mpris.py index bf31348..6f54977 100644 --- a/lrx_cli/mpris.py +++ b/lrx_cli/mpris.py @@ -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)