update dedup

git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@926 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2012-04-14 21:31:25 +00:00
parent 52728ba471
commit 6ab9318fa9
6 changed files with 15 additions and 8 deletions

View File

@ -1,7 +1,7 @@
Package: webif
Priority: optional
Section: web
Version: 0.9.5-1
Version: 0.9.5-2
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
Depends: webif-channelicons,mongoose(>=3.0-7),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73),jim-cgi(>=0.5),service-control(>=1.2),busybox(>=1.19.3-1),lsof,epg(>=1.0.9),hmt(>=1.1.6),ssmtp,anacron,trm,openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.1)

View File

@ -35,6 +35,9 @@ foreach dir $dirs {
puts -nonewline "$base -> "
switch $stat {
inuse {
puts -nonewline "In Use"
}
dup {
puts -nonewline "Duplicate"
if {$doit} {

View File

@ -46,6 +46,9 @@ foreach file [readdir $dir] {
puts "<td>$syn</td>"
puts "<td>"
switch $stat {
inuse {
puts -nonewline "In Use"
}
dup {
puts -nonewline "Duplicate"
if {$doit} {

View File

@ -3,6 +3,7 @@
set dedup_prefixes {
{^new series\.* *}
{^cbeebies\.* *}
{^cbbc\.* *}
{^brand new series *-* *}
{^\.+}
}

View File

@ -1,5 +1,7 @@
#!/mod/bin/jimsh
require system.class
proc dedupprocess {file} {{seen {}}} {
set ts [ts fetch $file 1]
set dir [file dirname $file]
@ -7,9 +9,12 @@ proc dedupprocess {file} {{seen {}}} {
set syn [dedupnormalise [$ts get synopsis] [$ts get title]]
# Escape special characters to create the filename.
regsub -all -- {[\/ &]} $syn "_" fn
regsub -all -- {[?]} $fn "" fn
set stat ok
if {$fn in $seen} {
if {[system inuse [file rootname $file]]} {
set stat inuse
} elseif {$fn in $seen} {
set stat dup
} elseif {[string length $syn] > 40} {
set stat error

View File

@ -12,12 +12,7 @@ cgi_input
set slot [cgi_get sid 0]
set table [cgi_get table TBL_RESERVATION]
set folder [cgi_get name -]
if {$folder eq "-"} {
puts "Error - no folder."
exit
}
set folder [cgi_get name ""]
set event [rsv slot $table $slot]
$event clear_ulslot