PDA

View Full Version : [Fixed] Multiple incomplete tags


molder
05-31-2006, 09:12 PM
i reinstalled a new copy of my iobanana files, because in my first time with him, i changed somethings than not need.
But now iob are creating multiples incomplete tags, one for everyone file uploaded.
like:
[10% Incomplete with 1F]
[20% Incomplete with 2F]

and etc
How can fix it?
Thanks guys.

Harm
06-01-2006, 10:24 AM
Are you using raided dirs? Have you edited the dirtag format in any way?

molder
06-01-2006, 10:38 AM
i am not using raided dirs. yes i edited the format of dirtag:

###; Create dirtag
if {$complete==2} {
set size 0
foreach group $groups {set size [expr $size + [lindex $group end-2]]}
while {[catch {file stat $realdir timestats}]} {after 5}
set time [expr [clock seconds] - $timestats(ctime)]
if {$time==0} {set time 1}
if {[file exists [file join $realdir ".ioFTPD.mp3"]]} {
set mp3info [split [getio "$realdir" "mp3"] |]
createtag "$realdir" "\[$ioB(ssn)\] - \( [getsize $size] ${valid}F - COMPLETE - [lindex $mp3info 4] [lindex $mp3info 7] \) - \[$ioB(ssn)\]"
} else {
createtag "$realdir" "\[$ioB(ssn)\] - \( [getsize $size] ${valid}F - COMPLETE \) - \[$ioB(ssn)\]"
}
} else {
createtag "$realdir" "\[[format %.0f [expr [expr double($valid) / double($files)] *100.0]]% Incomplete With ${valid}F\]"
}

It's okay?
Thx Harm ;)

Harm
06-01-2006, 11:09 AM
It's ok as long as you also edit the proc that's supposed to remove the previous dirtags :P

Try the following piece of code (which shouldn't be far away from proc createtag in ioTOOLKIT.itcl):
proc deletetag {path} {
global ioB
set dirs [glob -nocomplain -types d -directory $path "*"]
foreach dir $dirs {
if {[string match "*$ioB(ssn)*" $dir]} {
catch {file delete -force $dir}
}
}
}

Keep in mind that this will delete all directories containing your short site name. It shouldn't be too hard to create a safer matching pattern though.

molder
06-01-2006, 11:52 AM
Harm i checked my ioTOOLKIT.itcl and cant found the proc deletetag, then i copied all your proc and paste it near to proc createtag. But the problem continue, when i try to delete a dir, say the dir not is empty and in the dir have the tagdir.
The proc deletetag exist or need be created, because in ioTOOLKIT.itcl i cant found it.
Thx harm for help me.

Harm
06-01-2006, 12:02 PM
This part of the code may have changed a bit since release 1. Could you join #ioBanana @ EFNet?