fix: adding default to uris

This commit is contained in:
Chubby Granny Chaser 2024-08-18 03:38:12 +01:00
parent 73a12488cd
commit 76d3fead66
No known key found for this signature in database

View File

@ -15,10 +15,17 @@ export class RepacksManager {
}, },
}) })
.then((repacks) => .then((repacks) =>
repacks.map((repack) => ({ repacks.map((repack) => {
...repack, const uris: string[] = [];
uris: JSON.parse(repack.uris), const magnet = repack?.magnet;
}))
if (magnet) uris.push(magnet);
return {
...repack,
uris: [...uris, ...JSON.parse(repack.uris)],
};
})
); );
for (let i = 0; i < this.repacks.length; i++) { for (let i = 0; i < this.repacks.length; i++) {