Fix locale issue

This allows to download multiple locales of the same language.
This commit is contained in:
oxixes 2022-03-06 20:15:01 +01:00
parent 4ac53d55f0
commit a1f89c8722

View file

@ -1200,7 +1200,7 @@ export default class Crunchy implements ServiceClass {
sxData.language = langItem;
sxData.file = langsData.subsFile(fileName as string, subsIndex, langItem);
sxData.path = path.join(this.cfg.dir.content, sxData.file);
if (files.some(a => a.type === 'Subtitle' && a.language.code == langItem.code))
if (files.some(a => a.type === 'Subtitle' && a.language.locale == langItem.locale))
continue;
if(options.dlsubs.includes('all') || options.dlsubs.includes(langItem.locale)){
const subsAssReq = await this.req.getData(subsItem.url);