Skip to content

Commit

Permalink
fix: Invalid download cache
Browse files Browse the repository at this point in the history
  • Loading branch information
nepsyn committed Jan 13, 2025
1 parent 228511d commit ad92024
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions mikan.parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,11 +260,13 @@ export class MikanParser implements PluginSourceParser, MinaPlayPluginHooks {
return false;
}
if (typeof no === 'string' && !this.cache.get(id).has(no)) {
this.cache.get(id).add(no);
const episode = await this.episodeRepo.findOneBy({
no,
series: { name: ctx.meta['name'], ...(ctx.meta['session'] ? { session: ctx.meta['session'] } : undefined) },
});
if (episode) {
this.cache.get(id).add(no);
}
return !episode;
}
return false;
Expand Down Expand Up @@ -296,6 +298,6 @@ const MIKAN_RULE_TEMPLATE = (id: string | number, name: string, season: string |
name: ${JSON.stringify(name)},
session: ${JSON.stringify(season)},
include: [],
exclude: ["CR"],
exclude: ["CR", "B-Global"],
},
}`;
2 changes: 1 addition & 1 deletion mikan.plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const icon =
@MinaPlayPlugin({
id: 'mikan',
icon,
version: '1.0.3',
version: '1.0.4',
supportVersion: '^0.2.5',
description: 'Mikan support in MinaPlay',
author: 'MinaPlay',
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "minaplay-plugin-mikan",
"version": "1.0.3",
"version": "1.0.4",
"description": "Mikan plugin for minaplay",
"type": "module",
"scripts": {
Expand Down

0 comments on commit ad92024

Please sign in to comment.