mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
commit 218d84b7905d23dce3c8f842ed78b8eac8ea9580 Author: nikk gitanes <tsynik@gmail.com> Date: Mon Feb 5 01:10:19 2024 +0300 add read-only DB logging commit 826fde8e8444a9169afeb7f777e1803fcf6bd435 Author: nikk gitanes <tsynik@gmail.com> Date: Sat Feb 3 22:50:19 2024 +0300 update msx doc commit 98b7d61bd98269b0e456cb71a5d50a8f98203aba Merge: 490ee26963c7daAuthor: nikk gitanes <tsynik@gmail.com> Date: Sat Feb 3 11:21:45 2024 +0300 Merge branch 'master' into jsondb commit 490ee26d3f14316cb1ad3b872ebe408a5aa2a91b Merge:83c7ed1efb17eeAuthor: nikk gitanes <tsynik@gmail.com> Date: Sat Feb 3 10:50:41 2024 +0300 Merge branch 'master' into jsondb
28 lines
454 B
Go
28 lines
454 B
Go
package version
|
|
|
|
import (
|
|
"log"
|
|
"runtime/debug"
|
|
// "github.com/anacrolix/torrent"
|
|
)
|
|
|
|
const Version = "MatriX.129.JS"
|
|
|
|
func GetTorrentVersion() string {
|
|
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" {
|
|
if dep.Replace != nil {
|
|
return dep.Replace.Version
|
|
} else {
|
|
return dep.Version
|
|
}
|
|
}
|
|
}
|
|
return ""
|
|
}
|