Skip to content

Commit

Permalink
fix: filter got overwrote
Browse files Browse the repository at this point in the history
  • Loading branch information
geekdada committed Sep 2, 2019
1 parent 172f97e commit c4ad444
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,12 @@ export async function generate(

const file: ProviderConfig = require(filePath);

customFilters.netflixFilter = file.netflixFilter || defaultNetflixFilter;
customFilters.youtubePremiumFilter = file.youtubePremiumFilter || defaultYoutubePremiumFilter;
if (!customFilters.netflixFilter) {
customFilters.netflixFilter = file.netflixFilter || defaultNetflixFilter;
}
if (!customFilters.youtubePremiumFilter) {
customFilters.youtubePremiumFilter = file.youtubePremiumFilter || defaultYoutubePremiumFilter;
}

assert(file.type, 'You must specify a type.');

Expand Down

0 comments on commit c4ad444

Please sign in to comment.