feat(plex): add a movie or show to a collection from its card menu
"Add to collection…" opens a panel beside the card: the title's library's manual collections tick it in or out, and a name + Enter creates a new one with the title in it. It used to take the Collections page, a new collection, its name and a title search, then another search per title. A lean endpoint lists the collections with whether each holds the title. Admin only, as on the title's page. Also: a collection seeded with a show is made as a show collection (Plex type 2). Measured: as a movie one it came out empty and refused the show after.
This commit is contained in:
@@ -508,6 +508,12 @@ export const plexApi = {
|
||||
const qs = u.toString();
|
||||
return req(`/api/plex/collections${qs ? `?${qs}` : ""}`);
|
||||
},
|
||||
// A movie or show card's "Add to collection": its library's manual collections, each saying whether
|
||||
// the title is in it already.
|
||||
plexCollectionsFor: (
|
||||
itemRk: string,
|
||||
): Promise<{ collections: (PlexCollection & { contains: boolean })[] }> =>
|
||||
req(`/api/plex/collections/for/${encodeURIComponent(itemRk)}`),
|
||||
// One collection's hero + its members in the requested order (the Collection info page). The sort
|
||||
// vocabulary is the browse grid's, so the same Sort control means the same thing on both.
|
||||
plexCollection: (rk: string, sort?: SortState, lang?: string): Promise<PlexCollectionDetail> => {
|
||||
|
||||
Reference in New Issue
Block a user