dlna icons fix

thx @YouROK
This commit is contained in:
nikk gitanes
2021-09-08 23:05:32 +03:00
parent 3104f61653
commit 5e22eef376
8 changed files with 16 additions and 9 deletions

View File

@@ -42,16 +42,23 @@ func Start() {
StallEventSubscribe: true, StallEventSubscribe: true,
Icons: []dms.Icon{ Icons: []dms.Icon{
dms.Icon{ dms.Icon{
Width: 32, Width: 48,
Height: 32, Height: 48,
Depth: 32, Depth: 24,
Mimetype: "image/jpeg",
ReadSeeker: bytes.NewReader(template.Dlnaicon48jpg),
},
dms.Icon{
Width: 48,
Height: 48,
Depth: 24,
Mimetype: "image/png", Mimetype: "image/png",
ReadSeeker: bytes.NewReader(template.Favicon32x32png), ReadSeeker: bytes.NewReader(template.Dlnaicon48png),
}, },
dms.Icon{ dms.Icon{
Width: 192, Width: 192,
Height: 192, Height: 192,
Depth: 32, Depth: 24,
Mimetype: "image/png", Mimetype: "image/png",
ReadSeeker: bytes.NewReader(template.Androidchrome192x192png), ReadSeeker: bytes.NewReader(template.Androidchrome192x192png),
}, },

View File

@@ -198,8 +198,8 @@ func getObjFromTorrent(path, parent, host string, torr *torr.Torrent, file *stat
item.Res = append(item.Res, upnpav.Resource{ item.Res = append(item.Res, upnpav.Resource{
URL: getLink(host, pathPlay), URL: getLink(host, pathPlay),
ProtocolInfo: fmt.Sprintf("http-get:*:%s:%s", mime, dlna.ContentFeatures{ ProtocolInfo: fmt.Sprintf("http-get:*:%s:%s", mime, dlna.ContentFeatures{
SupportTimeSeek: true,
SupportRange: true, SupportRange: true,
SupportTimeSeek: true,
}.String()), }.String()),
Size: uint64(file.Length), Size: uint64(file.Length),
}) })

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-20210908015708-af476cd29429 github.com/anacrolix/dms v1.2.2 => github.com/tsynik/dms v0.0.0-20210908102802-d5d0f568fcbb
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-20210908015708-af476cd29429 h1:oZq/6B3kBTOgUxmvYaqVA72qkMQXA5olChHvRuGtiME= github.com/tsynik/dms v0.0.0-20210908102802-d5d0f568fcbb h1:Oc8uYDfJzQE21RRXw3DJnDYCoKxr1AmjL/yxKPP69/Y=
github.com/tsynik/dms v0.0.0-20210908015708-af476cd29429/go.mod h1:1GqMUla/yTV3GFjpKMpmdntkTl6aslGK3jfIksEwIdI= github.com/tsynik/dms v0.0.0-20210908102802-d5d0f568fcbb/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=

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

BIN
web/public/dlnaicon-48.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
web/public/dlnaicon-48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB