Smart playlists (#476)
A playlist is the episodes of the podcasts chosen, those set to play first ahead of the rest, newest or oldest first, unplayed only or all, kept up to date by itself (table `playlists`, /api/playlists). It sits in a folder of its own in the feed list, as Signals do. Played from one, an episode goes on to the playlist's next once Up Next has nothing. The priority ids are written into the ORDER BY, which the page query uses twice, so they are quoted there rather than bound; they are also only ever feed ids this person subscribes to. The folder row first borrowed Signals' `sigs` class, which the tests use to mean Signals' folder; four Signals tests failed until it had its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -251,6 +251,35 @@ message EntryPage {
|
||||
repeated EntryRow entries = 2;
|
||||
}
|
||||
|
||||
// POST /api/playlists and PATCH /api/playlists/{id}, the body: a smart playlist (#476).
|
||||
message PlaylistSpec {
|
||||
string name = 1;
|
||||
repeated string feeds = 2;
|
||||
repeated string priority = 3;
|
||||
bool only_unplayed = 4;
|
||||
bool oldest_first = 5;
|
||||
}
|
||||
|
||||
// A playlist in GET /api/playlists, with how many episodes it holds now.
|
||||
message PlaylistRow {
|
||||
int64 id = 1;
|
||||
string name = 2;
|
||||
repeated string feeds = 3;
|
||||
repeated string priority = 4;
|
||||
bool only_unplayed = 5;
|
||||
bool oldest_first = 6;
|
||||
int64 items = 7;
|
||||
}
|
||||
|
||||
message PlaylistRows {
|
||||
repeated PlaylistRow items = 1;
|
||||
}
|
||||
|
||||
// POST /api/playlists, the answer.
|
||||
message PlaylistId {
|
||||
int64 id = 1;
|
||||
}
|
||||
|
||||
// One of Up Next's episodes (#473).
|
||||
message QueueItem {
|
||||
string feed_id = 1;
|
||||
|
||||
Reference in New Issue
Block a user