Skip to content
Snippets Groups Projects
Commit 0ce5068f authored by Ciarán Ainsworth's avatar Ciarán Ainsworth
Browse files

Resolve "Albums are not displaying on Album categories"

parent 3490e414
No related branches found
No related tags found
No related merge requests found
...@@ -257,6 +257,7 @@ class AlbumFilter( ...@@ -257,6 +257,7 @@ class AlbumFilter(
search_fields=["title", "artist__name"], search_fields=["title", "artist__name"],
fts_search_fields=["body_text", "artist__body_text"], fts_search_fields=["body_text", "artist__body_text"],
) )
content_category = filters.CharFilter("artist__content_category")
tag = TAG_FILTER tag = TAG_FILTER
scope = common_filters.ActorScopeFilter( scope = common_filters.ActorScopeFilter(
actor_field="tracks__uploads__library__actor", actor_field="tracks__uploads__library__actor",
......
Fixed an issue where channel albums don't show up in the album search (#1300)
\ No newline at end of file
...@@ -57,7 +57,7 @@ Attachment: ...@@ -57,7 +57,7 @@ Attachment:
example: 2787000 example: 2787000
description: "Size of the file, in bytes" description: "Size of the file, in bytes"
mimetype: mimetype:
$ref: "./properties.yml#image_mimetype" $ref: "./properties.yml#/image_mimetype"
creation_date: creation_date:
type: "string" type: "string"
format: "date-time" format: "date-time"
...@@ -121,7 +121,7 @@ BaseArtist: ...@@ -121,7 +121,7 @@ BaseArtist:
properties: properties:
mbid: mbid:
required: false required: false
$ref: "./properties.yml#mbid" $ref: "./properties.yml#/mbid"
id: id:
type: "integer" type: "integer"
format: "int64" format: "int64"
...@@ -160,7 +160,7 @@ BaseAlbum: ...@@ -160,7 +160,7 @@ BaseAlbum:
properties: properties:
mbid: mbid:
required: false required: false
$ref: "./properties.yml#mbid" $ref: "./properties.yml#/mbid"
id: id:
type: "integer" type: "integer"
format: "int64" format: "int64"
...@@ -249,11 +249,11 @@ ChannelCreate: ...@@ -249,11 +249,11 @@ ChannelCreate:
example: "aliceandbob" example: "aliceandbob"
description: "The username to associate with the channel, for use over federation. This cannot be changed afterwards." description: "The username to associate with the channel, for use over federation. This cannot be changed afterwards."
description: description:
$ref: "./properties.yml#description" $ref: "./properties.yml#/description"
tags: tags:
$ref: "./properties.yml#tags" $ref: "./properties.yml#/tags"
content_category: content_category:
$ref: "./properties.yml#content_category" $ref: "./properties.yml#/content_category"
cover: cover:
type: string type: string
format: uuid format: uuid
...@@ -267,9 +267,9 @@ ChannelUpdate: ...@@ -267,9 +267,9 @@ ChannelUpdate:
example: "A short, public name for the channel" example: "A short, public name for the channel"
maxLength: 255 maxLength: 255
description: description:
$ref: "./properties.yml#description" $ref: "./properties.yml#/description"
tags: tags:
$ref: "./properties.yml#tags" $ref: "./properties.yml#/tags"
cover: cover:
type: string type: string
format: uuid format: uuid
...@@ -283,7 +283,7 @@ Channel: ...@@ -283,7 +283,7 @@ Channel:
type: "string" type: "string"
format: "uuid" format: "uuid"
creation_date: creation_date:
$ref: "./properties.yml#creation_date" $ref: "./properties.yml#/creation_date"
artist: artist:
$ref: "#/BaseArtist" $ref: "#/BaseArtist"
attributed_to: attributed_to:
...@@ -299,12 +299,12 @@ Subscription: ...@@ -299,12 +299,12 @@ Subscription:
approved: approved:
type: "string" type: "string"
fid: fid:
$ref: "./properties.yml#fid" $ref: "./properties.yml#/fid"
uuid: uuid:
type: "string" type: "string"
format: "uuid" format: "uuid"
creation_date: creation_date:
$ref: "./properties.yml#creation_date" $ref: "./properties.yml#/creation_date"
channel: channel:
$ref: "#/Channel" $ref: "#/Channel"
...@@ -402,7 +402,7 @@ BaseTrack: ...@@ -402,7 +402,7 @@ BaseTrack:
properties: properties:
mbid: mbid:
required: false required: false
$ref: "./properties.yml#mbid" $ref: "./properties.yml#/mbid"
id: id:
type: "integer" type: "integer"
format: "int64" format: "int64"
...@@ -472,7 +472,7 @@ ListeningCreate: ...@@ -472,7 +472,7 @@ ListeningCreate:
format: "int64" format: "int64"
example: 66 example: 66
creation_date: creation_date:
$ref: "./properties.yml#creation_date" $ref: "./properties.yml#/creation_date"
track: track:
type: "integer" type: "integer"
format: "int64" format: "int64"
...@@ -486,7 +486,7 @@ Listening: ...@@ -486,7 +486,7 @@ Listening:
format: "int64" format: "int64"
example: 66 example: 66
creation_date: creation_date:
$ref: "./properties.yml#creation_date" $ref: "./properties.yml#/creation_date"
track: track:
$ref: "#/Track" $ref: "#/Track"
actor: actor:
...@@ -529,7 +529,7 @@ Upload: ...@@ -529,7 +529,7 @@ Upload:
example: 128000 example: 128000
description: "Bitrate of the file, in bytes/s" description: "Bitrate of the file, in bytes/s"
mimetype: mimetype:
$ref: "./properties.yml#audio_mimetype" $ref: "./properties.yml#/audio_mimetype"
extension: extension:
type: string type: string
example: "ogg" example: "ogg"
...@@ -556,7 +556,7 @@ OwnedLibraryCreate: ...@@ -556,7 +556,7 @@ OwnedLibraryCreate:
type: "string" type: "string"
example: "Lots of interesting content" example: "Lots of interesting content"
privacy_level: privacy_level:
$ref: "./properties.yml#privacy_level" $ref: "./properties.yml#/privacy_level"
OwnedLibrary: OwnedLibrary:
type: "object" type: "object"
...@@ -565,7 +565,7 @@ OwnedLibrary: ...@@ -565,7 +565,7 @@ OwnedLibrary:
type: string type: string
format: uuid format: uuid
fid: fid:
$ref: "./properties.yml#fid" $ref: "./properties.yml#/fid"
name: name:
type: "string" type: "string"
example: "My Creative Commons library" example: "My Creative Commons library"
...@@ -573,9 +573,9 @@ OwnedLibrary: ...@@ -573,9 +573,9 @@ OwnedLibrary:
type: "string" type: "string"
example: "All content is under CC-BY" example: "All content is under CC-BY"
creation_date: creation_date:
$ref: "./properties.yml#creation_date" $ref: "./properties.yml#/creation_date"
privacy_level: privacy_level:
$ref: "./properties.yml#privacy_level" $ref: "./properties.yml#/privacy_level"
uploads_count: uploads_count:
type: "integer" type: "integer"
format: "int64" format: "int64"
...@@ -593,7 +593,7 @@ OwnedUpload: ...@@ -593,7 +593,7 @@ OwnedUpload:
- type: "object" - type: "object"
properties: properties:
import_status: import_status:
$ref: "./properties.yml#import_status" $ref: "./properties.yml#/import_status"
track: track:
$ref: "#/Track" $ref: "#/Track"
library: library:
...@@ -629,14 +629,14 @@ Playlist: ...@@ -629,14 +629,14 @@ Playlist:
description: Number of tracks in the playlist description: Number of tracks in the playlist
example: 76 example: 76
privacy_level: privacy_level:
$ref: "./properties.yml#privacy_level" $ref: "./properties.yml#/privacy_level"
actor: actor:
$ref: "#/Actor" $ref: "#/Actor"
description: Actor owning the playlist description: Actor owning the playlist
creation_date: creation_date:
$ref: "./properties.yml#creation_date" $ref: "./properties.yml#/creation_date"
modification_date: modification_date:
$ref: "./properties.yml#modification_date" $ref: "./properties.yml#/modification_date"
PlaylistCreate: PlaylistCreate:
...@@ -647,7 +647,7 @@ PlaylistCreate: ...@@ -647,7 +647,7 @@ PlaylistCreate:
description: Name of the playlist description: Name of the playlist
example: "Move your body" example: "Move your body"
privacy_level: privacy_level:
$ref: "./properties.yml#privacy_level" $ref: "./properties.yml#/privacy_level"
PlaylistTrack: PlaylistTrack:
type: "object" type: "object"
...@@ -662,7 +662,7 @@ PlaylistTrack: ...@@ -662,7 +662,7 @@ PlaylistTrack:
example: 16 example: 16
description: Position of the track in the playlist description: Position of the track in the playlist
creation_date: creation_date:
$ref: "./properties.yml#creation_date" $ref: "./properties.yml#/creation_date"
track: track:
$ref: "#/Track" $ref: "#/Track"
...@@ -675,7 +675,7 @@ ImportMetadata: ...@@ -675,7 +675,7 @@ ImportMetadata:
example: "My Track" example: "My Track"
required: true required: true
mbid: mbid:
$ref: "./properties.yml#mbid" $ref: "./properties.yml#/mbid"
required: false required: false
copyright: copyright:
type: "string" type: "string"
...@@ -688,7 +688,7 @@ ImportMetadata: ...@@ -688,7 +688,7 @@ ImportMetadata:
required: false required: false
description: A license code, as returned by /api/v1/licenses description: A license code, as returned by /api/v1/licenses
tags: tags:
$ref: "./properties.yml#tags" $ref: "./properties.yml#/tags"
required: false required: false
position: position:
description: "Position of the track in the album or channel" description: "Position of the track in the album or channel"
...@@ -708,7 +708,7 @@ TrackFavorite: ...@@ -708,7 +708,7 @@ TrackFavorite:
user: user:
$ref: "#/User" $ref: "#/User"
creation_date: creation_date:
$ref: "./properties.yml#creation_date" $ref: "./properties.yml#/creation_date"
User: User:
type: "object" type: "object"
properties: properties:
...@@ -750,7 +750,7 @@ Me: ...@@ -750,7 +750,7 @@ Me:
type: "string" type: "string"
format: "date-time" format: "date-time"
privacy_level: privacy_level:
$ref: "./properties.yml#privacy_level" $ref: "./properties.yml#/privacy_level"
description: Default privacy-level associated with the user account description: Default privacy-level associated with the user account
quota_status: quota_status:
$ref: "#/QuotaStatus" $ref: "#/QuotaStatus"
...@@ -771,7 +771,7 @@ Me: ...@@ -771,7 +771,7 @@ Me:
The token expires after 3 days by default. The token expires after 3 days by default.
QuotaStatus: QuotaStatus:
type: "object" type: "object"
properties: properties:
max: max:
......
ChannelOrdering: ChannelOrdering:
- $ref: "#/parameters/Ordering" - $ref: "#/Ordering"
- default: "-creation_date" - default: "-creation_date"
schema: schema:
required: false required: false
...@@ -118,6 +118,20 @@ Scope: ...@@ -118,6 +118,20 @@ Scope:
- "actor:alice@example.com" - "actor:alice@example.com"
- "domain:example.com" - "domain:example.com"
ContentType:
name: "content_type"
in: "query"
default: "all"
description: |
Limits the results to those whose artist content type matches the query.
schema:
required: false
type: "string"
enum:
- "podcast"
- "music"
Search: Search:
name: "q" name: "q"
in: "query" in: "query"
......
...@@ -506,6 +506,7 @@ paths: ...@@ -506,6 +506,7 @@ paths:
- $ref: "./api/parameters.yml#/PageSize" - $ref: "./api/parameters.yml#/PageSize"
- $ref: "./api/parameters.yml#/Related" - $ref: "./api/parameters.yml#/Related"
- $ref: "./api/parameters.yml#/Scope" - $ref: "./api/parameters.yml#/Scope"
- $ref: "./api/parameters.yml#/ContentType"
responses: responses:
200: 200:
......
...@@ -175,6 +175,8 @@ export default { ...@@ -175,6 +175,8 @@ export default {
ordering: this.getOrderingAsString(), ordering: this.getOrderingAsString(),
playable: "true", playable: "true",
tag: this.tags, tag: this.tags,
include_channels: "true",
content_category: "music"
} }
logger.default.debug("Fetching albums") logger.default.debug("Fetching albums")
axios.get( axios.get(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment