fetchart: handle sources config given as plain string#6437
Open
wavebyrd wants to merge 1 commit intobeetbox:masterfrom
Open
fetchart: handle sources config given as plain string#6437wavebyrd wants to merge 1 commit intobeetbox:masterfrom
wavebyrd wants to merge 1 commit intobeetbox:masterfrom
Conversation
snejus
reviewed
Mar 13, 2026
| if isinstance(raw_sources, str): | ||
| self.config["sources"].set(raw_sources.split()) | ||
| sources = sanitize_pairs( | ||
| self.config["sources"].as_pairs(default_value="*"), |
Member
There was a problem hiding this comment.
Is it not possible to simply
Suggested change
| self.config["sources"].as_pairs(default_value="*"), | |
| self.config["sources"].as_str_seq(), |
?
af6def0 to
3763b9b
Compare
Author
|
Ping on this fetchart sources config fix. Ready for review! |
Member
|
I added a comment above. You need to fix your branch as you have many conflicts somehow. |
When the 'sources' config is a plain string (e.g. "sources: filesystem" rather than "sources: [filesystem]"), confuse 2.2.0's Pairs template iterates over individual characters instead of treating it as a single source name. This is because Pairs no longer inherits StrSeq's string-to-list normalization. Normalize the config value to a list before calling as_pairs() so both forms work correctly. Fixes beetbox#6336
3763b9b to
0e138fe
Compare
Author
|
Fixed! I've rebased the branch to cleanly apply on top of master - it now contains only the single commit for this fix. Sorry for the messy history! |
Member
|
See the failures in CI - there are multiple issues. Tests are failing and you will need to reformat the docs using |
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
fetchartfailing with "no art found" whensourcesis configured as a plain string (e.g.sources: filesystem) instead of a list (sources: [filesystem]).Pairstemplate no longer inheritsStrSeq's string-to-list normalization, so a bare string gets iterated character by character. This normalizes the value to a list before passing it toas_pairs().sourcesconfig.Fixes #6336
Related: #5962
Test plan
sources: filesystem(string),sources: [filesystem](list), andsources: filesystem coverart(space-separated string) all produce the correct source objects