more dlna / samsung related fixes

This commit is contained in:
nikk gitanes
2021-09-08 06:46:34 +03:00
parent a8c05b88a4
commit c60a503b8c
3 changed files with 8 additions and 8 deletions

View File

@@ -24,9 +24,9 @@ func getRoot() (ret []interface{}) {
rootObj := upnpav.Object{ rootObj := upnpav.Object{
ID: "%2FTR", ID: "%2FTR",
ParentID: "0", ParentID: "0",
Restricted: 1,
Title: "Torrents", Title: "Torrents",
Class: "object.container.storageFolder", Class: "object.container.storageFolder",
Restricted: 1,
Date: upnpav.Timestamp{Time: time.Now()}, Date: upnpav.Timestamp{Time: time.Now()},
} }
@@ -53,9 +53,9 @@ func getTorrents() (ret []interface{}) {
obj := upnpav.Object{ obj := upnpav.Object{
ID: "%2F" + t.TorrentSpec.InfoHash.HexString(), ID: "%2F" + t.TorrentSpec.InfoHash.HexString(),
ParentID: "%2FTR", ParentID: "%2FTR",
Restricted: 1,
Title: t.Title, Title: t.Title,
Class: "object.container.storageFolder", Class: "object.container.storageFolder",
Restricted: 1,
Icon: t.Poster, Icon: t.Poster,
AlbumArtURI: t.Poster, AlbumArtURI: t.Poster,
Date: upnpav.Timestamp{Time: time.Now()}, Date: upnpav.Timestamp{Time: time.Now()},
@@ -67,9 +67,9 @@ func getTorrents() (ret []interface{}) {
obj := upnpav.Object{ obj := upnpav.Object{
ID: "%2FNT", ID: "%2FNT",
ParentID: "%2FTR", ParentID: "%2FTR",
Restricted: 1,
Title: "No Torrents", Title: "No Torrents",
Class: "object.container.storageFolder", Class: "object.container.storageFolder",
Restricted: 1,
Date: upnpav.Timestamp{Time: time.Now()}, Date: upnpav.Timestamp{Time: time.Now()},
} }
cnt := upnpav.Container{Object: obj, ChildCount: 1} cnt := upnpav.Container{Object: obj, ChildCount: 1}
@@ -100,9 +100,9 @@ func getTorrent(path, host string) (ret []interface{}) {
obj := upnpav.Object{ obj := upnpav.Object{
ID: parent + "%2FLD", ID: parent + "%2FLD",
ParentID: parent, ParentID: parent,
Restricted: 1,
Title: "Load Torrent", Title: "Load Torrent",
Class: "object.container.storageFolder", Class: "object.container.storageFolder",
Restricted: 1,
Date: upnpav.Timestamp{Time: time.Now()}, Date: upnpav.Timestamp{Time: time.Now()},
} }
cnt := upnpav.Container{Object: obj, ChildCount: 1} cnt := upnpav.Container{Object: obj, ChildCount: 1}
@@ -184,9 +184,9 @@ func getObjFromTorrent(path, parent, host string, torr *torr.Torrent, file *stat
obj := upnpav.Object{ obj := upnpav.Object{
ID: parent + "%2F" + url.PathEscape(file.Path), ID: parent + "%2F" + url.PathEscape(file.Path),
ParentID: parent, ParentID: parent,
Restricted: 1,
Title: file.Path, Title: file.Path,
Class: "object.item." + mime.Type() + "Item", Class: "object.item." + mime.Type() + "Item",
Restricted: 1,
Date: upnpav.Timestamp{Time: time.Now()}, Date: upnpav.Timestamp{Time: time.Now()},
} }

View File

@@ -3,7 +3,7 @@ module server
go 1.17 go 1.17
replace ( replace (
github.com/anacrolix/dms v1.2.2 => github.com/tsynik/dms v0.0.0-20210906013928-2decf97d15be github.com/anacrolix/dms v1.2.2 => github.com/tsynik/dms v0.0.0-20210908015708-af476cd29429
github.com/anacrolix/torrent v1.30.3 => github.com/tsynik/torrent v1.2.7-0.20210907192509-2141ede9aa09 github.com/anacrolix/torrent v1.30.3 => github.com/tsynik/torrent v1.2.7-0.20210907192509-2141ede9aa09
) )

View File

@@ -659,8 +659,8 @@ github.com/tinylib/msgp v1.1.1/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDW
github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg=
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/tsynik/dms v0.0.0-20210906013928-2decf97d15be h1:QGjo6yqsZmgjXc0bPg1eJSdFTpZxTtW9M4cmYUyklL4= github.com/tsynik/dms v0.0.0-20210908015708-af476cd29429 h1:oZq/6B3kBTOgUxmvYaqVA72qkMQXA5olChHvRuGtiME=
github.com/tsynik/dms v0.0.0-20210906013928-2decf97d15be/go.mod h1:1GqMUla/yTV3GFjpKMpmdntkTl6aslGK3jfIksEwIdI= github.com/tsynik/dms v0.0.0-20210908015708-af476cd29429/go.mod h1:1GqMUla/yTV3GFjpKMpmdntkTl6aslGK3jfIksEwIdI=
github.com/tsynik/torrent v1.2.7-0.20210907192509-2141ede9aa09 h1:GHhNKxddZiYrWeiXqMQiPKcSIXKF+o/w1wrqHOgOFrk= github.com/tsynik/torrent v1.2.7-0.20210907192509-2141ede9aa09 h1:GHhNKxddZiYrWeiXqMQiPKcSIXKF+o/w1wrqHOgOFrk=
github.com/tsynik/torrent v1.2.7-0.20210907192509-2141ede9aa09/go.mod h1:E9gvoHzc58EtTudJbzZ2Ho7SKDCYk84734hB9ztBJS4= github.com/tsynik/torrent v1.2.7-0.20210907192509-2141ede9aa09/go.mod h1:E9gvoHzc58EtTudJbzZ2Ho7SKDCYk84734hB9ztBJS4=
github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q=