From cd351a0b6629f249a76e4ad77ef3a60654bfcdbf Mon Sep 17 00:00:00 2001 From: Stefan <144447266+gAlleb@users.noreply.github.com> Date: Sun, 15 Dec 2024 00:24:56 +0300 Subject: [PATCH 1/2] Update audioscrobbler.liq Defining timestamp as `time()` in `audioscrobbler.api.track.scrobble` function makes it freeze and show the same time for all scrobbled tracks. Using `time()` right inside `params` fixes it. --- src/libs/extra/audioscrobbler.liq | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libs/extra/audioscrobbler.liq b/src/libs/extra/audioscrobbler.liq index 5691a2f5be..26d61b664a 100644 --- a/src/libs/extra/audioscrobbler.liq +++ b/src/libs/extra/audioscrobbler.liq @@ -283,7 +283,6 @@ def audioscrobbler.api.track.scrobble( ~api_secret=null(), ~artist, ~track, - ~timestamp=time(), ~album=null(), ~context=null(), ~streamId=null(), @@ -307,7 +306,7 @@ def audioscrobbler.api.track.scrobble( [ ("track", track), ("artist", artist), - ("timestamp", string(timestamp)), + ("timestamp", string(time())), ...(null.defined(album) ? [("album", null.get(album))] : [] ), ...(null.defined(context) ? [("context", null.get(context))] : [] ), ...(null.defined(streamId) ? [("streamId", null.get(streamId))] : [] ), From 4d3566f6cc77e523824dd96255a1c62ecc983461 Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Sun, 15 Dec 2024 09:48:24 +0100 Subject: [PATCH 2/2] Make timestamp optional --- src/libs/extra/audioscrobbler.liq | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/extra/audioscrobbler.liq b/src/libs/extra/audioscrobbler.liq index 26d61b664a..8b3fa3bdbb 100644 --- a/src/libs/extra/audioscrobbler.liq +++ b/src/libs/extra/audioscrobbler.liq @@ -283,6 +283,7 @@ def audioscrobbler.api.track.scrobble( ~api_secret=null(), ~artist, ~track, + ~timestamp=null(), ~album=null(), ~context=null(), ~streamId=null(), @@ -306,7 +307,7 @@ def audioscrobbler.api.track.scrobble( [ ("track", track), ("artist", artist), - ("timestamp", string(time())), + ("timestamp", string(timestamp ?? time())), ...(null.defined(album) ? [("album", null.get(album))] : [] ), ...(null.defined(context) ? [("context", null.get(context))] : [] ), ...(null.defined(streamId) ? [("streamId", null.get(streamId))] : [] ),