diff --git a/webif/html/browse/index.jim b/webif/html/browse/index.jim index 8e6f27c..7fa05fc 100755 --- a/webif/html/browse/index.jim +++ b/webif/html/browse/index.jim @@ -142,7 +142,7 @@ proc entry {file} {{i 0}} { if {[$ts get definition] eq ""} { set type gen set ts 0 - set img Video_Other + set img Video_Other set omenu oopt } else { set omenu opt @@ -338,8 +338,19 @@ proc s_size {a b} { tailcall s_file_stat $a $b size } +proc s_ext {a b} { + set at [file extension $a] + set bt [file extension $b] + if {$at == $bt} { + return [string compare -nocase $a $b] + } else { + return [string compare -nocase $at $bt] + } +} + set files [readdir -nocomplain $dir] switch $order { + 5 { set files [lsort -command s_ext $files] } 1 { set files [lsort -command s_time $files] } 2 { set files [lreverse [lsort -command s_time $files]] } 3 { set files [lsort -command s_size $files] } @@ -351,19 +362,20 @@ set dinuse [system dirinuse $dir] foreach file $files { entry "$dir/$file" } puts " -Select all | none - -Directories: $dircount, Files: $filecount +Select: All | None + Folders: $dircount, Files: $filecount " # Sort icons puts "