* support newer plex http api

This commit is contained in:
Reinhard Pointner 2012-12-12 09:32:22 +00:00
parent cfa959cd38
commit cebcb3f92f
2 changed files with 2 additions and 2 deletions

View File

@ -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
}

View File

@ -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