mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-12-01 21:45:10 +00:00
fix(music): show a collection's own facts in the listing and over --remote
This commit is contained in:
@@ -1113,6 +1113,8 @@ A slow answer arrives as a [slow response](#slow-responses).
|
||||
}
|
||||
```
|
||||
|
||||
`collection` is present only when the service returned a music collection. It holds the facts of the collection itself: `kind`, `title`, `artist`, `year`, `total_tracks`, `total_discs`, `artwork_url`, `total_duration`, `owner` and `description`, for example `"collection": { "kind": "playlist", "title": "Example Playlist", "total_tracks": 93 }`. A fact that the collection does not have is absent.
|
||||
|
||||
Requires an authenticated remote session. Otherwise it returns `404 SESSION_NOT_FOUND`.
|
||||
|
||||
### `POST /api/session/{session_id}/tracks`
|
||||
|
||||
@@ -220,6 +220,12 @@ hood the client walks a remote session through its lifecycle.
|
||||
domain, path and `secure` flag, so it goes only to its own hosts. `session_cookies` carries
|
||||
the same cookies as names and values only, for older clients.
|
||||
|
||||
For a music collection (an album, a playlist, an artist listing), the title list reply also
|
||||
has `collection`, with the facts of the collection itself, such as its kind, title, artist
|
||||
and totals. The client builds its collection with them. It ignores the keys of
|
||||
`collection` that it does not know, and stops with an error on a value of the wrong type.
|
||||
Without `collection`, for example from an older server, the client has the songs only.
|
||||
|
||||
The tracks response repeats the title. A service can rewrite title fields inside
|
||||
`get_tracks`, so the client takes this copy in place of the one from the title
|
||||
list. Each track carries the full local field set. After the manifest re-parse the
|
||||
|
||||
@@ -210,6 +210,14 @@ Each subclass adds its own required fields on top of `id_` and `service`:
|
||||
because a remote client does not read it again after the listing. Such a song also needs an `id` that
|
||||
stays the same in each listing: `position` does not identify it.
|
||||
|
||||
`Album` and `Music` take the facts of the collection itself: `kind`, `title`, `artist`, `year`,
|
||||
`total_tracks`, `total_discs`, `artwork_url`, `total_duration`, `owner` and `description`. A
|
||||
remote client gets all of them. When every song has the same `album` and `album_artist`, the listing
|
||||
takes a `title`, `artist` or `year` that you do not give, and the release date, quality, genre and
|
||||
label, from the first song. The listing of any other collection, such as a playlist of single songs,
|
||||
has no line for them. `build_music_from_songs` uses the same test before it takes the title, artist, year, artwork or
|
||||
totals from the songs.
|
||||
|
||||
The tagger also falls back to `Song.data` for fields the constructor did not get, such
|
||||
as the composer or a full release date. It reads the top level of that dict and a
|
||||
nested `metadata` sub-dict, with the nested keys winning, so either shape works. The keys
|
||||
|
||||
@@ -692,7 +692,9 @@ and `-w` takes it. The tags and the file name keep the album track number.
|
||||
```
|
||||
|
||||
!!! tip "Read the track list first"
|
||||
`--list-titles` prints the release with the numbers that `-w` takes.
|
||||
`--list-titles` prints the release with the numbers that `-w` takes. The lines above the track
|
||||
list describe the release. For songs of different releases, such as a playlist or an artist
|
||||
listing, they show only what the service gives for the collection.
|
||||
|
||||
### Daily and date-based content
|
||||
|
||||
|
||||
Reference in New Issue
Block a user