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() } }