Browse Source

Bugfix: if there is no season, they put 0 instead of 1. Let's correct that

Godzil 4 years ago
parent
commit
f26ea70ef8
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/episode.ts

+ 2 - 0
src/episode.ts

@@ -396,6 +396,8 @@ function scrapePage(config: IConfig, address: string, done: (err: Error, page?:
       if (pageMetadata.partOfSeason)
       {
         seasonNumber = pageMetadata.partOfSeason.seasonNumber;
+        if (seasonNumber === '0') { seasonNumber = '1'; }
+
         seasonTitle = pageMetadata.partOfSeason.name;
       }
       done(null, vlos.getMedia(script, seasonTitle, seasonNumber));