Added scrobbling detection for Plex via polling.
This commit is contained in:
33
config/configuration.js
Normal file
33
config/configuration.js
Normal file
@@ -0,0 +1,33 @@
|
||||
const config = require('config');
|
||||
|
||||
const configuration = {
|
||||
plex: {
|
||||
url: null,
|
||||
token: null
|
||||
},
|
||||
scrobble: {
|
||||
percent: null,
|
||||
duration: null
|
||||
},
|
||||
web: {
|
||||
host: null,
|
||||
port: null
|
||||
}
|
||||
};
|
||||
|
||||
if (config.has("plex.url"))
|
||||
configuration.plex.url = config.get("plex.url");
|
||||
if (config.has("plex.token"))
|
||||
configuration.plex.token = config.get("plex.token");
|
||||
|
||||
if (config.has("scrobble.duration"))
|
||||
configuration.scrobble.duration = config.get("scrobble.duration");
|
||||
if (config.has("scrobble.percent"))
|
||||
configuration.scrobble.percent = config.get("scrobble.percent");
|
||||
|
||||
if (config.has("web.host"))
|
||||
configuration.web.host = config.get("web.host");
|
||||
if (config.has("web.port"))
|
||||
configuration.web.port = config.get("web.port");
|
||||
|
||||
module.exports = configuration;
|
||||
Reference in New Issue
Block a user