diff --git a/CONTROL/control b/CONTROL/control index c221ffd..20814dd 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,9 +1,9 @@ Package: sweeper Priority: optional Section: misc -Version: 2.1.4 +Version: 2.1.4-1 Architecture: mipsel Maintainer: af123@hummypkg.org.uk -Depends: webif(>=1.3.4) +Depends: webif(>=1.3.4-3) 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 d735379..2667e84 100644 --- a/webif/plugin/sweeper/auto.hook +++ b/webif/plugin/sweeper/auto.hook @@ -461,6 +461,14 @@ proc ::sweeper::flag {ts flag folder} { return [$ts flag $flag] } +proc ::sweeper::queue {ts q folder} { + set queues [split [{queue status} $ts] ,] + if {$q eq "any" && [llength $queues]} { + return 1 + } + return $($q in $queues) +} + proc ::sweeper::lcn {ts num folder} { return [::sweeper::intcomp [$ts get channel_num] $num] } @@ -893,7 +901,7 @@ proc ::sweeper::action_unflag {ts cmd arg folder} { proc ::sweeper::action_queue {ts cmd arg folder} { log "Queued [$ts get file] for $arg" 0 if {!$::sweeper::dryrun} { - queue insert $ts $arg + {queue insert} $ts $arg } return 0 } @@ -902,9 +910,9 @@ proc ::sweeper::action_dequeue {ts cmd arg folder} { log "De-queued [$ts get file] for $arg" 0 if {!$::sweeper::dryrun} { if {$arg eq "all"} { - queue delete $ts + {queue delete} $ts } else { - queue delete $ts $arg + {queue delete} $ts $arg } } return 0 diff --git a/webif/plugin/sweeper/schema.js b/webif/plugin/sweeper/schema.js index afc6d51..a9e7442 100644 --- a/webif/plugin/sweeper/schema.js +++ b/webif/plugin/sweeper/schema.js @@ -1,4 +1,12 @@ + +var queueselect = { + decrypt: 'Decryption', + shrink: 'Shrink', + mp3: 'Audio Extraction', + mpg: 'Conversion to MPG' +}; + var schema = { criterion: { lcn: { @@ -135,6 +143,15 @@ var schema = { }, def: 'New' }, + queue: { + 'class': 'all', + type: 'select', + desc: 'Recording Queued for', + idesc: 'Recording not Queued for', + negate: true, + select: $.extend({any: '-- Anything --'}, queueselect), + def: 'any' + }, lock: { 'class': 'all', type: 'select', @@ -358,25 +375,14 @@ var schema = { 'class': 'all', argtype: 'select', desc: 'Queue recording for', - select: { - decrypt: 'Decryption', - shrink: 'Shrink', - mp3: 'Audio Extraction', - mpg: 'Conversion to MPG' - }, + select: queueselect, continues: true }, dequeue: { 'class': 'all', argtype: 'select', desc: 'De-queue recording for', - select: { - all: '-- Everything --', - decrypt: 'Decryption', - shrink: 'Shrink', - mp3: 'Audio Extraction', - mpg: 'Conversion to MPG' - }, + select: $.extend({any: '-- Everything --'}, queueselect), continues: true }, 'delete': { @@ -400,3 +406,10 @@ var schema = { } }; +function register_queue(tag, descr) +{ + schema.action.queue.select['detectads'] = 'Ad-detection'; + schema.action.dequeue.select['detectads'] = 'Ad-detection'; + schema.criterion.queue.select['detectads'] = 'Ad-detection'; +} +