Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintenance update #201

Merged
merged 6 commits into from
Feb 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{
"env": {
"browser": true,
"es2022": true,
"es2023": true,
"node": true
},
"extends": [
"airbnb-base",
"plugin:json/recommended",
"plugin:jsonc/recommended-with-json",
"plugin:prettier/recommended"
],
"globals": {
"config": true
},
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
Expand Down
6 changes: 4 additions & 2 deletions BvgFetcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = class BvgFetcher {
let when;

if (this.config.travelTimeToStation > 0) {
when = new Date();
when = new Date(Date.now());
when.setTime(
Date.now() + this.config.travelTimeToStation * 60000 - 5 * 60000
);
Expand Down Expand Up @@ -97,7 +97,9 @@ module.exports = class BvgFetcher {
}

// If log level is set to debug print infos about departures
if (config.logLevel.includes("DEBUG")) this.printDeparture(row); // eslint-disable-line no-undef
if (config.logLevel.includes("DEBUG")) {
BvgFetcher.printDeparture(row);
}

if (
!this.config.excludedTransportationTypes.includes(row.line.product) &&
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MMM-PublicTransportBerlin

MMM-PublicTransportBerlin is a module for the [MagicMirror](https://github.com/MichMich/MagicMirror) project by [Michael Teeuw](https://github.com/MichMich).
MMM-PublicTransportBerlin is a module for the [MagicMirror](https://github.com/MagicMirrorOrg/MagicMirror) project by [Michael Teeuw](https://github.com/MichMich).

It shows live public transport information for Berlin and Brandenburg based on [BVG-Hafas](https://github.com/derhuerst/bvg-rest) data. Public transport in Brandenburg should work as well.

Expand Down
Loading
Loading