mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
Merge branch 'master' into old-engine
This commit is contained in:
@@ -73,7 +73,8 @@ func sendM3U(c *gin.Context, name, hash string, m3u string) {
|
||||
c.Header("Content-Type", "audio/x-mpegurl")
|
||||
c.Header("Connection", "close")
|
||||
if hash != "" {
|
||||
c.Header("ETag", httptoo.EncodeQuotedString(fmt.Sprintf("%s/%s", hash, hex.EncodeToString([]byte(name)))))
|
||||
etag := hex.EncodeToString([]byte(fmt.Sprintf("%s/%s", hash, name)))
|
||||
c.Header("ETag", httptoo.EncodeQuotedString(etag))
|
||||
}
|
||||
if name == "" {
|
||||
name = "playlist.m3u"
|
||||
|
||||
@@ -30,7 +30,7 @@ func Start(port string) {
|
||||
log.TLogln("Start TorrServer")
|
||||
ips := getLocalIps()
|
||||
if len(ips) > 0 {
|
||||
log.TLogln("IPs:", ips)
|
||||
log.TLogln("Local IPs:", ips)
|
||||
}
|
||||
err := BTS.Connect()
|
||||
if err != nil {
|
||||
@@ -102,7 +102,7 @@ func getLocalIps() []string {
|
||||
case *net.IPAddr:
|
||||
ip = v.IP
|
||||
}
|
||||
if !ip.IsLoopback() {
|
||||
if !ip.IsLoopback() && !ip.IsLinkLocalUnicast() && !ip.IsLinkLocalMulticast() {
|
||||
list = append(list, ip.String())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user