disable https for dlna and fic certs path

This commit is contained in:
nikk gitanes
2023-11-13 01:14:30 +03:00
parent a91e6eb11b
commit 52e1ab9cca
5 changed files with 48 additions and 53 deletions

View File

@@ -236,23 +236,22 @@ func loadTorrent(path, host string) (ret []interface{}) {
func getLink(host, path string) string {
if !strings.HasPrefix(host, "http") {
if settings.Ssl {
host = "https://" + host
} else {
host = "http://" + host
}
// if settings.Ssl {
// host = "https://" + host
// } else {
host = "http://" + host
// }
}
pos := strings.LastIndex(host, ":")
if pos > 7 {
host = host[:pos]
}
if settings.Ssl {
return host + ":" + settings.SslPort + "/" + path
} else {
return host + ":" + settings.Port + "/" + path
}
// if settings.Ssl {
// return host + ":" + settings.SslPort + "/" + path
// } else {
return host + ":" + settings.Port + "/" + path
// }
}
func getObjFromTorrent(path, parent, host string, torr *torr.Torrent, file *state.TorrentFileStat) (ret interface{}) {