From ab317b57be26bab0a41660906b1bcc30681143db Mon Sep 17 00:00:00 2001 From: hummypkg Date: Sun, 19 Apr 2015 22:01:07 +0000 Subject: [PATCH] update for scansingledir hook --- CONTROL/control | 4 ++-- webif/plugin/sweeper/auto.hook | 13 +++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CONTROL/control b/CONTROL/control index 6e99b8d..1ca0cd3 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,9 +1,9 @@ Package: sweeper Priority: optional Section: misc -Version: 2.0.7-6 +Version: 2.0.7-7 Architecture: mipsel Maintainer: af123@hummypkg.org.uk -Depends: webif(>=1.0.16) +Depends: webif(>=1.2.2-6) Description: Sweeper is a package for managing recordings in a variety of ways using custom rules [See forum for details] Tags: http://hummy.tv/forum/threads/5138/ diff --git a/webif/plugin/sweeper/auto.hook b/webif/plugin/sweeper/auto.hook index 3d5226b..aab765f 100644 --- a/webif/plugin/sweeper/auto.hook +++ b/webif/plugin/sweeper/auto.hook @@ -859,7 +859,16 @@ proc ::sweeper::scan {&files} { } } -if {[file exists $::sweeper::cf]} { - register postdecryptscan ::sweeper::scan +proc ::sweeper::scansingledir {dir} { + if {$dir eq $::root} { + ::sweeper::apply $::root $::sweeper::cf + } elseif {[file exists "$dir/.sweeper"]} { + ::sweeper::apply $dir "$dir/.sweeper" + } +} + +if {[file exists $::sweeper::cf]} { + register postdecryptscan ::sweeper::scan + register postdecryptsingledir ::sweeper::scansingledir }