mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-01 18:57:24 +00:00
Adds deletion and restore for music library items.
This commit is contained in:
1 parent
98515dc5e8
commit
f9ad8b2fc5
224 files changed
+22384
-1360
No files matched your search
@@ -137,7 +137,7 @@ Returns the favorites of the current user, from the most recently favorited. The
|
||||
"collectionTitle": "A Night at the Opera",
|
||||
"creatorId": "d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a",
|
||||
"creatorName": "Queen",
|
||||
"coverPath": "/media/music/Queen-3b3a19f3/A Night at the Opera-e8d52f7b/cover.jpg"
|
||||
"coverPath": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/A Night at the Opera-e8d52f7b-0a3c-4c2d-ab4f-8a7b6c5d4e3f/cover.jpg"
|
||||
},
|
||||
{
|
||||
"mediaKind": "Book",
|
||||
|
||||
@@ -27,6 +27,12 @@
|
||||
- [Get Album Tracks Lite](#get-album-tracks-lite)
|
||||
- [Get Album Tracks Lite Request](#get-album-tracks-lite-request)
|
||||
- [Get Album Tracks Lite Response](#get-album-tracks-lite-response)
|
||||
- [Get Deleted Albums](#get-deleted-albums)
|
||||
- [Get Deleted Albums Request](#get-deleted-albums-request)
|
||||
- [Get Deleted Albums Response](#get-deleted-albums-response)
|
||||
- [Restore Album](#restore-album)
|
||||
- [Restore Album Request](#restore-album-request)
|
||||
- [Restore Album Response](#restore-album-response)
|
||||
|
||||
## Album
|
||||
|
||||
@@ -531,12 +537,12 @@ POST api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/artists/d7c41e6a-9f2b
|
||||
]
|
||||
}
|
||||
],
|
||||
"coverPath": "/media/music/Queen-3b3a19f3/A Night at the Opera-e8d52f7b/cover.jpg",
|
||||
"coverPath": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/A Night at the Opera-e8d52f7b-0a3c-4c2d-ab4f-8a7b6c5d4e3f/cover.jpg",
|
||||
"artwork": [
|
||||
{
|
||||
"type": "Cover",
|
||||
"ordinal": 0,
|
||||
"path": "/media/music/Queen-3b3a19f3/A Night at the Opera-e8d52f7b/cover.jpg"
|
||||
"path": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/A Night at the Opera-e8d52f7b-0a3c-4c2d-ab4f-8a7b6c5d4e3f/cover.jpg"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -797,12 +803,12 @@ GET api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/artists/d7c41e6a-9f2b-
|
||||
]
|
||||
}
|
||||
],
|
||||
"coverPath": "/media/music/Queen-3b3a19f3/A Night at the Opera-e8d52f7b/cover.jpg",
|
||||
"coverPath": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/A Night at the Opera-e8d52f7b-0a3c-4c2d-ab4f-8a7b6c5d4e3f/cover.jpg",
|
||||
"artwork": [
|
||||
{
|
||||
"type": "Cover",
|
||||
"ordinal": 0,
|
||||
"path": "/media/music/Queen-3b3a19f3/A Night at the Opera-e8d52f7b/cover.jpg"
|
||||
"path": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/A Night at the Opera-e8d52f7b-0a3c-4c2d-ab4f-8a7b6c5d4e3f/cover.jpg"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -836,7 +842,7 @@ GET api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/artists/d7c41e6a-9f2b-
|
||||
"id": "e8d52f7b-0a3c-4c2d-ab4f-8a7b6c5d4e3f",
|
||||
"title": "A Night at the Opera",
|
||||
"totalTracks": 12,
|
||||
"coverPath": "/media/music/Queen-3b3a19f3/A Night at the Opera-e8d52f7b/cover.jpg",
|
||||
"coverPath": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/A Night at the Opera-e8d52f7b-0a3c-4c2d-ab4f-8a7b6c5d4e3f/cover.jpg",
|
||||
"releaseYear": 1975,
|
||||
"releaseTypes": [ "Album" ]
|
||||
}
|
||||
@@ -1102,12 +1108,12 @@ GET api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/artists/d7c41e6a-9f2b-
|
||||
]
|
||||
}
|
||||
],
|
||||
"coverPath": "/media/music/Queen-3b3a19f3/A Night at the Opera-e8d52f7b/cover.jpg",
|
||||
"coverPath": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/A Night at the Opera-e8d52f7b-0a3c-4c2d-ab4f-8a7b6c5d4e3f/cover.jpg",
|
||||
"artwork": [
|
||||
{
|
||||
"type": "Cover",
|
||||
"ordinal": 0,
|
||||
"path": "/media/music/Queen-3b3a19f3/A Night at the Opera-e8d52f7b/cover.jpg"
|
||||
"path": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/A Night at the Opera-e8d52f7b-0a3c-4c2d-ab4f-8a7b6c5d4e3f/cover.jpg"
|
||||
},
|
||||
{
|
||||
"type": "Back",
|
||||
@@ -1447,12 +1453,12 @@ PUT api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/artists/d7c41e6a-9f2b-
|
||||
]
|
||||
}
|
||||
],
|
||||
"coverPath": "/media/music/Queen-3b3a19f3/A Night at the Opera-e8d52f7b/cover.jpg",
|
||||
"coverPath": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/A Night at the Opera-e8d52f7b-0a3c-4c2d-ab4f-8a7b6c5d4e3f/cover.jpg",
|
||||
"artwork": [
|
||||
{
|
||||
"type": "Cover",
|
||||
"ordinal": 0,
|
||||
"path": "/media/music/Queen-3b3a19f3/A Night at the Opera-e8d52f7b/cover.jpg"
|
||||
"path": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/A Night at the Opera-e8d52f7b-0a3c-4c2d-ab4f-8a7b6c5d4e3f/cover.jpg"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1484,7 +1490,7 @@ Content-Type: image/jpeg
|
||||
|
||||
```json
|
||||
{
|
||||
"coverPath": "/media/music/music-3f2504e0-4f89-41d3-9a0c-0305e82c3301/Queen-2b0e5f5a-0b3f-4b7e-8f4a-8c9e3d2f5a6b/A Night at the Opera-7c1d2e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f/cover.jpg"
|
||||
"coverPath": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/A Night at the Opera-e8d52f7b-0a3c-4c2d-ab4f-8a7b6c5d4e3f/cover.jpg"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -1499,7 +1505,7 @@ DELETE api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/artists/d7c41e6a-9f
|
||||
200 Ok
|
||||
```
|
||||
|
||||
Deletes the album identified by the route, together with its tracks. An artist must always keep at least one album.
|
||||
Soft deletes the album identified by the route. The stored metadata, artwork and track paths are kept, so the album can be restored, and its tracks stay reserved, so a scan does not add them back. The album is hidden until it is restored. An artist must always keep at least one album, so the last album of an artist cannot be deleted and the request fails with a forbidden problem.
|
||||
|
||||
|
||||
### Get Album Tracks
|
||||
@@ -1643,3 +1649,51 @@ GET api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/artists/d7c41e6a-9f2b-
|
||||
"numberOfPages": 1
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
### Get Deleted Albums
|
||||
|
||||
#### Get Deleted Albums Request
|
||||
|
||||
```js
|
||||
GET api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/albums/deleted-items
|
||||
```
|
||||
|
||||
#### Get Deleted Albums Response
|
||||
|
||||
```js
|
||||
200 Ok
|
||||
```
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id": "b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e",
|
||||
"libraryId": "3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a",
|
||||
"artistId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
|
||||
"artistName": "Queen",
|
||||
"title": "A Night at the Opera",
|
||||
"deletedOnUtc": "2026-11-14T18:35:00Z",
|
||||
"coverPath": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d/A Night at the Opera-b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e/cover.jpg"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
An album whose artist is also deleted is not returned until the artist is restored.
|
||||
|
||||
|
||||
### Restore Album
|
||||
|
||||
#### Restore Album Request
|
||||
|
||||
```js
|
||||
POST api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/artists/d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/albums/{albumId}/restore
|
||||
```
|
||||
|
||||
#### Restore Album Response
|
||||
|
||||
```js
|
||||
200 Ok
|
||||
```
|
||||
|
||||
Restores the deleted album identified by the route, together with its stored metadata, artwork and the tracks that were not deleted on their own.
|
||||
@@ -21,6 +21,12 @@
|
||||
- [Update Artist Cover Request](#update-artist-cover-request)
|
||||
- [Update Artist Cover Response](#update-artist-cover-response)
|
||||
- [Delete Artist](#delete-artist)
|
||||
- [Get Deleted Artists](#get-deleted-artists)
|
||||
- [Get Deleted Artists Request](#get-deleted-artists-request)
|
||||
- [Get Deleted Artists Response](#get-deleted-artists-response)
|
||||
- [Restore Artist](#restore-artist)
|
||||
- [Restore Artist Request](#restore-artist-request)
|
||||
- [Restore Artist Response](#restore-artist-response)
|
||||
|
||||
## Artist
|
||||
|
||||
@@ -672,17 +678,17 @@ POST api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/artists
|
||||
]
|
||||
}
|
||||
],
|
||||
"coverPath": "/media/music/Queen-3b3a19f3/A Night at the Opera-e8d52f7b/cover.jpg",
|
||||
"coverPath": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/A Night at the Opera-e8d52f7b-0a3c-4c2d-ab4f-8a7b6c5d4e3f/cover.jpg",
|
||||
"artwork": [
|
||||
{
|
||||
"type": "Cover",
|
||||
"ordinal": 0,
|
||||
"path": "/media/music/Queen-3b3a19f3/A Night at the Opera-e8d52f7b/cover.jpg"
|
||||
"path": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/A Night at the Opera-e8d52f7b-0a3c-4c2d-ab4f-8a7b6c5d4e3f/cover.jpg"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"coverPath": "/media/music/Queen-3b3a19f3/cover.jpg"
|
||||
"coverPath": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/cover.jpg"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -1021,17 +1027,17 @@ GET api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/artists?currentPage=1&
|
||||
]
|
||||
}
|
||||
],
|
||||
"coverPath": "/media/music/Queen-3b3a19f3/A Night at the Opera-e8d52f7b/cover.jpg",
|
||||
"coverPath": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/A Night at the Opera-e8d52f7b-0a3c-4c2d-ab4f-8a7b6c5d4e3f/cover.jpg",
|
||||
"artwork": [
|
||||
{
|
||||
"type": "Cover",
|
||||
"ordinal": 0,
|
||||
"path": "/media/music/Queen-3b3a19f3/A Night at the Opera-e8d52f7b/cover.jpg"
|
||||
"path": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/A Night at the Opera-e8d52f7b-0a3c-4c2d-ab4f-8a7b6c5d4e3f/cover.jpg"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"coverPath": "/media/music/Queen-3b3a19f3/cover.jpg"
|
||||
"coverPath": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/cover.jpg"
|
||||
}
|
||||
],
|
||||
"currentPage": 1,
|
||||
@@ -1072,7 +1078,7 @@ GET api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/artists/lite?currentPa
|
||||
{
|
||||
"id": "d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a",
|
||||
"name": "Queen",
|
||||
"coverPath": "/media/music/Queen-3b3a19f3/cover.jpg"
|
||||
"coverPath": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/cover.jpg"
|
||||
}
|
||||
],
|
||||
"currentPage": 1,
|
||||
@@ -1410,17 +1416,17 @@ GET api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/artists/{artistId}
|
||||
]
|
||||
}
|
||||
],
|
||||
"coverPath": "/media/music/Queen-3b3a19f3/A Night at the Opera-e8d52f7b/cover.jpg",
|
||||
"coverPath": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/A Night at the Opera-e8d52f7b-0a3c-4c2d-ab4f-8a7b6c5d4e3f/cover.jpg",
|
||||
"artwork": [
|
||||
{
|
||||
"type": "Cover",
|
||||
"ordinal": 0,
|
||||
"path": "/media/music/Queen-3b3a19f3/A Night at the Opera-e8d52f7b/cover.jpg"
|
||||
"path": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/A Night at the Opera-e8d52f7b-0a3c-4c2d-ab4f-8a7b6c5d4e3f/cover.jpg"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"coverPath": "/media/music/Queen-3b3a19f3/cover.jpg"
|
||||
"coverPath": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/cover.jpg"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -2076,17 +2082,17 @@ PUT api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/artists/{artistId}
|
||||
]
|
||||
}
|
||||
],
|
||||
"coverPath": "/media/music/Queen-3b3a19f3/A Night at the Opera-e8d52f7b/cover.jpg",
|
||||
"coverPath": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/A Night at the Opera-e8d52f7b-0a3c-4c2d-ab4f-8a7b6c5d4e3f/cover.jpg",
|
||||
"artwork": [
|
||||
{
|
||||
"type": "Cover",
|
||||
"ordinal": 0,
|
||||
"path": "/media/music/Queen-3b3a19f3/A Night at the Opera-e8d52f7b/cover.jpg"
|
||||
"path": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/A Night at the Opera-e8d52f7b-0a3c-4c2d-ab4f-8a7b6c5d4e3f/cover.jpg"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"coverPath": "/media/music/Queen-3b3a19f3/cover.jpg"
|
||||
"coverPath": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/cover.jpg"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -2116,7 +2122,7 @@ Content-Type: image/jpeg
|
||||
|
||||
```json
|
||||
{
|
||||
"coverPath": "/media/music/music-3f2504e0-4f89-41d3-9a0c-0305e82c3301/Queen-2b0e5f5a-0b3f-4b7e-8f4a-8c9e3d2f5a6b/cover.jpg"
|
||||
"coverPath": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/cover.jpg"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -2131,4 +2137,48 @@ DELETE api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/artists/{artistId}
|
||||
200 Ok
|
||||
```
|
||||
|
||||
Deletes the artist identified by the route, together with its albums and tracks.
|
||||
Soft deletes the artist identified by the route. The stored metadata, artwork, albums and tracks are kept, so the artist can be restored, and their paths stay reserved, so a scan does not add them back.
|
||||
|
||||
|
||||
### Get Deleted Artists
|
||||
|
||||
#### Get Deleted Artists Request
|
||||
|
||||
```js
|
||||
GET api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/artists/deleted-items
|
||||
```
|
||||
|
||||
#### Get Deleted Artists Response
|
||||
|
||||
```js
|
||||
200 Ok
|
||||
```
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
|
||||
"libraryId": "3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a",
|
||||
"name": "Queen",
|
||||
"deletedOnUtc": "2026-11-14T18:35:00Z",
|
||||
"coverPath": "/media/music/music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/Queen-a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d/cover.jpg"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
|
||||
### Restore Artist
|
||||
|
||||
#### Restore Artist Request
|
||||
|
||||
```js
|
||||
POST api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/artists/{artistId}/restore
|
||||
```
|
||||
|
||||
#### Restore Artist Response
|
||||
|
||||
```js
|
||||
200 Ok
|
||||
```
|
||||
|
||||
Restores the deleted artist identified by the route, together with its stored metadata, artwork and the albums and tracks that were not deleted on their own. An artist cannot be restored when a visible artist with the same name already exists in the library.
|
||||
@@ -24,6 +24,12 @@
|
||||
- [Update Track Request](#update-track-request)
|
||||
- [Update Track Response](#update-track-response)
|
||||
- [Delete Track](#delete-track)
|
||||
- [Get Deleted Tracks](#get-deleted-tracks)
|
||||
- [Get Deleted Tracks Request](#get-deleted-tracks-request)
|
||||
- [Get Deleted Tracks Response](#get-deleted-tracks-response)
|
||||
- [Restore Track](#restore-track)
|
||||
- [Restore Track Request](#restore-track-request)
|
||||
- [Restore Track Response](#restore-track-response)
|
||||
|
||||
## Track
|
||||
|
||||
@@ -360,7 +366,7 @@ Returns a uniformly random selection of tracks from every track of the library,
|
||||
"albumId": "e8d52f7b-0a3c-4c2d-ab4f-8a7b6c5d4e3f",
|
||||
"albumTitle": "A Night at the Opera",
|
||||
"artistId": "d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a",
|
||||
"coverPath": "\\media\\music\\music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a\\QUEEN\\Album\\A night at the opera-e8d52f7b-0a3c-4c2d-ab4f-8a7b6c5d4e3f\\cover.jpg"
|
||||
"coverPath": "\\media\\music\\music-3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a\\Queen-d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a\\Album\\A night at the opera-e8d52f7b-0a3c-4c2d-ab4f-8a7b6c5d4e3f\\cover.jpg"
|
||||
}
|
||||
]
|
||||
```
|
||||
@@ -688,4 +694,54 @@ DELETE api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/artists/d7c41e6a-9f
|
||||
200 Ok
|
||||
```
|
||||
|
||||
Deletes the track identified by the route.
|
||||
Soft deletes the track identified by the route. The stored metadata, artwork and file path are kept, so the track can be restored, and its path stays reserved, so a scan does not add it back.
|
||||
|
||||
|
||||
### Get Deleted Tracks
|
||||
|
||||
#### Get Deleted Tracks Request
|
||||
|
||||
```js
|
||||
GET api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/tracks/deleted-items
|
||||
```
|
||||
|
||||
#### Get Deleted Tracks Response
|
||||
|
||||
```js
|
||||
200 Ok
|
||||
```
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id": "c3d4e5f6-a7b8-4c9d-0e1f-2a3b4c5d6e7f",
|
||||
"libraryId": "3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a",
|
||||
"artistId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
|
||||
"artistName": "Queen",
|
||||
"albumId": "b2c3d4e5-f6a7-4b8c-9d0e-1f2a3b4c5d6e",
|
||||
"albumTitle": "A Night at the Opera",
|
||||
"title": "Bohemian Rhapsody",
|
||||
"path": "/music/queen/a-night-at-the-opera/01 - Bohemian Rhapsody.flac",
|
||||
"deletedOnUtc": "2026-11-14T18:35:00Z"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
A track whose album or artist is also deleted is not returned until the album and the artist are restored.
|
||||
|
||||
|
||||
### Restore Track
|
||||
|
||||
#### Restore Track Request
|
||||
|
||||
```js
|
||||
POST api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/artists/d7c41e6a-9f2b-4b1c-9a3e-7f6e5d4c3b2a/albums/e8d52f7b-0a3c-4c2d-ab4f-8a7b6c5d4e3f/tracks/{trackId}/restore
|
||||
```
|
||||
|
||||
#### Restore Track Response
|
||||
|
||||
```js
|
||||
200 Ok
|
||||
```
|
||||
|
||||
Restores the deleted track identified by the route, together with its stored metadata and artwork.
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
GET {{host}}/api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/albums/deleted-items
|
||||
Authorization: Bearer {{ACCESS_TOKEN}}
|
||||
@@ -0,0 +1,2 @@
|
||||
POST {{host}}/api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/artists/{{$guid}}/albums/{{$guid}}/restore
|
||||
Authorization: Bearer {{ACCESS_TOKEN}}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
GET {{host}}/api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/artists/deleted-items
|
||||
Authorization: Bearer {{ACCESS_TOKEN}}
|
||||
@@ -0,0 +1,2 @@
|
||||
POST {{host}}/api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/artists/{{$guid}}/restore
|
||||
Authorization: Bearer {{ACCESS_TOKEN}}
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
GET {{host}}/api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/tracks/deleted-items
|
||||
Authorization: Bearer {{ACCESS_TOKEN}}
|
||||
@@ -0,0 +1,2 @@
|
||||
POST {{host}}/api/v1/libraries/3b3a19f3-1f5a-4d5a-9a3a-5c5a4a3a2a1a/artists/{{$guid}}/albums/{{$guid}}/tracks/{{$guid}}/restore
|
||||
Authorization: Bearer {{ACCESS_TOKEN}}
|
||||
@@ -86,7 +86,7 @@ The manifest is a JSON object describing the theme. The example below is the man
|
||||
"name": "Editorial Paper",
|
||||
"description": "A clean, readable proof of concept theme.",
|
||||
"author": "Lumina",
|
||||
"version": "1.5.61",
|
||||
"version": "1.6.0",
|
||||
"preview": "assets/preview.svg",
|
||||
"templates": {
|
||||
"default": "templates/index.html"
|
||||
@@ -180,6 +180,7 @@ Known page keys:
|
||||
| `shared/audio-player/playlist-item` | The playlist item of the audio player bar. |
|
||||
| `library/written-content-library/book-library/books/index` | The books browsing page. |
|
||||
| `library/written-content-library/book-library/books/deleted-items` | The deleted items page of a book library, which restores deleted books. |
|
||||
| `library/audio-library/music-library/deleted-items` | The deleted items page of a music library, which restores deleted artists, albums and tracks. |
|
||||
| `playlists/index` | The page that lists and deletes the playlists of the current user. |
|
||||
| `playlists/item` | The page that creates a playlist, or edits, reorders, plays and deletes an existing playlist of the current user. The `isNew` page data field tells the two modes apart. |
|
||||
| `favorites/index` | The page that lists, filters and removes the favorites of the current user across media kinds. |
|
||||
@@ -621,6 +622,42 @@ The page script drives these hooks:
|
||||
|
||||
A theme that provides this page must keep these hooks and render the anti-forgery token, or reimplement the restore behavior itself.
|
||||
|
||||
#### The Music Deleted Items Page
|
||||
|
||||
`library/audio-library/music-library/deleted-items` lists the artists, albums and tracks that were deleted from a music library and lets the user restore them. Its fallback is `Core/Views/Library/AudioLibrary/MusicLibrary/DeletedItems.cshtml`. The bundled themes ship their own `templates/library/audio-library/music-library/deleted-items.html`; when a theme has no template for the page, the application renders the fallback view.
|
||||
|
||||
Template resolution walks up the path scopes, so a theme that ships `templates/library/audio-library/music-library.html` without a `deleted-items.html` would render that parent template for this page. A theme that provides a music library parent template must also provide the deleted items template.
|
||||
|
||||
Page data:
|
||||
|
||||
| Field | Content |
|
||||
| --- | --- |
|
||||
| `libraryId` | The Id of the library whose deleted music items are listed. |
|
||||
| `libraryTitle` | The title of that library. |
|
||||
| `deletedArtistsJson` | The deleted artists, serialized as a JSON array. Each item carries `id`, `libraryId`, `name`, `deletedOnUtc` and `coverPath`. |
|
||||
| `deletedAlbumsJson` | The deleted albums, serialized as a JSON array. Each item carries `id`, `libraryId`, `artistId`, `artistName`, `title`, `deletedOnUtc` and `coverPath`. |
|
||||
| `deletedTracksJson` | The deleted tracks, serialized as a JSON array. Each item carries `id`, `libraryId`, `artistId`, `artistName`, `albumId`, `albumTitle`, `title`, `path` and `deletedOnUtc`. |
|
||||
| `artistRestoreUrl` | The route template that restores a deleted artist. The trailing `00000000-0000-0000-0000-000000000000` is replaced by the Id of the artist, and `libraryId` is appended as a query parameter. |
|
||||
| `albumRestoreUrl` | The route template that restores a deleted album. Its two `00000000-0000-0000-0000-000000000000` segments are replaced, in order, by the Id of the artist and the Id of the album, and `libraryId` is appended as a query parameter. |
|
||||
| `trackRestoreUrl` | The route template that restores a deleted track. Its three `00000000-0000-0000-0000-000000000000` segments are replaced, in order, by the Id of the artist, the Id of the album and the Id of the track, and `libraryId` is appended as a query parameter. |
|
||||
| `backUrl` | The route of the artists page of the library. |
|
||||
| `antiforgeryToken` | The anti-forgery request token for the restore POST. |
|
||||
| `strings` | The localized strings of the page, keyed by their resource names. |
|
||||
| `stringsJson` | The same localized strings serialized as JSON, with camel case keys, for the page script. |
|
||||
|
||||
The page script drives these hooks:
|
||||
|
||||
| Hook | Purpose |
|
||||
| --- | --- |
|
||||
| `btn-back-to-library` | Returns to the artists page of the library. |
|
||||
| `deleted-artists-table`, `deleted-albums-table` and `deleted-tracks-table` | Hold the deleted artists, albums and tracks. The restore click handler is bound at the document level. |
|
||||
| `no-deleted-music-items` | The empty state, shown when no deleted music items remain. |
|
||||
| `.deleted-music-item-row` | A deleted music item row, carrying its kind in `data-row-type` and the Ids it needs to restore in `data-artist-id`, `data-album-id` and `data-track-id`. Removed after a successful restore. |
|
||||
| `.btn-restore-artist`, `.btn-restore-album` and `.btn-restore-track` | The restore button of a row, carrying the same Ids as its row. |
|
||||
| `input[name="__RequestVerificationToken"]` | The anti-forgery token that the restore POST sends. |
|
||||
|
||||
A theme that provides this page must keep these hooks and render the anti-forgery token, or reimplement the restore behavior itself. The `library/audio-library/music-library/artists/index` page supplies a `deletedItemsUrl` page data field with the route of this page, and the artists page template must also provide the `deleted-items-button` hook when it wants to link to it. The page reads the library from the `libraryId` query parameter, so a theme that links to `deletedItemsUrl` must append `?libraryId=` with the Id of the library, as the application template does; the route alone lands on the home page.
|
||||
|
||||
#### The Playlist Pages
|
||||
|
||||
`playlists/index` receives a model with the following fields:
|
||||
|
||||
Reference in new issue
Block a user