Rename exclude_compilation_artists setting to match the same option in funkwhale
parent
0cb540ef6c
commit
9b00b87d11
|
@ -38,7 +38,7 @@ class Extension(mopidy.ext.Extension):
|
||||||
schema["cache_duration"] = mopidy.config.Integer(optional=True)
|
schema["cache_duration"] = mopidy.config.Integer(optional=True)
|
||||||
schema["verify_cert"] = mopidy.config.Boolean(optional=True)
|
schema["verify_cert"] = mopidy.config.Boolean(optional=True)
|
||||||
|
|
||||||
schema["show_track_artists"] = mopidy.config.Boolean(optional=True)
|
schema["exclude_compilation_artists"] = mopidy.config.Boolean(optional=True)
|
||||||
|
|
||||||
return schema
|
return schema
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ class APIClient(object):
|
||||||
self.username = self.config["funkwhale"]["username"]
|
self.username = self.config["funkwhale"]["username"]
|
||||||
self.session.verify = config["funkwhale"].get("verify_cert", True)
|
self.session.verify = config["funkwhale"].get("verify_cert", True)
|
||||||
|
|
||||||
self.show_track_artists = self.config["funkwhale"].get("show_track_artists", False)
|
self.exclude_compilation_artists = self.config["funkwhale"].get("exclude_compilation_artists", True)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def use_oauth(self):
|
def use_oauth(self):
|
||||||
|
@ -134,7 +134,7 @@ class APIClient(object):
|
||||||
return response.json()
|
return response.json()
|
||||||
|
|
||||||
def list_artists(self, filters):
|
def list_artists(self, filters):
|
||||||
if not self.show_track_artists:
|
if self.exclude_compilation_artists:
|
||||||
filters = {"has_albums": "true", **filters}
|
filters = {"has_albums": "true", **filters}
|
||||||
|
|
||||||
response = self.session.get("artists/", params=filters)
|
response = self.session.get("artists/", params=filters)
|
||||||
|
|
|
@ -28,6 +28,6 @@ cache_duration = 600
|
||||||
# Control HTTPS certificate verification. Set it to false if you're using a self-signed certificate
|
# Control HTTPS certificate verification. Set it to false if you're using a self-signed certificate
|
||||||
verify_cert = true
|
verify_cert = true
|
||||||
|
|
||||||
# Show all artists when browsing, even those without albums (e.g. per-track
|
# Hide artists that only have track credits when browsing artists.
|
||||||
# credits or collaborations). Set this to false to only show album artists
|
# Set this to false to show all artists.
|
||||||
show_track_artists = false
|
exclude_compilation_artists = true
|
Loading…
Reference in New Issue