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:
@@ -1,3 +1,24 @@
|
|||||||
package version
|
package version
|
||||||
|
|
||||||
|
import (
|
||||||
|
"log"
|
||||||
|
"runtime/debug"
|
||||||
|
// "github.com/anacrolix/torrent"
|
||||||
|
)
|
||||||
|
|
||||||
const Version = "MatriX.121.OE"
|
const Version = "MatriX.121.OE"
|
||||||
|
|
||||||
|
func GetTorrentVersion() string {
|
||||||
|
// _ = torrent.NewDefaultClientConfig()
|
||||||
|
bi, ok := debug.ReadBuildInfo()
|
||||||
|
if !ok {
|
||||||
|
log.Printf("Failed to read build info")
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
for _, dep := range bi.Deps {
|
||||||
|
if dep.Path == "github.com/anacrolix/torrent" || dep.Path == "github.com/tsynik/torrent" {
|
||||||
|
return dep.Version
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func Start(port string) {
|
func Start(port string) {
|
||||||
log.TLogln("Start TorrServer " + version.Version)
|
log.TLogln("Start TorrServer " + version.Version + " torrent " + version.GetTorrentVersion())
|
||||||
ips := getLocalIps()
|
ips := getLocalIps()
|
||||||
if len(ips) > 0 {
|
if len(ips) > 0 {
|
||||||
log.TLogln("Local IPs:", ips)
|
log.TLogln("Local IPs:", ips)
|
||||||
|
|||||||
Reference in New Issue
Block a user