mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-05-21 14:46:29 -04:00
Fix tests
This commit is contained in:
@@ -8,6 +8,12 @@ export const bubbleVideo: Video = {
|
||||
rendering: "459429fa062adeebedcc2bb04b9965de0262bfa453369783132d261be79021bd",
|
||||
part: null,
|
||||
version: 1,
|
||||
guess: {
|
||||
kind: "movie",
|
||||
title: "bubble",
|
||||
year: [2022],
|
||||
from: "guessit",
|
||||
},
|
||||
createdAt: "2024-11-23T15:01:24.968Z",
|
||||
updatedAt: "2024-11-23T15:01:24.968Z",
|
||||
};
|
||||
|
||||
@@ -8,6 +8,12 @@ export const dune1984Video: Video = {
|
||||
rendering: "ea3a0f8f2f2c5b61a07f61e4e8d9f8e01b2b92bcbb6f5ed1151e1f61619c2c0f",
|
||||
part: null,
|
||||
version: 1,
|
||||
guess: {
|
||||
kind: "movie",
|
||||
title: "dune",
|
||||
year: [1984],
|
||||
from: "guessit",
|
||||
},
|
||||
createdAt: "2024-12-02T11:45:12.968Z",
|
||||
updatedAt: "2024-12-02T11:45:12.968Z",
|
||||
};
|
||||
|
||||
@@ -8,6 +8,12 @@ export const duneVideo: Video = {
|
||||
rendering: "f1953a4fb58247efb6c15b76468b6a9d13b4155b02094863b1a4f0c3fbb6db58",
|
||||
part: null,
|
||||
version: 1,
|
||||
guess: {
|
||||
kind: "movie",
|
||||
title: "dune",
|
||||
year: [2021],
|
||||
from: "guessit",
|
||||
},
|
||||
createdAt: "2024-12-02T10:10:24.968Z",
|
||||
updatedAt: "2024-12-02T10:10:24.968Z",
|
||||
};
|
||||
|
||||
@@ -78,9 +78,10 @@ export const sortToSql = <
|
||||
T extends string[],
|
||||
Remap extends Partial<Record<T[number], string>>,
|
||||
>(
|
||||
sort: Sort<T, Remap>,
|
||||
sort: Sort<T, Remap> | undefined,
|
||||
table: Table<Sort<T, Remap>["sort"][number]["key"] | "pk">,
|
||||
) => {
|
||||
if (!sort) return [];
|
||||
if (sort.random) {
|
||||
return [sql`md5(${sort.random.seed} || ${table.pk})`];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user