You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, the API returns the playlist's created time in UTC+0 meaning Explo thinks the playlist was created on Sunday and therefore will never return any playlist.
I made the following change and it works correctly for my case at least:
diff --git a/src/listenbrainz.go b/src/listenbrainz.go
index c4dfb47..b48b74a 100644
--- a/src/listenbrainz.go
+++ b/src/listenbrainz.go
@@ -194,7 +194,7 @@ func getWeeklyExploration(cfg Listenbrainz) (string, error) {
for _, playlist := range playlists.Playlist {
_, currentWeek := time.Now().Local().ISOWeek()
- _, creationWeek := playlist.Data.Date.ISOWeek()
+ _, creationWeek := playlist.Data.Date.Local().ISOWeek()
if strings.Contains(playlist.Data.Title, "Weekly Exploration") && currentWeek == creationWeek {
id := strings.Split(playlist.Data.Identifier, "/")
@@ -271,4 +271,4 @@ func lbRequest(path string) ([]byte, error) { // Handle ListenBrainz API request
return nil, err
}
return body, nil
-}
\ No newline at end of file
+}
The text was updated successfully, but these errors were encountered:
I have set my timezone to UTC+8 at https://listenbrainz.org/settings/select_timezone
Therefore, ListenBrainz generates my exploration playlist every Monday at 00:00 UTC+8.
However, the API returns the playlist's created time in UTC+0 meaning Explo thinks the playlist was created on Sunday and therefore will never return any playlist.
I made the following change and it works correctly for my case at least:
The text was updated successfully, but these errors were encountered: