mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-29 16:07:40 +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,
|
id: number,
|
||||||
type: MWMediaType
|
type: MWMediaType
|
||||||
): Promise<string | undefined> {
|
): Promise<string | undefined> {
|
||||||
console.log("migrating id", id, type);
|
|
||||||
const meta = await getLegacyMetaFromId(type, id.toString());
|
const meta = await getLegacyMetaFromId(type, id.toString());
|
||||||
console.log("migrating id", meta);
|
|
||||||
|
|
||||||
if (!meta) return undefined;
|
if (!meta) return undefined;
|
||||||
const { tmdbId, imdbId } = meta;
|
const { tmdbId, imdbId } = meta;
|
||||||
|
@ -46,10 +44,8 @@ export async function migrateV2Bookmarks(old: any) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function migrateV3Videos(old: any) {
|
export async function migrateV3Videos(old: any) {
|
||||||
console.log("migrating watched");
|
|
||||||
const oldData = old;
|
const oldData = old;
|
||||||
if (!oldData) return;
|
if (!oldData) return;
|
||||||
console.log(oldData);
|
|
||||||
|
|
||||||
const updatedItems = await Promise.all(
|
const updatedItems = await Promise.all(
|
||||||
oldData.items.map(async (item: any) => {
|
oldData.items.map(async (item: any) => {
|
||||||
|
@ -77,7 +73,7 @@ export async function migrateV3Videos(old: any) {
|
||||||
);
|
);
|
||||||
|
|
||||||
const newData: WatchedStoreData = {
|
const newData: WatchedStoreData = {
|
||||||
items: updatedItems.map((item) => item.item), // Extract the "item" object
|
items: updatedItems.map((item) => item.item),
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in a new issue