mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-20 14:37:43 +01:00
Merge pull request #855 from MemeCornucopia/orderFix
Fixed Sorting Shows
This commit is contained in:
commit
e9e2f3f470
1 changed files with 7 additions and 0 deletions
|
@ -87,6 +87,13 @@ export function progressResponsesToEntries(responses: ProgressResponse[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const item = items[v.tmdbId];
|
const item = items[v.tmdbId];
|
||||||
|
|
||||||
|
// Since each watched episode is a single array entry but with the same tmdbId, the root item updatedAt will only have the first episode's timestamp (which is not the newest).
|
||||||
|
// Here, we are setting it explicitly so the updatedAt always has the highest updatedAt from the episodes.
|
||||||
|
if (new Date(v.updatedAt).getTime() > item.updatedAt) {
|
||||||
|
item.updatedAt = new Date(v.updatedAt).getTime();
|
||||||
|
}
|
||||||
|
|
||||||
if (item.type === "movie") {
|
if (item.type === "movie") {
|
||||||
item.progress = {
|
item.progress = {
|
||||||
duration: Number(v.duration),
|
duration: Number(v.duration),
|
||||||
|
|
Loading…
Reference in a new issue