mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-20 14:37:43 +01:00
cleanup
This commit is contained in:
parent
9fbba7ea55
commit
e0bf711a79
1 changed files with 1 additions and 5 deletions
|
@ -8,9 +8,7 @@ async function migrateId(
|
|||
id: number,
|
||||
type: MWMediaType
|
||||
): Promise<string | undefined> {
|
||||
console.log("migrating id", id, type);
|
||||
const meta = await getLegacyMetaFromId(type, id.toString());
|
||||
console.log("migrating id", meta);
|
||||
|
||||
if (!meta) return undefined;
|
||||
const { tmdbId, imdbId } = meta;
|
||||
|
@ -46,10 +44,8 @@ export async function migrateV2Bookmarks(old: any) {
|
|||
}
|
||||
|
||||
export async function migrateV3Videos(old: any) {
|
||||
console.log("migrating watched");
|
||||
const oldData = old;
|
||||
if (!oldData) return;
|
||||
console.log(oldData);
|
||||
|
||||
const updatedItems = await Promise.all(
|
||||
oldData.items.map(async (item: any) => {
|
||||
|
@ -77,7 +73,7 @@ export async function migrateV3Videos(old: any) {
|
|||
);
|
||||
|
||||
const newData: WatchedStoreData = {
|
||||
items: updatedItems.map((item) => item.item), // Extract the "item" object
|
||||
items: updatedItems.map((item) => item.item),
|
||||
};
|
||||
|
||||
return {
|
||||
|
|
Loading…
Reference in a new issue