refactor: skip music system library refresh when no new tracks are downloaded - #225
Open
wzli wants to merge 1 commit into
Open
refactor: skip music system library refresh when no new tracks are downloaded#225wzli wants to merge 1 commit into
wzli wants to merge 1 commit into
Conversation
wzli
marked this pull request as draft
August 13, 2026 01:44
wzli
force-pushed
the
feature/skip-library-refresh-when-no-downloads
branch
2 times, most recently
from
August 13, 2026 01:46
8894088 to
8c2c426
Compare
wzli
force-pushed
the
feature/skip-library-refresh-when-no-downloads
branch
from
August 13, 2026 01:47
8c2c426 to
4fc7587
Compare
wzli
marked this pull request as ready for review
August 13, 2026 01:47
wzli
force-pushed
the
feature/skip-library-refresh-when-no-downloads
branch
3 times, most recently
from
August 13, 2026 01:54
2df0f06 to
eb7d717
Compare
wzli
marked this pull request as draft
August 13, 2026 01:56
wzli
marked this pull request as ready for review
August 13, 2026 02:46
wzli
force-pushed
the
feature/skip-library-refresh-when-no-downloads
branch
from
August 13, 2026 02:46
eb7d717 to
921facb
Compare
wzli
force-pushed
the
feature/skip-library-refresh-when-no-downloads
branch
7 times, most recently
from
August 13, 2026 03:30
e91fb28 to
74e286d
Compare
wzli
force-pushed
the
feature/skip-library-refresh-when-no-downloads
branch
from
August 13, 2026 03:31
74e286d to
e17fafb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Currently, Explo calls
RefreshLibrary()unconditionally insideCreatePlaylist(). For clients that don't report active refresh state (such as Subsonic/Navidrome), this triggers a full library scan and falls back onSLEEP(e.g. 1 minute wait) even when 0 new tracks were downloaded.Solution
RefreshLibrary()fromCreatePlaylist(): Removec.API.RefreshLibrary()from insideCreatePlaylist()insrc/client/client.go.downloader.StartDownload(&tracks).main.go: Callclient.RefreshLibrary()inmain.goonly whennewDownloads > 0.This keeps
CreatePlaylist()focused on updating playlist tracklists and avoids redundant library scans or sleep delays when all songs already exist locally.