fix(fetchart): sources definition#6508
Conversation
|
Thank you for the PR! The changelog has not been updated, so here is a friendly reminder to check if you need to add an entry. |
96c34ad to
bc7f8a2
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6508 +/- ##
=======================================
Coverage 70.18% 70.19%
=======================================
Files 147 147
Lines 18680 18698 +18
Branches 3042 3046 +4
=======================================
+ Hits 13111 13125 +14
- Misses 4927 4930 +3
- Partials 642 643 +1
🚀 New features to boost your workflow:
|
f356f50 to
e577795
Compare
|
@snejus all updated, added a changelog entry! |
The fetchart plugin would silently drop unknown sources defined in config, leading to hard to debug problems. The plugin now errors when an unknown source is configured, or when no sources are configured. In addition, a single string is now a valid value for `sources` to either enable all sources with an `*` or a single source. Fixes: beetbox#6336
e577795 to
142e946
Compare
|
@ShimmerGlass Oh no, this just broke def loaded(self) -> None:
"""Add our own artsource to the fetchart plugin."""
for plugin in plugins.find_plugins():
if isinstance(plugin, fetchart.FetchArtPlugin):
if isinstance(fetchart.ART_SOURCES, set):
fetchart.ART_SOURCES.add(BandcampAlbumArt)
else:
fetchart.ART_SOURCES[self.data_source] = BandcampAlbumArt
fetchart.SOURCE_NAMES[BandcampAlbumArt] = self.data_source
fetchart.SOURCES_ALL.append(self.data_source)
bandcamp_fetchart = BandcampAlbumArt(self._log, self.config)
plugin.sources = [bandcamp_fetchart, *plugin.sources]
breakFurthermore, I wonder why does it report My configuration: fetchart:
lastfm_key: XXX
auto: yes
store_source: yes
sources:
- filesystem
- cover_art_url
- bandcamp
- lastfm
- "*"
maxwidth: 700 |
|
Ignore me: the issue is gone if I remove class BandcampAlbumArt(BandcampRequestsHandler, fetchart.RemoteArtSource):
NAME = ID = "Bandcamp" |
|
no problem :) |
|
@ShimmerGlass Though this question still stands:
|
Description
The fetchart plugin would silently drop unknown sources defined in config, leading to hard to debug problems.
The plugin now errors when an unknown source is configured, or when no sources are configured.
In addition, a single string is now a valid value for
sourcesto either enable all sources with an*, or a single source.Fixes: #6336
To Do
docs/to describe it.)docs/changelog.rstto the bottom of one of the lists near the top of the document.)