From 7b8430ab65b28858bd0fd04e4b0d0af3500f4b0a Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Wed, 12 Dec 2012 19:23:59 +0000 Subject: [PATCH] * update plex notify url --- website/scripts/lib/htpc.groovy | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/website/scripts/lib/htpc.groovy b/website/scripts/lib/htpc.groovy index d19fe4b4..4dc20c63 100644 --- a/website/scripts/lib/htpc.groovy +++ b/website/scripts/lib/htpc.groovy @@ -22,19 +22,9 @@ def invokeScanVideoLibrary(host, port = 9090) { /** * Plex helpers */ -def refreshPlexLibrary(server, port = 32400, files = null) { +def refreshPlexLibrary(server, port = 32400) { _guarded { - 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 - if (files != null) { - locations = locations.findAll{ loc -> files.find{ it.path; it.path.startsWith(loc.path) }} - } - - locations*.key.unique().each{ key -> - new URL("http://$server:$port/library/sections/$key/refresh/").get() - } + new URL("http://$server:$port/library/sections/all/refresh").get() } }