Make {system dlnaurl} handle any valid pathname for a file

This commit is contained in:
df 2021-03-15 13:25:44 +00:00
parent 68d9d7f5b5
commit e79e85af81
3 changed files with 7 additions and 3 deletions

View File

@ -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
}

View File

@ -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 {}
}

View File

@ -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 {} {