Add lastPlayedAt in watchlists & sort nextup with it

This commit is contained in:
2025-04-08 16:30:35 +02:00
parent d8566355bb
commit 67d7643261
5 changed files with 1856 additions and 2 deletions
+1
View File
@@ -0,0 +1 @@
ALTER TABLE "kyoo"."watchlist" ADD COLUMN "last_played_at" timestamp with time zone;
File diff suppressed because it is too large Load Diff
+7
View File
@@ -134,6 +134,13 @@
"when": 1744053556621,
"tag": "0018_history",
"breakpoints": true
},
{
"idx": 19,
"version": "7",
"when": 1744120518941,
"tag": "0019_nextup",
"breakpoints": true
}
]
}
+2 -2
View File
@@ -36,10 +36,10 @@ const nextupSort = Sort(
started: watchlist.startedAt,
added: watchlist.createdAt,
updated: watchlist.updatedAt,
lastPlayed: watchlist.lastPlayedAt,
},
{
default: ["updated"],
default: ["lastPlayed"],
tablePk: entries.pk,
},
);
+1
View File
@@ -30,6 +30,7 @@ export const watchlist = schema.table(
score: integer(),
startedAt: timestamp({ withTimezone: true, mode: "string" }),
lastPlayedAt: timestamp({ withTimezone: true, mode: "string" }),
completedAt: timestamp({ withTimezone: true, mode: "string" }),
createdAt: timestamp({ withTimezone: true, mode: "string" })