Remove invalid use of video/ts MIME type

This commit is contained in:
df 2021-02-12 14:28:05 +00:00
parent 346ed469c8
commit 20c035873e
2 changed files with 6 additions and 3 deletions

View File

@ -10,7 +10,7 @@ set urlbase [cgi_get base ""]
# Default to just downloading the raw file.
set url $file
set mime "video/ts"
set mime "video/mp2t"
if {[string match {*.ts} $file]} {
if {![catch {set ts [ts fetch $file]}]} {

View File

@ -269,7 +269,7 @@ proc {system dlnadb} {} {
}
proc {system _dlnaurl} {file urlbase} {
set mime "video/ts"
set mime "video/mp2t"
if {[catch {set db [sqlite3.open [system dlnadb]]}]} {
return {}
}
@ -278,7 +278,10 @@ proc {system _dlnaurl} {file urlbase} {
from tblresource join tblmedia using (mediaid)
where localurl = '%s'} $file]
if {[llength $muri]} {
lassign [lindex $muri 0] x mime x xuri
lassign [lindex $muri 0] x maybemime x xuri
if {$maybemime ne "video/ts"} {
set mime $maybemime
}
} else {
# Try for partially linked entry
set muri [$db query {