Update list.go

This commit is contained in:
nikk gitanes
2021-09-07 22:32:22 +03:00
parent 4d22d8f131
commit 23a00b29de

View File

@@ -173,6 +173,7 @@ func getObjFromTorrent(path, parent, host string, torr *torr.Torrent, file *stat
} }
return return
} }
// TODO: handle subtitles for media
if !mime.IsMedia() { if !mime.IsMedia() {
return return
} }
@@ -181,7 +182,7 @@ func getObjFromTorrent(path, parent, host string, torr *torr.Torrent, file *stat
} }
obj := upnpav.Object{ obj := upnpav.Object{
ID: url.PathEscape(parent + "/" + file.Path), ID: parent + "%2F" + url.PathEscape(file.Path),
ParentID: parent, ParentID: parent,
Title: file.Path, Title: file.Path,
Class: "object.item." + mime.Type() + "Item", Class: "object.item." + mime.Type() + "Item",