mirror of
https://github.com/anidl/multi-downloader-nx.git
synced 2026-03-11 17:45:30 +00:00
Fixed duplicate episode entries in archive
This commit is contained in:
parent
dbf1640c1b
commit
a87c345fdc
2 changed files with 8 additions and 2 deletions
|
|
@ -95,7 +95,13 @@ const downloaded = (kind: {
|
|||
addToArchive(kind, ID);
|
||||
data = loadData(); // Load updated version
|
||||
}
|
||||
(kind.service == 'crunchy' ? data[kind.service][kind.type] : data[kind.service][kind.type]).find(a => a.id === ID)?.already.push(...episode);
|
||||
|
||||
const archivedata = (kind.service == 'crunchy' ? data[kind.service][kind.type] : data[kind.service][kind.type]);
|
||||
const alreadyData = archivedata.find(a => a.id === ID)?.already;
|
||||
for (const ep of episode) {
|
||||
if (alreadyData?.includes(ep)) continue;
|
||||
alreadyData?.push(ep);
|
||||
}
|
||||
fs.writeFileSync(archiveFile, JSON.stringify(data, null, 4));
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "multi-downloader-nx",
|
||||
"short_name": "aniDL",
|
||||
"version": "4.3.0b6",
|
||||
"version": "4.3.0b7",
|
||||
"description": "Downloader for Crunchyroll, Funimation, or Hidive via CLI or GUI",
|
||||
"keywords": [
|
||||
"download",
|
||||
|
|
|
|||
Loading…
Reference in a new issue