Skip to content

Fix playlist cards and tracklists not refreshing after a run in frontend#190

Open
dammitjeff wants to merge 2 commits into
LumePart:devfrom
dammitjeff:refresh-playlist-fix
Open

Fix playlist cards and tracklists not refreshing after a run in frontend#190
dammitjeff wants to merge 2 commits into
LumePart:devfrom
dammitjeff:refresh-playlist-fix

Conversation

@dammitjeff

Copy link
Copy Markdown
Contributor

Fixed a bug where playlists cards and tracklists wouldn't show newly-pulled tracks until both A) A run was complete from start to finish, and B) You manually refreshed the page.

Currently the tracklist was saved too late in the run, meaning that if a run didn't properly complete, the new tracklist would never actually save to explo, causing a stale tracklist to show in the frontend. I moved WritePlaylistCache up to right after the tracklist is pulled from ListenBrainz, before any download tasks. Now the new tracklist is saved the moment it's fetched, so if a run fails, it still pulls the new tracklist for the user.

The frontend only fetched tracks on mount and held them, but never properly updated. So even if a run was successfully completed, you had to reload to see them. Added clearPlaylistCachefunction to wipe the old tracklist and refresh the tracklist so the new songs show up immediately, with no refresh needed.

Also added Pulling playlistand Saved playlist log lines so users can see exactly when the new tracks were pulled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant