forked from hummypkg/webif
Make {system dlnaurl} handle any valid pathname for a file
This commit is contained in:
parent
68d9d7f5b5
commit
e79e85af81
@ -215,8 +215,8 @@ proc entry {file} {{i 0}} {
|
||||
|
||||
# Indexed
|
||||
set dlna 0
|
||||
if {$::dlnaok && $::model eq "HDR" && [llength [
|
||||
system dlnaurl [file normalize $file]]]} {
|
||||
if {$::dlnaok && $::model eq "HDR" &&
|
||||
[llength [system dlnaurl $file]]} {
|
||||
icon "/img/dlna.png" "Indexed by DLNA Server"
|
||||
set dlna 1
|
||||
}
|
||||
|
@ -270,6 +270,10 @@ proc {system dlnadb} {} {
|
||||
|
||||
proc {system _dlnaurl} {file urlbase} {
|
||||
set mime "video/mp2t"
|
||||
set nfile $file
|
||||
if {![catch {set nfile [file normalize $file]}]} {
|
||||
set file $nfile
|
||||
}
|
||||
if {[catch {set db [sqlite3.open [system dlnadb]]}]} {
|
||||
return {}
|
||||
}
|
||||
|
@ -331,7 +331,7 @@ ts method setgenre {newgenre} {
|
||||
}
|
||||
|
||||
ts method dlnaloc {{urlbase ""}} {
|
||||
return [system dlnaurl [file normalize $file] $urlbase]
|
||||
return [system dlnaurl $file $urlbase]
|
||||
}
|
||||
|
||||
ts method cleanbmp {} {
|
||||
|
Loading…
Reference in New Issue
Block a user