feat(player): a bookmark reopens every player as it was, once
The Plex player names the playlist it plays through (v=player:<id>:playlist:<pid>), so a bookmark rebuilds the queue from the playlist's own order while the item is still in it. Found in the browser and fixed: - after a reload the shell's player opened a second one over Home and the feed: it read the catalog row the page had fetched (a disabled query still reads the shared cache); it now waits for ready. - every reload under an open overlay left a dead history step: the first overlay to open takes over the entry the document was loaded on. - the feed's address was implicit, the same as the start-page landing, so a reloaded or bookmarked feed opened as Home: the feed now names itself (page=feed) like every page. - a linked file or video that is gone was said, but stayed in the address and was said again on every reload: its keys are taken off. The overlay address is written in one place (the entry is named once it is current), and the player keys only the codec reads are no longer exported.
This commit is contained in:
@@ -57,6 +57,16 @@ describe("plexParamUpdates", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("writes an unsorted view as such, so a link to it is not sorted by the remembered sort", () => {
|
||||
const unsorted = { ...BASE, sort: null };
|
||||
expect(plexParamUpdates(unsorted).psort).toBe("none");
|
||||
const back = plexParamsToState(applyUpdates(plexParamUpdates(unsorted)), {
|
||||
...BASE,
|
||||
sort: { key: "year", dir: "desc" },
|
||||
});
|
||||
expect(back?.sort).toBeNull();
|
||||
});
|
||||
|
||||
it("a link to the default view opens it over another remembered one", () => {
|
||||
const params = applyUpdates(plexParamUpdates(BASE));
|
||||
const back = plexParamsToState(params, {
|
||||
|
||||
Reference in New Issue
Block a user