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) =>
repacks.map((repack) => ({
...repack,
uris: JSON.parse(repack.uris),
}))
repacks.map((repack) => {
const uris: string[] = [];
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++) {