add some iface fun and don't start dlna on loopback and tunnels

This commit is contained in:
nikk gitanes
2021-09-13 02:39:45 +03:00
parent 44f1cfbd9d
commit 02b749a4c4
5 changed files with 182 additions and 4 deletions

View File

@@ -115,7 +115,7 @@ func getTorrent(path, host string) (ret []interface{}) {
func getTorrentMeta(path, host string) (ret interface{}) {
if path=="/" {
if path == "/" {
rootObj := upnpav.Object{
ID: "0",
ParentID: "-1",
@@ -143,7 +143,7 @@ func getTorrentMeta(path, host string) (ret interface{}) {
meta := upnpav.Container{Object: trObj}
return meta
}
// find torrent without load
torrs := torr.ListTorrent()
var torr *torr.Torrent