Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Philipp Wolfer
funkwhale
Commits
bf611f2e
Commit
bf611f2e
authored
Sep 03, 2020
by
Agate
💬
Browse files
Fix
#1217
: Fixed "scope=subscribed" on albums, artists, uploads and libraries API
parent
83fde07a
Changes
2
Hide whitespace changes
Inline
Side-by-side
api/funkwhale_api/music/filters.py
View file @
bf611f2e
...
...
@@ -104,7 +104,9 @@ class ArtistFilter(
has_albums
=
filters
.
BooleanFilter
(
field_name
=
"_"
,
method
=
"filter_has_albums"
)
tag
=
TAG_FILTER
scope
=
common_filters
.
ActorScopeFilter
(
actor_field
=
"tracks__uploads__library__actor"
,
distinct
=
True
actor_field
=
"tracks__uploads__library__actor"
,
distinct
=
True
,
library_field
=
"tracks__uploads__library"
,
)
ordering
=
django_filters
.
OrderingFilter
(
fields
=
(
...
...
@@ -207,7 +209,9 @@ class UploadFilter(audio_filters.IncludeChannelsFilterSet):
album_artist
=
filters
.
UUIDFilter
(
"track__album__artist__uuid"
)
library
=
filters
.
UUIDFilter
(
"library__uuid"
)
playable
=
filters
.
BooleanFilter
(
field_name
=
"_"
,
method
=
"filter_playable"
)
scope
=
common_filters
.
ActorScopeFilter
(
actor_field
=
"library__actor"
,
distinct
=
True
)
scope
=
common_filters
.
ActorScopeFilter
(
actor_field
=
"library__actor"
,
distinct
=
True
,
library_field
=
"library"
,
)
import_status
=
common_filters
.
MultipleQueryFilter
(
coerce
=
str
)
q
=
fields
.
SmartSearchFilter
(
config
=
search
.
SearchConfig
(
...
...
@@ -255,7 +259,9 @@ class AlbumFilter(
)
tag
=
TAG_FILTER
scope
=
common_filters
.
ActorScopeFilter
(
actor_field
=
"tracks__uploads__library__actor"
,
distinct
=
True
actor_field
=
"tracks__uploads__library__actor"
,
distinct
=
True
,
library_field
=
"tracks__uploads__library"
,
)
ordering
=
django_filters
.
OrderingFilter
(
...
...
@@ -284,7 +290,9 @@ class AlbumFilter(
class
LibraryFilter
(
filters
.
FilterSet
):
q
=
fields
.
SearchFilter
(
search_fields
=
[
"name"
],)
scope
=
common_filters
.
ActorScopeFilter
(
actor_field
=
"actor"
,
distinct
=
True
)
scope
=
common_filters
.
ActorScopeFilter
(
actor_field
=
"actor"
,
distinct
=
True
,
library_field
=
"pk"
,
)
class
Meta
:
model
=
models
.
Library
...
...
changes/changelog.d/1217.bugfix
0 → 100644
View file @
bf611f2e
Fixed "scope=subscribed" on albums, artists, uploads and libraries API (#1217)
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment