Skip to content

Commit

Permalink
Fix fetcher
Browse files Browse the repository at this point in the history
  • Loading branch information
KristjanESPERANTO committed Dec 17, 2022
1 parent b279a62 commit 5dc1834
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions core/HafasFetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,6 @@ module.exports = class HafasFetcher {
constructor(config) {
this.leadTime = 20; // minutes
this.config = config;

// Possible transportation types given by profil
this.possibleTransportationTypes = profile.products.map((s) => s.id);

// Remove the excluded types from the possible types
this.config.includedTransportationTypes = getArrayDiff(
this.possibleTransportationTypes,
this.config.excludedTransportationTypes
);
}

async init() {
Expand All @@ -57,6 +48,15 @@ module.exports = class HafasFetcher {
profile,
`MMM-PublicTransportHafas v${pjson.version}`
);

// Possible transportation types given by profil
this.possibleTransportationTypes = profile.products.map((s) => s.id);

// Remove the excluded types from the possible types
this.config.includedTransportationTypes = getArrayDiff(
this.possibleTransportationTypes,
this.config.excludedTransportationTypes
);
}

getIdentifier() {
Expand Down

0 comments on commit 5dc1834

Please sign in to comment.