Added basic filtering to Plex scrobbling detection.
This commit is contained in:
@@ -6,8 +6,21 @@ const configuration = {
|
||||
token: null
|
||||
},
|
||||
scrobble: {
|
||||
percent: null,
|
||||
duration: null
|
||||
minimum: {
|
||||
percent: null,
|
||||
duration: null
|
||||
},
|
||||
plex: {
|
||||
delay: null,
|
||||
filters: []
|
||||
/* A filter will have the following properties:
|
||||
library: [""],
|
||||
ip: [""],
|
||||
deviceId: [""],
|
||||
platform: [""],
|
||||
product: [""]
|
||||
*/
|
||||
},
|
||||
},
|
||||
web: {
|
||||
host: null,
|
||||
@@ -20,10 +33,15 @@ if (config.has("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("scrobble.plex.delay"))
|
||||
configuration.scrobble.plex.delay = config.get("scrobble.plex.delay");
|
||||
if (config.has("scrobble.plex.filters"))
|
||||
configuration.scrobble.plex.filters = config.get("scrobble.plex.filters");
|
||||
|
||||
if (config.has("scrobble.minimum.duration"))
|
||||
configuration.scrobble.minimum.duration = config.get("scrobble.minimum.duration");
|
||||
if (config.has("scrobble.minimum.percent"))
|
||||
configuration.scrobble.minimum.percent = config.get("scrobble.minimum.percent");
|
||||
|
||||
if (config.has("web.host"))
|
||||
configuration.web.host = config.get("web.host");
|
||||
|
||||
Reference in New Issue
Block a user