Andy Edgeworth
New Member
Many thanks - it works a treat!!
... Every morning these are then moved (using Robocopy) onto the Server ...
...yes but they both need to be on... As my NAS is on anyway, I like to use that.I just share my Humii with my other Humii, no NAS needed.
# If it's a film which has not yet been decrypted, stop and don't process any more rules.
genre Film flag ODEncrypted action preserve
# If it got this far then we know it has been decrypted so just check if it has been shrunk
genre Film flag Shrunk action {move Films}
flag ODEncrypted action preserve
genre Film flag Shrunk action {move Films}
duration {>= 120} flag Shrunk action {move Films}
Thanks - that's a good analysis. I've created a test case and will come up with a general solution..Sweeper has a problem with shows with accented characters in the name. I am in Finland and the name of the 7pm news is in finnish (Seitsemän Uutiset).
proc {system inuse} {file} {
# Is anything using the file?
set file [file rootname [file tail $file]]
set c 0
foreach line [split [exec /mod/bin/lsof] "\n"] {
#map control characters -> their ascii equivalent
set line [string map { \\xc3\\xa4 ä} $line]
if {[string first $file $line] >= 0} { incr c }
}
if {$c > 0} { return 1 }
return 0
}
...
if {![exists -proc binary]} { package require binary }
...
proc {system inuse} {file} {
# Is anything using the file?
set file [file rootname [file tail $file]]
# Escape any unicode characters to match lsof output.
foreach range [lreverse [\
regexp -inline -indices -all -- {[\x80-\xff]} $file]] {
set i [lindex $range 0]
binary scan [string index $file $i] H2 hex
set file [string replace $file $i $i "\\x$hex"]
}
set c 0
foreach line [split [exec /mod/bin/lsof] "\n"] {
if {[string first $file $line] >= 0} { incr c }
}
if {$c > 0} { return 1 }
return 0
}
Thanks for the confirmation! riku2 deserves the credit for finding the issue and the exact cause and prompting me to fix it. I still need to look at general support for unicode/utf-8 at some point but it hasn't approached the top of the list yet....Sweeper working with É ! Thanks.