From cebcb3f92fcf065c11ffa821f980402277ef02dd Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 12 Dec 2012 09:32:22 +0000 Subject: [PATCH] * support newer plex http api --- website/scripts/cleaner.groovy | 2 +- website/scripts/lib/htpc.groovy | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/website/scripts/cleaner.groovy b/website/scripts/cleaner.groovy index 9d2f6ff4..482eeb3d 100644 --- a/website/scripts/cleaner.groovy +++ b/website/scripts/cleaner.groovy @@ -9,7 +9,7 @@ def isClutter(f) { def maxsize = tryQuietly{ maxsize as Long } ?: 100 * 1024 * 1024 // path contains blacklisted terms or extension is blacklisted - return f.extension ==~ "(?i)($exts)" || (f.path =~ "(?i)\\b($terms)\\b" && f.length() < maxsize) + return (f.extension ==~ "(?i)($exts)" || f.path =~ "(?i)\\b($terms)\\b") && f.length() < maxsize } diff --git a/website/scripts/lib/htpc.groovy b/website/scripts/lib/htpc.groovy index 26d3bed7..d19fe4b4 100644 --- a/website/scripts/lib/htpc.groovy +++ b/website/scripts/lib/htpc.groovy @@ -24,7 +24,7 @@ def invokeScanVideoLibrary(host, port = 9090) { */ def refreshPlexLibrary(server, port = 32400, files = null) { _guarded { - def sections = new URL("http://$server:$port/plex").getXml() + def sections = new URL("http://$server:$port/library/sections/").getXml() def locations = sections.Directory.Location.collect{ [path:it.'@path', key:it.parent().'@key'] } // limit refresh locations