mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
* https service added on port 8091 default * https port check * format * readme * readme * readme * readme --------- Co-authored-by: evfedoto <evfedoto@cisco.com> Co-authored-by: nikk <tsynik@gmail.com>
This commit is contained in:
@@ -236,13 +236,23 @@ func loadTorrent(path, host string) (ret []interface{}) {
|
||||
|
||||
func getLink(host, path string) string {
|
||||
if !strings.HasPrefix(host, "http") {
|
||||
host = "http://" + host
|
||||
if settings.Ssl {
|
||||
host = "https://" + host
|
||||
} else {
|
||||
host = "http://" + host
|
||||
}
|
||||
|
||||
}
|
||||
pos := strings.LastIndex(host, ":")
|
||||
if pos > 7 {
|
||||
host = host[:pos]
|
||||
}
|
||||
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{}) {
|
||||
|
||||
Reference in New Issue
Block a user