mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -458,7 +458,7 @@ const docTemplate = `{
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Get m3u from last play",
|
"description": "Get M3U from last played file",
|
||||||
"name": "fromlast",
|
"name": "fromlast",
|
||||||
"in": "query"
|
"in": "query"
|
||||||
},
|
},
|
||||||
@@ -477,14 +477,14 @@ const docTemplate = `{
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "File index in torrent",
|
"description": "Set poster link of torrent",
|
||||||
"name": "poster",
|
"name": "poster",
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Set poster link of torrent",
|
"description": "Stream / playlist without authentication",
|
||||||
"name": "not_auth",
|
"name": "not_auth",
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"required": true
|
"required": true
|
||||||
|
|||||||
@@ -451,7 +451,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Get m3u from last play",
|
"description": "Get M3U from last played file",
|
||||||
"name": "fromlast",
|
"name": "fromlast",
|
||||||
"in": "query"
|
"in": "query"
|
||||||
},
|
},
|
||||||
@@ -470,14 +470,14 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "File index in torrent",
|
"description": "Set poster link of torrent",
|
||||||
"name": "poster",
|
"name": "poster",
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"required": true
|
"required": true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"description": "Set poster link of torrent",
|
"description": "Stream / playlist without authentication",
|
||||||
"name": "not_auth",
|
"name": "not_auth",
|
||||||
"in": "query",
|
"in": "query",
|
||||||
"required": true
|
"required": true
|
||||||
|
|||||||
@@ -592,7 +592,7 @@ paths:
|
|||||||
in: query
|
in: query
|
||||||
name: m3u
|
name: m3u
|
||||||
type: string
|
type: string
|
||||||
- description: Get m3u from last play
|
- description: Get M3U from last played file
|
||||||
in: query
|
in: query
|
||||||
name: fromlast
|
name: fromlast
|
||||||
type: string
|
type: string
|
||||||
@@ -605,12 +605,12 @@ paths:
|
|||||||
name: title
|
name: title
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- description: File index in torrent
|
- description: Set poster link of torrent
|
||||||
in: query
|
in: query
|
||||||
name: poster
|
name: poster
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
- description: Set poster link of torrent
|
- description: Stream / playlist without authentication
|
||||||
in: query
|
in: query
|
||||||
name: not_auth
|
name: not_auth
|
||||||
required: true
|
required: true
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ module server
|
|||||||
|
|
||||||
go 1.20
|
go 1.20
|
||||||
|
|
||||||
replace github.com/anacrolix/torrent v1.54.0 => github.com/tsynik/torrent v1.2.13
|
replace github.com/anacrolix/torrent v1.54.1 => github.com/tsynik/torrent v1.2.15
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/agnivade/levenshtein v1.1.1
|
github.com/agnivade/levenshtein v1.1.1
|
||||||
@@ -11,7 +11,7 @@ require (
|
|||||||
github.com/anacrolix/log v0.15.0
|
github.com/anacrolix/log v0.15.0
|
||||||
github.com/anacrolix/missinggo/v2 v2.7.3
|
github.com/anacrolix/missinggo/v2 v2.7.3
|
||||||
github.com/anacrolix/publicip v0.3.0
|
github.com/anacrolix/publicip v0.3.0
|
||||||
github.com/anacrolix/torrent v1.54.0
|
github.com/anacrolix/torrent v1.54.1
|
||||||
github.com/gin-contrib/cors v1.5.0
|
github.com/gin-contrib/cors v1.5.0
|
||||||
github.com/gin-contrib/location v0.0.2
|
github.com/gin-contrib/location v0.0.2
|
||||||
github.com/gin-gonic/gin v1.9.1
|
github.com/gin-gonic/gin v1.9.1
|
||||||
@@ -34,9 +34,9 @@ require (
|
|||||||
github.com/alecthomas/atomic v0.1.0-alpha2 // indirect
|
github.com/alecthomas/atomic v0.1.0-alpha2 // indirect
|
||||||
github.com/alexflint/go-scalar v1.2.0 // indirect
|
github.com/alexflint/go-scalar v1.2.0 // indirect
|
||||||
github.com/anacrolix/chansync v0.4.0 // indirect
|
github.com/anacrolix/chansync v0.4.0 // indirect
|
||||||
github.com/anacrolix/dht/v2 v2.21.0 // indirect
|
github.com/anacrolix/dht/v2 v2.21.1 // indirect
|
||||||
github.com/anacrolix/ffprobe v1.1.0 // indirect
|
github.com/anacrolix/ffprobe v1.1.0 // indirect
|
||||||
github.com/anacrolix/generics v0.0.0-20230911070922-5dd7545c6b13 // indirect
|
github.com/anacrolix/generics v0.0.1 // indirect
|
||||||
github.com/anacrolix/missinggo v1.3.0 // indirect
|
github.com/anacrolix/missinggo v1.3.0 // indirect
|
||||||
github.com/anacrolix/missinggo/perf v1.0.0 // indirect
|
github.com/anacrolix/missinggo/perf v1.0.0 // indirect
|
||||||
github.com/anacrolix/multiless v0.3.1-0.20221221005021-2d12701f83f7 // indirect
|
github.com/anacrolix/multiless v0.3.1-0.20221221005021-2d12701f83f7 // indirect
|
||||||
@@ -47,7 +47,7 @@ require (
|
|||||||
github.com/benbjohnson/immutable v0.4.3 // indirect
|
github.com/benbjohnson/immutable v0.4.3 // indirect
|
||||||
github.com/bits-and-blooms/bitset v1.13.0 // indirect
|
github.com/bits-and-blooms/bitset v1.13.0 // indirect
|
||||||
github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 // indirect
|
github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 // indirect
|
||||||
github.com/bytedance/sonic v1.10.2 // indirect
|
github.com/bytedance/sonic v1.11.0 // indirect
|
||||||
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
|
github.com/chenzhuoyu/base64x v0.0.0-20230717121745-296ad89f973d // indirect
|
||||||
github.com/chenzhuoyu/iasm v0.9.1 // indirect
|
github.com/chenzhuoyu/iasm v0.9.1 // indirect
|
||||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
|
|||||||
@@ -30,8 +30,8 @@ github.com/alexflint/go-scalar v1.2.0 h1:WR7JPKkeNpnYIOfHRa7ivM21aWAdHD0gEWHCx+W
|
|||||||
github.com/alexflint/go-scalar v1.2.0/go.mod h1:LoFvNMqS1CPrMVltza4LvnGKhaSpc3oyLEBUZVhhS2o=
|
github.com/alexflint/go-scalar v1.2.0/go.mod h1:LoFvNMqS1CPrMVltza4LvnGKhaSpc3oyLEBUZVhhS2o=
|
||||||
github.com/anacrolix/chansync v0.4.0 h1:Md0HM7zYCAO4KwNwgcIRgxNsMxiRuk7D1Ha0Uo+2y60=
|
github.com/anacrolix/chansync v0.4.0 h1:Md0HM7zYCAO4KwNwgcIRgxNsMxiRuk7D1Ha0Uo+2y60=
|
||||||
github.com/anacrolix/chansync v0.4.0/go.mod h1:DZsatdsdXxD0WiwcGl0nJVwyjCKMDv+knl1q2iBjA2k=
|
github.com/anacrolix/chansync v0.4.0/go.mod h1:DZsatdsdXxD0WiwcGl0nJVwyjCKMDv+knl1q2iBjA2k=
|
||||||
github.com/anacrolix/dht/v2 v2.21.0 h1:8nzI+faaynY9jOKmVgdmBZVrTo8B7ZE/LKEgN3Vl/Bs=
|
github.com/anacrolix/dht/v2 v2.21.1 h1:s1rKkfLLcmBHKv4v/mtMkIeHIEptzEFiB6xVu54+5/o=
|
||||||
github.com/anacrolix/dht/v2 v2.21.0/go.mod h1:SDGC+sEs1pnO2sJGYuhvIis7T8749dDHNfcjtdH4e3g=
|
github.com/anacrolix/dht/v2 v2.21.1/go.mod h1:SDGC+sEs1pnO2sJGYuhvIis7T8749dDHNfcjtdH4e3g=
|
||||||
github.com/anacrolix/dms v1.6.0 h1:v2g1Y+Fc/ICSEc+7M6B92oFcfcqa5LXYPhE4Hcm5tVA=
|
github.com/anacrolix/dms v1.6.0 h1:v2g1Y+Fc/ICSEc+7M6B92oFcfcqa5LXYPhE4Hcm5tVA=
|
||||||
github.com/anacrolix/dms v1.6.0/go.mod h1:5fAMpBcPFG4WQFh91zhf2E7/KYZ3/WmmRAf/WMoL0Q0=
|
github.com/anacrolix/dms v1.6.0/go.mod h1:5fAMpBcPFG4WQFh91zhf2E7/KYZ3/WmmRAf/WMoL0Q0=
|
||||||
github.com/anacrolix/envpprof v0.0.0-20180404065416-323002cec2fa/go.mod h1:KgHhUaQMc8cC0+cEflSgCFNFbKwi5h54gqtVn8yhP7c=
|
github.com/anacrolix/envpprof v0.0.0-20180404065416-323002cec2fa/go.mod h1:KgHhUaQMc8cC0+cEflSgCFNFbKwi5h54gqtVn8yhP7c=
|
||||||
@@ -42,8 +42,8 @@ github.com/anacrolix/ffprobe v1.0.0/go.mod h1:BIw+Bjol6CWjm/CRWrVLk2Vy+UYlkgmBZ0
|
|||||||
github.com/anacrolix/ffprobe v1.1.0 h1:eKBudnERW9zRJ0+ge6FzkQ0pWLyq142+FJrwRwSRMT4=
|
github.com/anacrolix/ffprobe v1.1.0 h1:eKBudnERW9zRJ0+ge6FzkQ0pWLyq142+FJrwRwSRMT4=
|
||||||
github.com/anacrolix/ffprobe v1.1.0/go.mod h1:MXe+zG/RRa5OdIf5+VYYfS/CfsSqOH7RrvGIqJBzqhI=
|
github.com/anacrolix/ffprobe v1.1.0/go.mod h1:MXe+zG/RRa5OdIf5+VYYfS/CfsSqOH7RrvGIqJBzqhI=
|
||||||
github.com/anacrolix/generics v0.0.0-20230113004304-d6428d516633/go.mod h1:ff2rHB/joTV03aMSSn/AZNnaIpUw0h3njetGsaXcMy8=
|
github.com/anacrolix/generics v0.0.0-20230113004304-d6428d516633/go.mod h1:ff2rHB/joTV03aMSSn/AZNnaIpUw0h3njetGsaXcMy8=
|
||||||
github.com/anacrolix/generics v0.0.0-20230911070922-5dd7545c6b13 h1:qwOprPTDMM3BASJRf84mmZnTXRsPGGJ8xoHKQS7m3so=
|
github.com/anacrolix/generics v0.0.1 h1:4WVhK6iLb3UAAAQP6I3uYlMOHcp9FqJC9j4n81Wv9Ks=
|
||||||
github.com/anacrolix/generics v0.0.0-20230911070922-5dd7545c6b13/go.mod h1:ff2rHB/joTV03aMSSn/AZNnaIpUw0h3njetGsaXcMy8=
|
github.com/anacrolix/generics v0.0.1/go.mod h1:ff2rHB/joTV03aMSSn/AZNnaIpUw0h3njetGsaXcMy8=
|
||||||
github.com/anacrolix/log v0.3.0/go.mod h1:lWvLTqzAnCWPJA08T2HCstZi0L1y2Wyvm3FJgwU9jwU=
|
github.com/anacrolix/log v0.3.0/go.mod h1:lWvLTqzAnCWPJA08T2HCstZi0L1y2Wyvm3FJgwU9jwU=
|
||||||
github.com/anacrolix/log v0.6.0/go.mod h1:lWvLTqzAnCWPJA08T2HCstZi0L1y2Wyvm3FJgwU9jwU=
|
github.com/anacrolix/log v0.6.0/go.mod h1:lWvLTqzAnCWPJA08T2HCstZi0L1y2Wyvm3FJgwU9jwU=
|
||||||
github.com/anacrolix/log v0.13.1/go.mod h1:D4+CvN8SnruK6zIFS/xPoRJmtvtnxs+CSfDQ+BFxZ68=
|
github.com/anacrolix/log v0.13.1/go.mod h1:D4+CvN8SnruK6zIFS/xPoRJmtvtnxs+CSfDQ+BFxZ68=
|
||||||
@@ -96,8 +96,8 @@ github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8 h1:GKTyiRCL6zVf5wWaq
|
|||||||
github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8/go.mod h1:spo1JLcs67NmW1aVLEgtA8Yy1elc+X8y5SRW1sFW4Og=
|
github.com/bradfitz/iter v0.0.0-20191230175014-e8f45d346db8/go.mod h1:spo1JLcs67NmW1aVLEgtA8Yy1elc+X8y5SRW1sFW4Og=
|
||||||
github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
|
github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
|
||||||
github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM=
|
github.com/bytedance/sonic v1.10.0-rc/go.mod h1:ElCzW+ufi8qKqNW0FY314xriJhyJhuoJ3gFZdAHF7NM=
|
||||||
github.com/bytedance/sonic v1.10.2 h1:GQebETVBxYB7JGWJtLBi07OVzWwt+8dWA00gEVW2ZFE=
|
github.com/bytedance/sonic v1.11.0 h1:FwNNv6Vu4z2Onf1++LNzxB/QhitD8wuTdpZzMTGITWo=
|
||||||
github.com/bytedance/sonic v1.10.2/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4=
|
github.com/bytedance/sonic v1.11.0/go.mod h1:iZcSUejdk5aukTND/Eu/ivjQuEL0Cu9/rf50Hi0u/g4=
|
||||||
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||||
github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY=
|
github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY=
|
||||||
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
|
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311/go.mod h1:b583jCggY9gE99b6G5LEC39OIiVsWj+R97kbl5odCEk=
|
||||||
@@ -332,8 +332,8 @@ github.com/swaggo/swag v1.16.3/go.mod h1:DImHIuOFXKpMFAQjcC7FG4m3Dg4+QuUgUzJmKjI
|
|||||||
github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
|
github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
|
||||||
github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
|
github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
|
||||||
github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
|
github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
|
||||||
github.com/tsynik/torrent v1.2.13 h1:PyOTz6dpzsoIT0IhiEmg6H5VD+mFqF93Q2L9iFyqPtQ=
|
github.com/tsynik/torrent v1.2.15 h1:f76Jhtz8MtgCwCBO396hzz9wsuF8+N1OdcB+YNh3d7k=
|
||||||
github.com/tsynik/torrent v1.2.13/go.mod h1:NDxg14AwVqi3PWt1oStYLnyUxHYHX3qGKBAZVh/6Jk8=
|
github.com/tsynik/torrent v1.2.15/go.mod h1:ZDW51KV/sGhccWk3HVpd2YXJvQLDDVByOfYZ7pVRFWc=
|
||||||
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
|
github.com/twitchyliquid64/golang-asm v0.15.1 h1:SU5vSMR7hnwNxj24w34ZyCi/FmDZTkS4MhqMhdFk5YI=
|
||||||
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
|
github.com/twitchyliquid64/golang-asm v0.15.1/go.mod h1:a1lVb/DtPvCB8fslRZhAngC2+aY1QWCk3Cedj/Gdt08=
|
||||||
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
|
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ func Start(port, sslport, sslCert, sslKey string, sslEnabled, roSets, searchWA b
|
|||||||
l.Close()
|
l.Close()
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.TLogln("Port", sslport, "already in use! Please set different port for HTTPS. Abort")
|
log.TLogln("Port", sslport, "already in use! Please set different ssl port for HTTPS. Abort")
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -59,7 +59,7 @@ func Start(port, sslport, sslCert, sslKey string, sslEnabled, roSets, searchWA b
|
|||||||
l.Close()
|
l.Close()
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.TLogln("Port", port, "already in use! Please set different sslport for HTTP. Abort")
|
log.TLogln("Port", port, "already in use! Please set different port for HTTP. Abort")
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
// remove old disk caches
|
// remove old disk caches
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ func (t *Torrent) Preload(index int, size int64) {
|
|||||||
// Запуск лога в отдельном потоке
|
// Запуск лога в отдельном потоке
|
||||||
go func() {
|
go func() {
|
||||||
for t.Stat == state.TorrentPreload {
|
for t.Stat == state.TorrentPreload {
|
||||||
stat := fmt.Sprint(file.Torrent().InfoHash().HexString(), " ", utils2.Format(float64(t.PreloadedBytes)), "/", utils2.Format(float64(t.PreloadSize)), " Speed:", utils2.Format(t.DownloadSpeed), " Peers:[", t.Torrent.Stats().ConnectedSeeders, "]", t.Torrent.Stats().ActivePeers, "/", t.Torrent.Stats().TotalPeers)
|
stat := fmt.Sprint(file.Torrent().InfoHash().HexString(), " ", utils2.Format(float64(t.PreloadedBytes)), "/", utils2.Format(float64(t.PreloadSize)), " Speed:", utils2.Format(t.DownloadSpeed), " Peers:", t.Torrent.Stats().ActivePeers, "/", t.Torrent.Stats().TotalPeers, " [Seeds:", t.Torrent.Stats().ConnectedSeeders, "]")
|
||||||
log.TLogln("Preload:", stat)
|
log.TLogln("Preload:", stat)
|
||||||
t.AddExpiredTime(time.Second * time.Duration(settings.BTsets.TorrentDisconnectTimeout))
|
t.AddExpiredTime(time.Second * time.Duration(settings.BTsets.TorrentDisconnectTimeout))
|
||||||
time.Sleep(time.Second)
|
time.Sleep(time.Second)
|
||||||
@@ -158,7 +158,7 @@ func (t *Torrent) Preload(index int, size int64) {
|
|||||||
|
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
}
|
}
|
||||||
log.TLogln("End preload:", file.Torrent().InfoHash().HexString(), "Peers:[", t.Torrent.Stats().ConnectedSeeders, "]", t.Torrent.Stats().ActivePeers, "/", t.Torrent.Stats().TotalPeers)
|
log.TLogln("End preload:", file.Torrent().InfoHash().HexString(), "Peers:", t.Torrent.Stats().ActivePeers, "/", t.Torrent.Stats().TotalPeers, "[ Seeds:", t.Torrent.Stats().ConnectedSeeders, "]")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *Torrent) findFileIndex(index int) *torrent.File {
|
func (t *Torrent) findFileIndex(index int) *torrent.File {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import (
|
|||||||
// "github.com/anacrolix/torrent"
|
// "github.com/anacrolix/torrent"
|
||||||
)
|
)
|
||||||
|
|
||||||
const Version = "MatriX.129.3"
|
const Version = "MatriX.129.4"
|
||||||
|
|
||||||
func GetTorrentVersion() string {
|
func GetTorrentVersion() string {
|
||||||
bi, ok := debug.ReadBuildInfo()
|
bi, ok := debug.ReadBuildInfo()
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ const playableExtList = [
|
|||||||
'avchd',
|
'avchd',
|
||||||
'avi',
|
'avi',
|
||||||
'drc',
|
'drc',
|
||||||
|
'dv',
|
||||||
'flv',
|
'flv',
|
||||||
'iso',
|
'iso',
|
||||||
'm2v',
|
'm2v',
|
||||||
@@ -27,9 +28,9 @@ const playableExtList = [
|
|||||||
'mpeg',
|
'mpeg',
|
||||||
'mpg',
|
'mpg',
|
||||||
'mpv',
|
'mpv',
|
||||||
|
'mts',
|
||||||
'mxf',
|
'mxf',
|
||||||
'nsv',
|
'nsv',
|
||||||
'ogg',
|
|
||||||
'ogv',
|
'ogv',
|
||||||
'ts',
|
'ts',
|
||||||
'qt',
|
'qt',
|
||||||
@@ -46,6 +47,9 @@ const playableExtList = [
|
|||||||
'aiff',
|
'aiff',
|
||||||
'ape',
|
'ape',
|
||||||
'au',
|
'au',
|
||||||
|
'dsd',
|
||||||
|
'dff',
|
||||||
|
'dsf',
|
||||||
'flac',
|
'flac',
|
||||||
'gsm',
|
'gsm',
|
||||||
'it',
|
'it',
|
||||||
@@ -55,11 +59,15 @@ const playableExtList = [
|
|||||||
'mod',
|
'mod',
|
||||||
'mp3',
|
'mp3',
|
||||||
'mpa',
|
'mpa',
|
||||||
|
'oga',
|
||||||
|
'ogg',
|
||||||
|
'opus',
|
||||||
'pls',
|
'pls',
|
||||||
'ra',
|
'ra',
|
||||||
's3m',
|
's3m',
|
||||||
'sid',
|
'sid',
|
||||||
'wav',
|
'wav',
|
||||||
|
'weba',
|
||||||
'wma',
|
'wma',
|
||||||
'xm',
|
'xm',
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export const PeersWidget = ({ data }) => {
|
|||||||
return (
|
return (
|
||||||
<StatisticsField
|
<StatisticsField
|
||||||
title={t('Peers')}
|
title={t('Peers')}
|
||||||
value={getPeerString(data) || '0 · 0 / 0'}
|
value={getPeerString(data) || '0 / 0 · 0'}
|
||||||
iconBg={iconBGColor}
|
iconBg={iconBGColor}
|
||||||
valueBg={valueBGColor}
|
valueBg={valueBGColor}
|
||||||
icon={SwapVerticalCircleIcon}
|
icon={SwapVerticalCircleIcon}
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
"Offline": "Извън линия",
|
"Offline": "Извън линия",
|
||||||
"OK": "OK",
|
"OK": "OK",
|
||||||
"OpenLink": "Отвори линк",
|
"OpenLink": "Отвори линк",
|
||||||
"Peers": "Пиъри",
|
"Peers": "Пиъри·Сийдъри",
|
||||||
"PiecesCount": "Брой парчета",
|
"PiecesCount": "Брой парчета",
|
||||||
"PiecesLength": "Дължина на парчетата",
|
"PiecesLength": "Дължина на парчетата",
|
||||||
"Playlist": "Плейлист",
|
"Playlist": "Плейлист",
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
"Offline": "Offline",
|
"Offline": "Offline",
|
||||||
"OK": "OK",
|
"OK": "OK",
|
||||||
"OpenLink": "Open link",
|
"OpenLink": "Open link",
|
||||||
"Peers": "Peers",
|
"Peers": "Peers·Seeds",
|
||||||
"PiecesCount": "Pieces count",
|
"PiecesCount": "Pieces count",
|
||||||
"PiecesLength": "Pieces length",
|
"PiecesLength": "Pieces length",
|
||||||
"Playlist": "Playlist",
|
"Playlist": "Playlist",
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
"Offline": "Сервер недоступен",
|
"Offline": "Сервер недоступен",
|
||||||
"OK": "OK",
|
"OK": "OK",
|
||||||
"OpenLink": "Открыть",
|
"OpenLink": "Открыть",
|
||||||
"Peers": "Пиры",
|
"Peers": "Пиры·Сиды",
|
||||||
"PiecesCount": "Кол-во блоков",
|
"PiecesCount": "Кол-во блоков",
|
||||||
"PiecesLength": "Размер блока",
|
"PiecesLength": "Размер блока",
|
||||||
"Playlist": "Плейлист",
|
"Playlist": "Плейлист",
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
"Offline": "Сервер не доступний",
|
"Offline": "Сервер не доступний",
|
||||||
"OK": "OK",
|
"OK": "OK",
|
||||||
"OpenLink": "Відкрити",
|
"OpenLink": "Відкрити",
|
||||||
"Peers": "Піри",
|
"Peers": "Піри·Сіди",
|
||||||
"PiecesCount": "К-сть блоків",
|
"PiecesCount": "К-сть блоків",
|
||||||
"PiecesLength": "Розмір блоку",
|
"PiecesLength": "Розмір блоку",
|
||||||
"Playlist": "Плейлист",
|
"Playlist": "Плейлист",
|
||||||
|
|||||||
@@ -72,7 +72,7 @@
|
|||||||
"Offline": "离线",
|
"Offline": "离线",
|
||||||
"OK": "确定",
|
"OK": "确定",
|
||||||
"OpenLink": "打开链接",
|
"OpenLink": "打开链接",
|
||||||
"Peers": "Peers",
|
"Peers": "Peers·Seeds",
|
||||||
"PiecesCount": "块数量",
|
"PiecesCount": "块数量",
|
||||||
"PiecesLength": "块长度",
|
"PiecesLength": "块长度",
|
||||||
"Playlist": "播放列表",
|
"Playlist": "播放列表",
|
||||||
|
|||||||
@@ -20,8 +20,9 @@ export function humanizeSpeed(speed) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function getPeerString(torrent) {
|
export function getPeerString(torrent) {
|
||||||
if (!torrent || !torrent.connected_seeders) return null
|
if (!torrent || !torrent.active_peers) return null
|
||||||
return `${torrent.connected_seeders} · ${torrent.active_peers} / ${torrent.total_peers}`
|
const seeders = typeof torrent.connected_seeders !== 'undefined' ? torrent.connected_seeders : 0
|
||||||
|
return `${torrent.active_peers} / ${torrent.total_peers} · ${seeders}`
|
||||||
}
|
}
|
||||||
|
|
||||||
export const shortenText = (text, sympolAmount) =>
|
export const shortenText = (text, sympolAmount) =>
|
||||||
|
|||||||
@@ -7063,9 +7063,9 @@ ip-regex@^2.1.0:
|
|||||||
integrity sha512-58yWmlHpp7VYfcdTwMTvwMmqx/Elfxjd9RXTDyMsbL7lLWmhMylLEqiYVLKuLzOZqVgiWXD9MfR62Vv89VRxkw==
|
integrity sha512-58yWmlHpp7VYfcdTwMTvwMmqx/Elfxjd9RXTDyMsbL7lLWmhMylLEqiYVLKuLzOZqVgiWXD9MfR62Vv89VRxkw==
|
||||||
|
|
||||||
ip@^1.1.0, ip@^1.1.5:
|
ip@^1.1.0, ip@^1.1.5:
|
||||||
version "1.1.8"
|
version "1.1.9"
|
||||||
resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.8.tgz#ae05948f6b075435ed3307acce04629da8cdbf48"
|
resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.9.tgz#8dfbcc99a754d07f425310b86a99546b1151e396"
|
||||||
integrity sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==
|
integrity sha512-cyRxvOEpNHNtchU3Ln9KC/auJgup87llfQpQ+t5ghoC/UhL16SWzbueiCsdTnWmqAWl7LadfuwhlqmtOaqMHdQ==
|
||||||
|
|
||||||
ipaddr.js@1.9.1, ipaddr.js@^1.9.0:
|
ipaddr.js@1.9.1, ipaddr.js@^1.9.0:
|
||||||
version "1.9.1"
|
version "1.9.1"
|
||||||
|
|||||||
Reference in New Issue
Block a user