From 4a2ac29d30d28a1fa4c7e9f48519090d0fa52cc2 Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Tue, 14 May 2024 15:09:20 +1000 Subject: [PATCH] Use more conventional Redis key separators for album cache --- src/mpd_now_playable/mpd/artwork_cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mpd_now_playable/mpd/artwork_cache.py b/src/mpd_now_playable/mpd/artwork_cache.py index c0d4d23..9aebf57 100644 --- a/src/mpd_now_playable/mpd/artwork_cache.py +++ b/src/mpd_now_playable/mpd/artwork_cache.py @@ -16,7 +16,7 @@ class ArtCacheEntry(TypedDict): def calc_album_key(song: CurrentSongResponse) -> str: artist = song.get("albumartist", song.get("artist", "Unknown Artist")) album = song.get("album", "Unknown Album") - return f"{artist}:-:-:{album}" + return ":".join(t.replace(":", "-") for t in (artist, album)) def calc_track_key(song: CurrentSongResponse) -> str: