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
|
# Indexed
|
||||||
set dlna 0
|
set dlna 0
|
||||||
if {$::dlnaok && $::model eq "HDR" && [llength [
|
if {$::dlnaok && $::model eq "HDR" &&
|
||||||
system dlnaurl [file normalize $file]]]} {
|
[llength [system dlnaurl $file]]} {
|
||||||
icon "/img/dlna.png" "Indexed by DLNA Server"
|
icon "/img/dlna.png" "Indexed by DLNA Server"
|
||||||
set dlna 1
|
set dlna 1
|
||||||
}
|
}
|
||||||
|
@ -270,6 +270,10 @@ proc {system dlnadb} {} {
|
|||||||
|
|
||||||
proc {system _dlnaurl} {file urlbase} {
|
proc {system _dlnaurl} {file urlbase} {
|
||||||
set mime "video/mp2t"
|
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]]}]} {
|
if {[catch {set db [sqlite3.open [system dlnadb]]}]} {
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
|
@ -331,7 +331,7 @@ ts method setgenre {newgenre} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ts method dlnaloc {{urlbase ""}} {
|
ts method dlnaloc {{urlbase ""}} {
|
||||||
return [system dlnaurl [file normalize $file] $urlbase]
|
return [system dlnaurl $file $urlbase]
|
||||||
}
|
}
|
||||||
|
|
||||||
ts method cleanbmp {} {
|
ts method cleanbmp {} {
|
||||||
|
Loading…
Reference in New Issue
Block a user