diff --git a/cmd/serve/dlna/cds.go b/cmd/serve/dlna/cds.go index f7cd77d1f..72fcceeab 100644 --- a/cmd/serve/dlna/cds.go +++ b/cmd/serve/dlna/cds.go @@ -60,6 +60,11 @@ func (cds *contentDirectoryService) cdsObjectToUpnpavObject(cdsObject object, fi var mimeType string if o, ok := fileInfo.DirEntry().(fs.Object); ok { mimeType = fs.MimeType(context.TODO(), o) + // If backend doesn't know what the mime type is then + // try getting it from the file name + if mimeType == "application/octet-stream" { + mimeType = fs.MimeTypeFromName(fileInfo.Name()) + } } else { mimeType = fs.MimeTypeFromName(fileInfo.Name()) }