diff --git a/CONTROL/control b/CONTROL/control
index e5e8bf4..766fc3f 100644
--- a/CONTROL/control
+++ b/CONTROL/control
@@ -1,9 +1,9 @@
Package: sweeper
Priority: optional
Section: misc
-Version: 1.0.14
+Version: 1.0.15
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
-Depends: webif(>=1.0.14-3)
+Depends: webif(>=1.0.14-4)
Description: Automatically manage single recording files. [Web Interface. Multi-folder support.]
Tags: http://hummy.tv/forum/threads/3843/
diff --git a/etc/sweeper.conf b/etc/sweeper.conf
index 13e18ee..b79dc43 100644
--- a/etc/sweeper.conf
+++ b/etc/sweeper.conf
@@ -1,4 +1,12 @@
-# Example to move all one-off recordings into a directory called 'misc'
-# and create it if it doesn't already exist. Remove the # from the start
-# of the next line to enable it.
-#action {movecreate "misc"}
+# Move any Children's films (by length)
+## lcn {>= 70} lcn {<= 79} duration {>= 90} action {move Children/Films}
+# Move any Children's films (by genre)
+## lcn {>= 70} lcn {<= 79} genre Film action {move Children/Films}
+# Move anything else recorded from a children's channel
+## lcn {>= 70} lcn {<= 79} action {move Children/Miscellaneous}
+# Move any series recordings from a Children's channel (folder rule)
+## folder lcn {>= 70} lcn {<= 79} action {fileundercreate Children}
+# Move any one-off Formula 1 recordings into the F1 folder
+## title {Formula 1} action {move F1}
+# Move any one-off recordings into a folder called Misc after a while
+## age {> 120} action {movecreate Misc}
diff --git a/ignore:sync b/ignore:sync
index 3eb7c92..b513717 100755
--- a/ignore:sync
+++ b/ignore:sync
@@ -3,5 +3,6 @@
for f in webif/plugin/sweeper/; do
rsync -avr --delete --exclude=.svn humax:/mod/$f ./$f
done
+[ -f webif/plugin/sweeper/.raw ] && rm -f webif/plugin/sweeper/.raw
diff --git a/webif/plugin/sweeper/save.jim b/webif/plugin/sweeper/save.jim
index dd23042..7d4a228 100755
--- a/webif/plugin/sweeper/save.jim
+++ b/webif/plugin/sweeper/save.jim
@@ -34,7 +34,11 @@ if {$dir eq "" || $dir eq $root} {
}
}
-set data [cgi_get data "-"]
+set data [string map {
+ & &
+ < <
+ > >
+} [cgi_get data "-"]]
if {$data eq "-" || $data eq ""} {
if {[file exists $cf]} { file delete $cf }
diff --git a/webif/plugin/sweeper/schema.js b/webif/plugin/sweeper/schema.js
index cd91d9b..c57a65b 100644
--- a/webif/plugin/sweeper/schema.js
+++ b/webif/plugin/sweeper/schema.js
@@ -68,7 +68,7 @@ var schema = {
Unclassified: 'Unclassified',
Film: 'Film',
Children: 'Children',
- 'News & Factual': 'News & Factual',
+ 'News & Factual': 'News & Factual',
Entertainment: 'Entertainment',
Sport: 'Sport',
Education: 'Education',
diff --git a/webif/plugin/sweeper/script.js b/webif/plugin/sweeper/script.js
index f86037d..47f585a 100644
--- a/webif/plugin/sweeper/script.js
+++ b/webif/plugin/sweeper/script.js
@@ -86,7 +86,7 @@ var getters = {
for (key in c)
if (c[key] == a)
return key;
- return 'UNKNOWN (' + a + ')';
+ return 'UNKNOWNKEY (' + a + ')';
}
};
@@ -102,7 +102,7 @@ function ruleconf(rule)
rule.find('tr.clause').each(function(i) {
cmd = $(this).find('th.cmd').attr('cmd');
c = schema.criterion[cmd];
- val = $.trim($(this).find('td.val').text());
+ val = $.trim($(this).find('td.val').html());
if (getters[c.type])
val = getters[c.type](cmd, val);
@@ -331,7 +331,7 @@ function edit_select(obj, title, options, val, callback)
$('#edit_select_field').empty();
$.each(options, function(k, v) {
$('#edit_select_field').append(
- $('').attr('value', k).text(v)
+ $('').attr('value', k).html(v)
);
});
if (val && val != '')
@@ -362,7 +362,8 @@ function edit_clause(obj)
{
var cmd = $(obj).find('th.cmd').attr('cmd');
var target = $(obj).find('td.val');
- var val = $.trim($(target).text());
+ var tval = $.trim($(target).text());
+ var val = $.trim($(target).html());
var title = $(obj).find('th.cmd').html();
if (!schema.criterion[cmd])
{
@@ -371,22 +372,23 @@ function edit_clause(obj)
}
switch (schema.criterion[cmd].type)
{
+ case 'string':
case 'substr':
- edit_text(target, title, val, function(obj, text) {
- $(obj).text(text);
+ edit_text(target, title, tval, function(obj, text) {
+ $(obj).html(text);
rulerefresh($(obj).closest('div.rule'));
changed(1);
});
break;
case 'int':
- b = val.split(" ");
+ b = tval.split(" ");
if (b.length != 2)
{
alert('Bad int value');
break;
}
edit_int(target, title, b[0], b[1], function(obj, op, val) {
- $(obj).text(op + ' ' + val);
+ $(obj).html(op + ' ' + val);
rulerefresh($(obj).closest('div.rule'));
changed(1);
});
@@ -394,7 +396,7 @@ function edit_clause(obj)
case 'select':
edit_select(target, title, schema.criterion[cmd].select,
getters.select(cmd, val), function(obj, val) {
- $(obj).text(setters.select(cmd, val));
+ $(obj).html(setters.select(cmd, val));
rulerefresh($(obj).closest('div.rule'));
changed(1);
});