Merge branch 'master' into new-torrent

This commit is contained in:
nikk gitanes
2021-09-10 04:57:33 +03:00
53 changed files with 759 additions and 122 deletions

View File

@@ -8,6 +8,7 @@ import (
"os/exec"
"path/filepath"
"regexp"
"sort"
"strings"
)
@@ -33,7 +34,9 @@ func main() {
filepath.WalkDir(srcGo+"template/pages/", func(path string, d fs.DirEntry, err error) error {
if !d.IsDir() {
name := strings.TrimPrefix(path, srcGo+"template/")
files = append(files, name)
if !strings.HasPrefix(name, ".") {
files = append(files, name)
}
}
return nil
})
@@ -58,7 +61,7 @@ import (
for _, f := range files {
fname := cleanName(strings.TrimPrefix(f, "pages"))
embedStr += "\n\n//go:embed " + f + "\nvar " + fname + " []byte\n"
embedStr += "\n//go:embed " + f + "\nvar " + fname + " []byte\n"
ret[strings.TrimPrefix(f, "pages")] = fname
}
@@ -86,13 +89,18 @@ func RouteWebPages(route *gin.RouterGroup) {
`
mime.AddExtensionType(".map", "application/json")
mime.AddExtensionType(".webmanifest", "application/manifest+json")
for link, v := range fmap {
// sort fmap
keys := make([]string, 0, len(fmap))
for key := range fmap {
keys = append(keys, key)
}
sort.Strings(keys)
for _, link := range keys {
fmime := mime.TypeByExtension(filepath.Ext(link))
embedStr += `
route.GET("` + link + `", func(c *gin.Context) {
c.Data(200, "` + fmime + `", ` + v + `)
c.Data(200, "` + fmime + `", ` + fmap[link] + `)
})
`
}
embedStr += "}"

View File

@@ -1,3 +1,4 @@
//go:build android
// +build android
package main

View File

@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows
package main
@@ -6,7 +7,7 @@ import (
"os"
"os/signal"
"syscall"
"server/log"
"server/settings"
)
@@ -23,7 +24,7 @@ func Preconfig(dkill bool) {
go func() {
for s := range sigc {
if dkill {
if (settings.BTsets.EnableDebug || s != syscall.SIGPIPE) {
if settings.BTsets.EnableDebug || s != syscall.SIGPIPE {
log.TLogln("Signal catched:", s)
log.TLogln("To stop server, close it from web / api")
}

View File

@@ -6,6 +6,9 @@ package main
import (
"syscall"
"time"
"server/torr"
"server/torr/state"
)
const (
@@ -16,14 +19,27 @@ const (
var pulseTime = 1 * time.Minute
func Preconfig(kill bool) {
// don't sleep/hibernate windows
kernel32 := syscall.NewLazyDLL("kernel32.dll")
setThreadExecStateProc := kernel32.NewProc("SetThreadExecutionState")
pulse := time.NewTicker(pulseTime)
for {
select {
case <-pulse.C:
setThreadExecStateProc.Call(uintptr(EsSystemRequired))
go func() {
// don't sleep/hibernate windows
kernel32 := syscall.NewLazyDLL("kernel32.dll")
setThreadExecStateProc := kernel32.NewProc("SetThreadExecutionState")
pulse := time.NewTicker(pulseTime)
for {
select {
case <-pulse.C:
{
send := false
for _, torrent := range torr.ListTorrent() {
if torrent.Stat != state.TorrentInDB {
send = true
break
}
}
if send {
setThreadExecStateProc.Call(uintptr(EsSystemRequired))
}
}
}
}
}
}()
}

View File

@@ -10,6 +10,7 @@ import (
"time"
"github.com/anacrolix/dms/dlna/dms"
"github.com/anacrolix/dms/upnpav"
"server/log"
"server/web/pages/template"
@@ -36,24 +37,38 @@ func Start() {
}
return conn
}(),
FriendlyName: getDefaultFriendlyName(),
NoTranscode: true,
NoProbe: true,
FriendlyName: getDefaultFriendlyName(),
NoTranscode: true,
NoProbe: true,
StallEventSubscribe: true,
Icons: []dms.Icon{
// dms.Icon{
// Width: 48,
// Height: 48,
// Depth: 24,
// Mimetype: "image/jpeg",
// ReadSeeker: bytes.NewReader(template.Dlnaicon48jpg),
// },
// dms.Icon{
// Width: 120,
// Height: 120,
// Depth: 24,
// Mimetype: "image/jpeg",
// ReadSeeker: bytes.NewReader(template.Dlnaicon120jpg),
// },
dms.Icon{
Width: 32,
Height: 32,
Depth: 32,
Width: 48,
Height: 48,
Depth: 24,
Mimetype: "image/png",
ReadSeeker: bytes.NewReader(template.Favicon32x32png),
ReadSeeker: bytes.NewReader(template.Dlnaicon48png),
},
dms.Icon{
Width: 192,
Height: 192,
Depth: 32,
Width: 120,
Height: 120,
Depth: 24,
Mimetype: "image/png",
ReadSeeker: bytes.NewReader(template.Androidchrome192x192png),
ReadSeeker: bytes.NewReader(template.Dlnaicon120png),
},
},
NotifyInterval: 30 * time.Second,
@@ -105,6 +120,21 @@ func onBrowse(path, rootObjectPath, host, userAgent string) (ret []interface{},
}
func onBrowseMeta(path string, rootObjectPath string, host, userAgent string) (ret interface{}, err error) {
if path == "/" {
// Root Object Meta
rootObj := upnpav.Object{
ID: "0",
ParentID: "-1",
Restricted: 1,
Searchable: 1,
Title: "TorrServer",
Date: upnpav.Timestamp{Time: time.Now()},
Class: "object.container.storageFolder",
}
// add Root Object
ret = upnpav.Container{Object: rootObj, ChildCount: 1}
return
}
err = fmt.Errorf("not implemented")
return
}

View File

@@ -20,19 +20,19 @@ import (
func getRoot() (ret []interface{}) {
// Root Object
rootObj := upnpav.Object{
// Torrents Object
tObj := upnpav.Object{
ID: "%2FTR",
ParentID: "0",
Restricted: 1,
Title: "Torrents",
Class: "object.container.storageFolder",
Restricted: 1,
Date: upnpav.Timestamp{Time: time.Now()},
Date: upnpav.Timestamp{Time: time.Now()},
}
// add Root Object
len := len(torr.ListTorrent())
cnt := upnpav.Container{Object: rootObj, ChildCount: len}
// add Torrents Object
vol := len(torr.ListTorrent())
cnt := upnpav.Container{Object: tObj, ChildCount: vol}
ret = append(ret, cnt)
return
@@ -46,19 +46,19 @@ func getTorrents() (ret []interface{}) {
sort.Slice(torrs, func(i, j int) bool {
return torrs[i].Title < torrs[j].Title
})
var vol = 0
for _, t := range torrs {
vol++
obj := upnpav.Object{
ID: "%2F" + t.TorrentSpec.InfoHash.HexString(),
ParentID: "%2FTR",
Restricted: 1,
Title: t.Title,
Class: "object.container.storageFolder",
Restricted: 1,
Icon: t.Poster,
AlbumArtURI: t.Poster,
Date: upnpav.Timestamp{Time: time.Now()},
Date: upnpav.Timestamp{Time: time.Now()},
}
cnt := upnpav.Container{Object: obj, ChildCount: 1}
ret = append(ret, cnt)
@@ -67,14 +67,13 @@ func getTorrents() (ret []interface{}) {
obj := upnpav.Object{
ID: "%2FNT",
ParentID: "%2FTR",
Restricted: 1,
Title: "No Torrents",
Class: "object.container.storageFolder",
Restricted: 1,
Date: upnpav.Timestamp{Time: time.Now()},
Date: upnpav.Timestamp{Time: time.Now()},
}
cnt := upnpav.Container{Object: obj, ChildCount: 1}
ret = append(ret, cnt)
vol = 1
}
return
}
@@ -100,10 +99,10 @@ func getTorrent(path, host string) (ret []interface{}) {
obj := upnpav.Object{
ID: parent + "%2FLD",
ParentID: parent,
Restricted: 1,
Title: "Load Torrent",
Class: "object.container.storageFolder",
Restricted: 1,
Date: upnpav.Timestamp{Time: time.Now()},
Date: upnpav.Timestamp{Time: time.Now()},
}
cnt := upnpav.Container{Object: obj, ChildCount: 1}
ret = append(ret, cnt)
@@ -184,10 +183,10 @@ func getObjFromTorrent(path, parent, host string, torr *torr.Torrent, file *stat
obj := upnpav.Object{
ID: parent + "%2F" + url.PathEscape(file.Path),
ParentID: parent,
Restricted: 1,
Title: file.Path,
Class: "object.item." + mime.Type() + "Item",
Restricted: 1,
Date: upnpav.Timestamp{Time: time.Now()},
Date: upnpav.Timestamp{Time: time.Now()},
}
item := upnpav.Item{
@@ -198,8 +197,8 @@ func getObjFromTorrent(path, parent, host string, torr *torr.Torrent, file *stat
item.Res = append(item.Res, upnpav.Resource{
URL: getLink(host, pathPlay),
ProtocolInfo: fmt.Sprintf("http-get:*:%s:%s", mime, dlna.ContentFeatures{
SupportRange: true,
SupportTimeSeek: true,
SupportRange: true,
}.String()),
Size: uint64(file.Length),
})

View File

@@ -7,14 +7,13 @@ import (
"os"
"path"
"strings"
)
func init() {
// Add a minimal number of mime types to augment go's built in types
// for environments which don't have access to a mime.types file (e.g.
// Termux on android)
// Add a minimal number of mime types to augment go's built in types
// for environments which don't have access to a mime.types file (e.g.
// Termux on android)
for _, t := range []struct {
mimeType string
extensions string
@@ -101,8 +100,8 @@ func MimeTypeByPath(filePath string) (ret mimeType, err error) {
if ret == "" {
ret, err = mimeTypeByContent(filePath)
}
// Custom DLNA-compat mime mappings
// TODO: make this client headers / profile map
// Custom DLNA-compat mime mappings
// TODO: make this client headers / profile map
if ret == "video/mp2t" {
ret = "video/mpeg"
} else if ret == "video/x-matroska" {

View File

@@ -2,18 +2,21 @@ module server
go 1.17
replace github.com/anacrolix/dms v1.2.2 => github.com/tsynik/dms v0.0.0-20210906013928-2decf97d15be
replace github.com/anacrolix/dms v1.2.2 => github.com/tsynik/dms v0.0.0-20210909053938-38af4173d4ac
exclude github.com/willf/bitset v1.2.0
exclude (
github.com/willf/bitset v1.2.0
github.com/willf/bitset v1.2.1
)
require (
github.com/alexflint/go-arg v1.4.2
github.com/anacrolix/dms v1.2.2
github.com/anacrolix/missinggo v1.3.0
github.com/anacrolix/torrent v1.31.1-0.20210905013341-ccb90f125296
github.com/anacrolix/torrent v1.31.0
github.com/gin-contrib/cors v1.3.1
github.com/gin-contrib/location v0.0.2
github.com/gin-gonic/gin v1.7.0
github.com/gin-gonic/gin v1.7.4
github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4
github.com/pkg/errors v0.9.1
go.etcd.io/bbolt v1.3.6
@@ -47,17 +50,17 @@ require (
github.com/edsrzf/mmap-go v1.0.0 // indirect
github.com/elliotchance/orderedmap v1.4.0 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-playground/locales v0.13.0 // indirect
github.com/go-playground/universal-translator v0.17.0 // indirect
github.com/go-playground/validator/v10 v10.4.1 // indirect
github.com/golang/protobuf v1.4.3 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/go-playground/validator/v10 v10.9.0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/btree v1.0.1 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gorilla/websocket v1.4.2 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/json-iterator/go v1.1.10 // indirect
github.com/leodido/go-urn v1.2.0 // indirect
github.com/mattn/go-isatty v0.0.12 // indirect
github.com/json-iterator/go v1.1.11 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/mschoch/smat v0.2.0 // indirect
@@ -81,7 +84,7 @@ require (
github.com/rs/dnscache v0.0.0-20210201191234-295bba877686 // indirect
github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/ugorji/go/codec v1.1.7 // indirect
github.com/ugorji/go/codec v1.2.6 // indirect
github.com/willf/bitset v1.1.11 // indirect
github.com/willf/bloom v2.0.3+incompatible // indirect
golang.org/x/crypto v0.0.0-20210813211128-0a44fdfbc16e // indirect
@@ -90,6 +93,6 @@ require (
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e // indirect
golang.org/x/text v0.3.6 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/protobuf v1.25.0 // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)

View File

@@ -37,14 +37,13 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
github.com/alexflint/go-arg v1.1.0/go.mod h1:3Rj4baqzWaGGmZA2+bVTV8zQOZEjBQAPBnL5xLT+ftY=
github.com/alexflint/go-arg v1.2.0/go.mod h1:3Rj4baqzWaGGmZA2+bVTV8zQOZEjBQAPBnL5xLT+ftY=
github.com/alexflint/go-arg v1.3.0 h1:UfldqSdFWeLtoOuVRosqofU4nmhI1pYEbT4ZFS34Bdo=
github.com/alexflint/go-arg v1.3.0/go.mod h1:9iRbDxne7LcR/GSvEr7ma++GLpdIU1zrghf2y2768kM=
github.com/alexflint/go-arg v1.4.2 h1:lDWZAXxpAnZUq4qwb86p/3rIJJ2Li81EoMbTMujhVa0=
github.com/alexflint/go-arg v1.4.2/go.mod h1:9iRbDxne7LcR/GSvEr7ma++GLpdIU1zrghf2y2768kM=
github.com/alexflint/go-scalar v1.0.0 h1:NGupf1XV/Xb04wXskDFzS0KWOLH632W/EO4fAFi+A70=
github.com/alexflint/go-scalar v1.0.0/go.mod h1:GpHzbCOZXEKMEcygYQ5n/aa4Aq84zbxjy3MxYW0gjYw=
github.com/alexflint/go-scalar v1.1.0 h1:aaAouLLzI9TChcPXotr6gUhq+Scr8rl0P9P4PnltbhM=
github.com/alexflint/go-scalar v1.1.0/go.mod h1:LoFvNMqS1CPrMVltza4LvnGKhaSpc3oyLEBUZVhhS2o=
github.com/anacrolix/chansync v0.0.0-20210524073341-a336ebc2de92/go.mod h1:DZsatdsdXxD0WiwcGl0nJVwyjCKMDv+knl1q2iBjA2k=
github.com/anacrolix/chansync v0.1.0 h1:4cIfJmEV8sYkSEMW2AXnPjX6iQT4plqELJ65pLna6OA=
github.com/anacrolix/chansync v0.1.0/go.mod h1:DZsatdsdXxD0WiwcGl0nJVwyjCKMDv+knl1q2iBjA2k=
github.com/anacrolix/chansync v0.1.1-0.20210904130811-9cd7139c8dd9 h1:Jk3Mdr+XbO1uvf/+nUXjb/M1dPDNPQThxKmS5MLGE+w=
github.com/anacrolix/chansync v0.1.1-0.20210904130811-9cd7139c8dd9/go.mod h1:DZsatdsdXxD0WiwcGl0nJVwyjCKMDv+knl1q2iBjA2k=
@@ -64,7 +63,6 @@ github.com/anacrolix/dht/v2 v2.8.1-0.20210221225335-7a6713a749f9/go.mod h1:p7fLH
github.com/anacrolix/dht/v2 v2.8.1-0.20210311003418-13622df072ae/go.mod h1:wLmYr78fBu4KfUUkFZyGFFwDPDw9EHL5x8c632XCZzs=
github.com/anacrolix/dht/v2 v2.9.1/go.mod h1:ZyYcIQinN/TE3oKONCchQOLjhYR786Jaxz3jsBtih4A=
github.com/anacrolix/dht/v2 v2.10.0/go.mod h1:KC51tqylRYBu82RM5pEYf+g1n7db+F0tOJqSbCjjZWc=
github.com/anacrolix/dht/v2 v2.10.3 h1:15MpbQ9arTuCte5peEr20UbBeSxiwB4QZdrhXca+DmE=
github.com/anacrolix/dht/v2 v2.10.3/go.mod h1:TYqXd2uf0Ro7x3SFZcmit1qFrQFryA/R7bvlllBqnZM=
github.com/anacrolix/dht/v2 v2.10.5-0.20210902001729-06cc4fe90e53 h1:MfpC7SsXAEzli0gBq9LJJCduZ0OmYbL34QK90bztQO8=
github.com/anacrolix/dht/v2 v2.10.5-0.20210902001729-06cc4fe90e53/go.mod h1:zHjijcebN+L7JbzxW0mOraHis+I81EIgsJAAtiw8bQ8=
@@ -127,7 +125,6 @@ github.com/anacrolix/stm v0.1.1-0.20191106051447-e749ba3531cf/go.mod h1:zoVQRvSi
github.com/anacrolix/stm v0.2.0/go.mod h1:zoVQRvSiGjGoTmbM0vSLIiaKjWtNPeTvXUSdJQA4hsg=
github.com/anacrolix/stm v0.2.1-0.20201002073511-c35a2c748c6a/go.mod h1:spImf/rXwiAUoYYJK1YCZeWkpaHZ3kzjGFjwK5OStfU=
github.com/anacrolix/stm v0.2.1-0.20210310231625-45c211559de6/go.mod h1:spImf/rXwiAUoYYJK1YCZeWkpaHZ3kzjGFjwK5OStfU=
github.com/anacrolix/stm v0.3.0-alpha h1:yhOHk1NPkpGKqCAOB4XkgFXwB5Eh2KU/WVMksNnxr2Y=
github.com/anacrolix/stm v0.3.0-alpha/go.mod h1:spImf/rXwiAUoYYJK1YCZeWkpaHZ3kzjGFjwK5OStfU=
github.com/anacrolix/stm v0.3.0 h1:peQncJSNJtk1YBrFbW0DLKYqll+sa0kOk8EvXRcO+wA=
github.com/anacrolix/stm v0.3.0/go.mod h1:spImf/rXwiAUoYYJK1YCZeWkpaHZ3kzjGFjwK5OStfU=
@@ -158,10 +155,9 @@ github.com/anacrolix/torrent v1.25.1-0.20210221061757-051093ca31f5/go.mod h1:737
github.com/anacrolix/torrent v1.25.1-0.20210224024805-693c30dd889e/go.mod h1:d4V6QqkInfQidWVk8b8hMv8mtciswNitI1A2BiRSQV0=
github.com/anacrolix/torrent v1.28.1-0.20210622065255-582f0ccd48a0/go.mod h1:15VRIA5/DwqbqETbKo3fzlC4aSbB0iMoo10ng3mzAbE=
github.com/anacrolix/torrent v1.29.0/go.mod h1:40Hf2bWxFqTbTWbrdig57JnmYLCjShbWWjdbB3VN5n4=
github.com/anacrolix/torrent v1.30.2/go.mod h1:vbNxKfaGiNq8edcCaQI1oSNJwh4GMqtMUMF9qOdZ6C0=
github.com/anacrolix/torrent v1.31.0 h1:G/vERyt+9oiJz6Ehpd+KqFIKh22/qfeUeWCwCVRGJKI=
github.com/anacrolix/torrent v1.31.0/go.mod h1:IUGa0cjbz4vo2S0jNx2RQXAiCew+WITcUoxaw2gF20o=
github.com/anacrolix/torrent v1.31.1-0.20210905013341-ccb90f125296 h1:PLjvMvnur7c0dAE8LadZYC7gGTgp3U383QDr0uLn9JY=
github.com/anacrolix/torrent v1.31.1-0.20210905013341-ccb90f125296/go.mod h1:hfrRvz8amn2Wbfg7dO33HKrXpKI1GW6L6iyuHhhhpWc=
github.com/anacrolix/upnp v0.1.1/go.mod h1:LXsbsp5h+WGN7YR+0A7iVXm5BL1LYryDev1zuJMWYQo=
github.com/anacrolix/upnp v0.1.2-0.20200416075019-5e9378ed1425 h1:/Wi6l2ONI1FUFWN4cBwHOO90V4ylp4ud/eov6GUcVFk=
github.com/anacrolix/upnp v0.1.2-0.20200416075019-5e9378ed1425/go.mod h1:Pz94W3kl8rf+wxH3IbCa9Sq+DTJr8OSbV2Q3/y51vYs=
@@ -209,6 +205,7 @@ github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -251,8 +248,8 @@ github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
github.com/gin-gonic/gin v1.5.0/go.mod h1:Nd6IXA8m5kNZdNEHMBd93KT+mdY3+bewLgRvmCsR2Do=
github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M=
github.com/gin-gonic/gin v1.7.0 h1:jGB9xAJQ12AIGNB4HguylppmDK1Am9ppF7XnGXXJuoU=
github.com/gin-gonic/gin v1.7.0/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY=
github.com/gin-gonic/gin v1.7.4 h1:QmUZXrvJ9qZ3GfWvQ+2wnW/1ePrTEJqPKMYEU3lD/DM=
github.com/gin-gonic/gin v1.7.4/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY=
github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE=
github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE=
@@ -271,14 +268,17 @@ github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG
github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A=
github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
github.com/go-playground/locales v0.12.1/go.mod h1:IUMDtCfWo/w/mtMfIE/IG2K+Ey3ygWanZIBtBW0W2TM=
github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q=
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb8WugfUU=
github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs=
github.com/go-playground/universal-translator v0.16.0/go.mod h1:1AnU7NaIRDWWzGEKwgtJRd2xk99HeFyHw3yid4rvQIY=
github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm+REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no=
github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU+Scu5vgOQjsIJAF8j9muTVoKLVtA=
github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho=
github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA=
github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI=
github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn+GE=
github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4=
github.com/go-playground/validator/v10 v10.9.0 h1:NgTtmN58D0m8+UuxtYmGztBJB7VnPgjj221I1QHci2A=
github.com/go-playground/validator/v10 v10.9.0/go.mod h1:74x4gJWsvQexRdW8Pn3dXSGrTK4nAUsbPlLADvpJkos=
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
@@ -307,8 +307,10 @@ github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:W
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
@@ -322,8 +324,9 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
@@ -398,8 +401,9 @@ github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCV
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68=
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ=
github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
@@ -412,15 +416,18 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw=
github.com/leodido/go-urn v1.2.0 h1:hpXL4XnriNwQ/ABnpepYM/1vCLWNDfUNts8dX3xTG6Y=
github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w=
github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY=
github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM=
github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=
github.com/lucas-clemente/quic-go v0.7.1-0.20190401152353-907071221cf9/go.mod h1:PpMmPfPKO9nKJ/psF49ESTAGQSdfXxlg1otPbEB2nOw=
@@ -442,8 +449,9 @@ github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx
github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ=
github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-sqlite3 v1.7.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
@@ -553,7 +561,6 @@ github.com/pion/rtp v1.6.1/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko
github.com/pion/rtp v1.6.2/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko=
github.com/pion/rtp v1.6.5/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko=
github.com/pion/rtp v1.7.0/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko=
github.com/pion/rtp v1.7.1 h1:hCaxfVgPGt13eF/Tu9RhVn04c+dAcRZmhdDWqUE13oY=
github.com/pion/rtp v1.7.1/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko=
github.com/pion/rtp v1.7.2 h1:HCDKDCixh7PVjkQTsqHAbk1lg+bx059EHxcnyl42dYs=
github.com/pion/rtp v1.7.2/go.mod h1:bDb5n+BFZxXx0Ea7E5qe+klMuqiBrP+w8XSjiWtCUko=
@@ -594,6 +601,7 @@ github.com/pion/webrtc/v3 v3.0.32 h1:5J+zNep9am8Swh6kEMp+LaGXNvn6qQWpGkLBnVW44L4
github.com/pion/webrtc/v3 v3.0.32/go.mod h1:wX3V5dQQUGCifhT1mYftC2kCrDQX6ZJ3B7Yad0R9JK0=
github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4 h1:Qj1ukM4GlMWXNdMBuXcXfz/Kw9s1qm0CLY32QxuSImI=
github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
@@ -635,6 +643,9 @@ github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4O
github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8=
github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE=
github.com/rs/dnscache v0.0.0-20190621150935-06bb5526f76b/go.mod h1:qe5TWALJ8/a1Lqznoc5BDHpYX/8HU60Hm2AwRmqzxqA=
github.com/rs/dnscache v0.0.0-20210201191234-295bba877686 h1:IJ6Df0uxPDtNoByV0KkzVKNseWvZFCNM/S9UoyOMCSI=
github.com/rs/dnscache v0.0.0-20210201191234-295bba877686/go.mod h1:qe5TWALJ8/a1Lqznoc5BDHpYX/8HU60Hm2AwRmqzxqA=
@@ -708,13 +719,16 @@ github.com/tinylib/msgp v1.1.1/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDW
github.com/tinylib/msgp v1.1.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE=
github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg=
github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
github.com/tsynik/dms v0.0.0-20210906013928-2decf97d15be/go.mod h1:1GqMUla/yTV3GFjpKMpmdntkTl6aslGK3jfIksEwIdI=
github.com/tsynik/dms v0.0.0-20210909053938-38af4173d4ac h1:1JLBJz2aGJhQ6ZR+zJWl68/0DLJkr+E3E74HEzOFOjw=
github.com/tsynik/dms v0.0.0-20210909053938-38af4173d4ac/go.mod h1:oWW4QbQ9YGl+FJ1X8xcrUYVObfA/KdipoeBuTC4ltG8=
github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q=
github.com/tv42/httpunix v0.0.0-20191220191345-2ba4b9c3382c/go.mod h1:hzIxponao9Kjc7aWznkXaL4U4TWaDSs8zcsY4Ka08nM=
github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo=
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs=
github.com/ugorji/go v1.2.6 h1:tGiWC9HENWE2tqYycIqFTNorMmFRVhNwCpDOpWqnk8E=
github.com/ugorji/go v1.2.6/go.mod h1:anCg0y61KIhDlPZmnH+so+RQbysYVyDko0IMgJv0Nn0=
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
github.com/ugorji/go/codec v1.2.6 h1:7kbGefxLoDBuYXOms4yD7223OpNMMPNPZxXk5TvFcyQ=
github.com/ugorji/go/codec v1.2.6/go.mod h1:V6TCNZ4PHqoHGFZuSG1W8nrCzzdgA2DozYxWFFpvxTw=
github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU=
@@ -766,6 +780,7 @@ golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20210813211128-0a44fdfbc16e h1:VvfwVmMH40bpMeizC9/K7ipM5Qjucuu16RWfneFPyhQ=
golang.org/x/crypto v0.0.0-20210813211128-0a44fdfbc16e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
@@ -890,11 +905,13 @@ golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210415045647-66c3f260301c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e h1:WUoyKPm6nCo1BnNUvPGnFG3T5DUVem42yDJZZ4CNxMA=
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
@@ -977,13 +994,17 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
@@ -1004,8 +1025,9 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=

View File

@@ -49,7 +49,7 @@ func Init(path, webpath string) {
os.Stderr = ff
//https://stackoverflow.com/a/36140590
//fmt.Print(time.Now().UTC().Format("2006-01-02T15:04:05.999Z") + " TLOG " + string(bytes))
log.SetFlags(log.Ldate|log.Ltime|log.LUTC|log.Lmsgprefix)
log.SetFlags(log.Ldate | log.Ltime | log.LUTC | log.Lmsgprefix)
log.SetPrefix("UTC0 TLOG ")
log.SetOutput(ff)
}

View File

@@ -65,7 +65,7 @@ func (t *Torrent) Preload(index int, size int64) {
// mb5 -> 8/16 MB
mb5 := int64(t.Info().PieceLength)
if (mb5 < 8 * 1024 * 1024) {
if mb5 < 8*1024*1024 {
mb5 = 8 * 1024 * 1024
}

View File

@@ -8,6 +8,7 @@ import (
"net/http"
"time"
"github.com/anacrolix/dms/dlna"
"github.com/anacrolix/missinggo/httptoo"
"github.com/anacrolix/torrent"
@@ -55,11 +56,19 @@ func (t *Torrent) Stream(fileID int, req *http.Request, resp http.ResponseWriter
log.Println("Connect client", host, port)
}
}
sets.SetViewed(&sets.Viewed{t.Hash().HexString(), fileID})
resp.Header().Set("Connection", "close")
resp.Header().Set("ETag", httptoo.EncodeQuotedString(fmt.Sprintf("%s/%s", t.Hash().HexString(), file.Path())))
resp.Header().Set("transferMode.dlna.org", "Streaming")
if req.Header.Get("getContentFeatures.dlna.org") != "" {
resp.Header().Set("contentFeatures.dlna.org", dlna.ContentFeatures{
SupportRange: true,
SupportTimeSeek: true,
}.String())
}
http.ServeContent(resp, req, file.Path(), time.Unix(t.Timestamp, 0), reader)

View File

@@ -1,3 +1,3 @@
package version
const Version = "MatriX.105.NE"
const Version = "MatriX.106.NE"

View File

@@ -5,7 +5,6 @@ import (
"time"
"github.com/gin-gonic/gin"
sets "server/settings"
"server/torr"
)

220
server/web/msx/msx.go Normal file
View File

@@ -0,0 +1,220 @@
package msx
import (
"fmt"
"net/url"
"path/filepath"
"strings"
sets "server/settings"
"server/torr"
"server/torr/state"
"server/utils"
"server/version"
"github.com/gin-gonic/gin"
)
type msxMenu struct {
Logo string `json:"logo,omitempty"`
Reuse bool `json:"reuse"`
Cache bool `json:"cache"`
Restore bool `json:"restore"`
Menu []msxMenuItem `json:"menu"`
}
type msxMenuItem struct {
Icon string `json:"icon,omitempty"`
Label string `json:"label,omitempty"`
Data msxData `json:"data,omitempty"`
}
type msxData struct {
Type string `json:"type,omitempty"`
Headline string `json:"headline,omitempty"`
Action string `json:"action,omitempty"`
Template gin.H `json:"template,omitempty"`
Items []msxItem `json:"items,omitempty"`
Pages []msxPage `json:"pages,omitempty"`
}
type msxItem struct {
Title string `json:"title,omitempty"`
Label string `json:"label,omitempty"`
PlayerLabel string `json:"playerLabel,omitempty"`
Action string `json:"action,omitempty"`
Image string `json:"image,omitempty"`
Icon string `json:"icon,omitempty"`
Badge string `json:"badge,omitempty"`
Tag string `json:"tag,omitempty"`
}
type msxPage struct {
Items []gin.H `json:"items,omitempty"`
}
func msxStart(c *gin.Context) {
c.JSON(200, gin.H{
"name": "TorrServer",
"version": version.Version,
"parameter": "menu:{PREFIX}{SERVER}/msx/torrents",
})
}
// /msx/torrents
func msxTorrents(c *gin.Context) {
torrs := torr.ListTorrent()
host := utils.GetScheme(c) + "://" + c.Request.Host
logo := host + "/apple-touch-icon.png"
list := make([]msxItem, len(torrs))
for i, tor := range torrs {
item := msxItem{
Title: tor.Title,
Image: tor.Poster,
Action: "content:" + host + "/msx/playlist/" + url.PathEscape(tor.Title) + "?hash=" + tor.TorrentSpec.InfoHash.HexString(),
}
list[i] = item
}
c.JSON(200, msxMenu{
Logo: logo,
Cache: false,
Reuse: false,
Restore: false,
Menu: []msxMenuItem{
// Main page
{
Icon: "list",
Label: "Torrents",
Data: msxData{
Type: "pages",
Template: gin.H{
"type": "separate",
"layout": "0,0,2,4",
"icon": "msx-white-soft:movie",
"color": "msx-glass",
},
Items: list,
},
// About
}, {
Icon: "info",
Label: "About",
Data: msxData{
Pages: []msxPage{
{
Items: []gin.H{
{
"type": "default",
"headline": "TorrServer " + version.Version,
"text": "https://github.com/YouROK/TorrServer",
"image": logo,
"imageFiller": "height-left",
"imageWidth": 2,
"layout": "0,0,8,2",
"color": "msx-gray-soft",
},
},
},
},
},
},
},
})
}
// /msx/playlist?hash=...
func msxPlaylist(c *gin.Context) {
hash, _ := c.GetQuery("hash")
if hash == "" {
c.JSON(200, msxData{
Action: "error:Item not found",
})
return
}
tor := torr.GetTorrent(hash)
if tor == nil {
c.JSON(200, msxData{
Action: "error:Item not found",
})
return
}
if tor.Stat == state.TorrentInDB {
tor = torr.LoadTorrent(tor)
if tor == nil {
c.JSON(200, msxData{
Action: "error:Error while getting torrent info",
})
return
}
}
host := utils.GetScheme(c) + "://" + c.Request.Host
status := tor.Status()
viewed := sets.ListViewed(hash)
var list []msxItem
for _, f := range status.FileStats {
mime := utils.GetMimeType(f.Path)
action := mime[0 : len(mime)-2]
if action == "*" {
continue
}
name := filepath.Base(f.Path)
item := msxItem{
Label: name,
PlayerLabel: strings.TrimSuffix(name, filepath.Ext(name)),
Action: action + ":" + host + "/stream/" + url.PathEscape(name) + "?link=" + hash + "&index=" + fmt.Sprint(f.Id) + "&play",
}
if isViewed(viewed, f.Id) {
item.Tag = " "
}
if action == "audio" {
item.Icon = "msx-white-soft:music-note"
}
list = append(list, item)
}
if len(list) == 0 {
c.JSON(200, msxData{
Action: "error:No supported content found",
})
return
}
res := msxData{
Headline: tor.Title,
Type: "list",
Template: gin.H{
"type": "control",
"layout": "0,2,12,1",
"color": "msx-glass",
"icon": "msx-white-soft:movie",
"iconSize": "medium",
"badgeColor": "msx-yellow",
"tagColor": "msx-yellow",
},
Items: list,
}
// If only one item start to play immediately but it not works
// if (len(list) == 1) {
// res.Action = "execute:" + list[0].Action
// }
c.JSON(200, res)
}
func isViewed(viewed []*sets.Viewed, id int) bool {
for _, v := range viewed {
if v.FileIndex == id {
return true
}
}
return false
}

10
server/web/msx/route.go Normal file
View File

@@ -0,0 +1,10 @@
package msx
import "github.com/gin-gonic/gin"
func SetupRoute(route *gin.RouterGroup) {
route.GET("/msx/start.json", msxStart)
route.GET("/msx/torrents", msxTorrents)
route.GET("/msx/playlist", msxPlaylist)
route.GET("/msx/playlist/*fname", msxPlaylist)
}

View File

@@ -0,0 +1,71 @@
package template
import (
_ "embed"
)
//go:embed pages/android-chrome-192x192.png
var Androidchrome192x192png []byte
//go:embed pages/android-chrome-512x512.png
var Androidchrome512x512png []byte
//go:embed pages/apple-touch-icon.png
var Appletouchiconpng []byte
//go:embed pages/asset-manifest.json
var Assetmanifestjson []byte
//go:embed pages/browserconfig.xml
var Browserconfigxml []byte
//go:embed pages/dlnaicon-120.jpg
var Dlnaicon120jpg []byte
//go:embed pages/dlnaicon-120.png
var Dlnaicon120png []byte
//go:embed pages/dlnaicon-48.jpg
var Dlnaicon48jpg []byte
//go:embed pages/dlnaicon-48.png
var Dlnaicon48png []byte
//go:embed pages/favicon-16x16.png
var Favicon16x16png []byte
//go:embed pages/favicon-32x32.png
var Favicon32x32png []byte
//go:embed pages/favicon.ico
var Faviconico []byte
//go:embed pages/index.html
var Indexhtml []byte
//go:embed pages/mstile-150x150.png
var Mstile150x150png []byte
//go:embed pages/site.webmanifest
var Sitewebmanifest []byte
//go:embed pages/static/js/2.937400ae.chunk.js
var Staticjs2937400aechunkjs []byte
//go:embed pages/static/js/2.937400ae.chunk.js.LICENSE.txt
var Staticjs2937400aechunkjsLICENSEtxt []byte
//go:embed pages/static/js/2.937400ae.chunk.js.map
var Staticjs2937400aechunkjsmap []byte
//go:embed pages/static/js/main.f2cdf583.chunk.js
var Staticjsmainf2cdf583chunkjs []byte
//go:embed pages/static/js/main.f2cdf583.chunk.js.map
var Staticjsmainf2cdf583chunkjsmap []byte
//go:embed pages/static/js/runtime-main.33603a80.js
var Staticjsruntimemain33603a80js []byte
//go:embed pages/static/js/runtime-main.33603a80.js.map
var Staticjsruntimemain33603a80jsmap []byte

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -0,0 +1,17 @@
{
"files": {
"main.js": "/static/js/main.f2cdf583.chunk.js",
"main.js.map": "/static/js/main.f2cdf583.chunk.js.map",
"runtime-main.js": "/static/js/runtime-main.33603a80.js",
"runtime-main.js.map": "/static/js/runtime-main.33603a80.js.map",
"static/js/2.937400ae.chunk.js": "/static/js/2.937400ae.chunk.js",
"static/js/2.937400ae.chunk.js.map": "/static/js/2.937400ae.chunk.js.map",
"index.html": "/index.html",
"static/js/2.937400ae.chunk.js.LICENSE.txt": "/static/js/2.937400ae.chunk.js.LICENSE.txt"
},
"entrypoints": [
"static/js/runtime-main.33603a80.js",
"static/js/2.937400ae.chunk.js",
"static/js/main.f2cdf583.chunk.js"
]
}

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#00a300</TileColor>
</tile>
</msapplication>
</browserconfig>

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 824 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -0,0 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"><link rel="manifest" href="/site.webmanifest"><meta name="msapplication-TileColor" content="#00a572"><meta name="theme-color" content="#ffffff"><link rel="preconnect" href="https://fonts.gstatic.com"><link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600&display=swap" rel="stylesheet"><meta name="viewport" content="width=device-width,shrink-to-fit=no"><meta name="description" content="TorrServer - torrent to http stream"/><title>TorrServer MatriX</title></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script src="https://cdn.lordicon.com/libs/frhvbuzj/lord-icon-2.0.2.js"></script><script src="https://www.gstatic.com/firebasejs/8.1.2/firebase-app.js"></script><script src="https://www.gstatic.com/firebasejs/8.1.2/firebase-analytics.js"></script><script>const firebaseConfig={apiKey:"AIzaSyDivIsadtzAmp3SIY4yArNcFugUmr63rvo",authDomain:"torrserve.firebaseapp.com",databaseURL:"https://torrserve.firebaseio.com",projectId:"torrserve",storageBucket:"torrserve.appspot.com",messagingSenderId:"400168070412",appId:"1:400168070412:web:82c8e43dd7fc8f807aed29",measurementId:"G-T4RC2BFRSF"};firebase.initializeApp(firebaseConfig),firebase.analytics()</script><script>!function(e){function r(r){for(var n,l,f=r[0],i=r[1],a=r[2],c=0,s=[];c<f.length;c++)l=f[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,f=1;f<t.length;f++){var i=t[f];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var f=this.webpackJsonptorrserver_web=this.webpackJsonptorrserver_web||[],i=f.push.bind(f);f.push=r,f=f.slice();for(var a=0;a<f.length;a++)r(f[a]);var p=i;t()}([])</script><script src="/static/js/2.937400ae.chunk.js"></script><script src="/static/js/main.f2cdf583.chunk.js"></script></body></html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -0,0 +1,19 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,92 @@
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/
/*! blob-to-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
/*! https://mths.be/punycode v1.4.1 by @mathias */
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
/*! magnet-uri. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
/*! parse-torrent. MIT License. WebTorrent LLC <https://webtorrent.io/opensource> */
/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
/*! simple-concat. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
/*! simple-get. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
/**
* A better abstraction over CSS.
*
* @copyright Oleg Isonen (Slobodskoi) / Isonen 2014-present
* @website https://github.com/cssinjs/jss
* @license MIT
*/
/** @license React v0.20.2
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.2
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.2
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.2
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/** @license React v17.0.2
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,99 @@
package template
import (
"github.com/gin-gonic/gin"
)
func RouteWebPages(route *gin.RouterGroup) {
route.GET("/", func(c *gin.Context) {
c.Data(200, "text/html; charset=utf-8", Indexhtml)
})
route.GET("/android-chrome-192x192.png", func(c *gin.Context) {
c.Data(200, "image/png", Androidchrome192x192png)
})
route.GET("/android-chrome-512x512.png", func(c *gin.Context) {
c.Data(200, "image/png", Androidchrome512x512png)
})
route.GET("/apple-touch-icon.png", func(c *gin.Context) {
c.Data(200, "image/png", Appletouchiconpng)
})
route.GET("/asset-manifest.json", func(c *gin.Context) {
c.Data(200, "application/json", Assetmanifestjson)
})
route.GET("/browserconfig.xml", func(c *gin.Context) {
c.Data(200, "application/xml", Browserconfigxml)
})
route.GET("/dlnaicon-120.jpg", func(c *gin.Context) {
c.Data(200, "image/jpeg", Dlnaicon120jpg)
})
route.GET("/dlnaicon-120.png", func(c *gin.Context) {
c.Data(200, "image/png", Dlnaicon120png)
})
route.GET("/dlnaicon-48.jpg", func(c *gin.Context) {
c.Data(200, "image/jpeg", Dlnaicon48jpg)
})
route.GET("/dlnaicon-48.png", func(c *gin.Context) {
c.Data(200, "image/png", Dlnaicon48png)
})
route.GET("/favicon-16x16.png", func(c *gin.Context) {
c.Data(200, "image/png", Favicon16x16png)
})
route.GET("/favicon-32x32.png", func(c *gin.Context) {
c.Data(200, "image/png", Favicon32x32png)
})
route.GET("/favicon.ico", func(c *gin.Context) {
c.Data(200, "image/x-icon", Faviconico)
})
route.GET("/index.html", func(c *gin.Context) {
c.Data(200, "text/html; charset=utf-8", Indexhtml)
})
route.GET("/mstile-150x150.png", func(c *gin.Context) {
c.Data(200, "image/png", Mstile150x150png)
})
route.GET("/site.webmanifest", func(c *gin.Context) {
c.Data(200, "application/manifest+json", Sitewebmanifest)
})
route.GET("/static/js/2.937400ae.chunk.js", func(c *gin.Context) {
c.Data(200, "application/javascript", Staticjs2937400aechunkjs)
})
route.GET("/static/js/2.937400ae.chunk.js.LICENSE.txt", func(c *gin.Context) {
c.Data(200, "text/plain; charset=utf-8", Staticjs2937400aechunkjsLICENSEtxt)
})
route.GET("/static/js/2.937400ae.chunk.js.map", func(c *gin.Context) {
c.Data(200, "application/json", Staticjs2937400aechunkjsmap)
})
route.GET("/static/js/main.f2cdf583.chunk.js", func(c *gin.Context) {
c.Data(200, "application/javascript", Staticjsmainf2cdf583chunkjs)
})
route.GET("/static/js/main.f2cdf583.chunk.js.map", func(c *gin.Context) {
c.Data(200, "application/json", Staticjsmainf2cdf583chunkjsmap)
})
route.GET("/static/js/runtime-main.33603a80.js", func(c *gin.Context) {
c.Data(200, "application/javascript", Staticjsruntimemain33603a80js)
})
route.GET("/static/js/runtime-main.33603a80.js.map", func(c *gin.Context) {
c.Data(200, "application/json", Staticjsruntimemain33603a80jsmap)
})
}

View File

@@ -8,6 +8,7 @@ import (
"github.com/gin-gonic/gin"
"server/dlna"
"server/settings"
"server/web/msx"
"server/log"
"server/torr"
@@ -48,9 +49,11 @@ func Start(port string) {
routeAuth := auth.SetupAuth(route)
if routeAuth != nil {
api.SetupRoute(routeAuth)
msx.SetupRoute(routeAuth)
pages.SetupRoute(routeAuth)
} else {
api.SetupRoute(&route.RouterGroup)
msx.SetupRoute(&route.RouterGroup)
pages.SetupRoute(&route.RouterGroup)
}
if settings.BTsets.EnableDLNA {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 213 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -3,7 +3,7 @@
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#da532c</TileColor>
<TileColor>#00a300</TileColor>
</tile>
</msapplication>
</browserconfig>

BIN
web/public/dlnaicon-120.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

BIN
web/public/dlnaicon-120.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
web/public/dlnaicon-48.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
web/public/dlnaicon-48.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 817 B

After

Width:  |  Height:  |  Size: 824 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -3,20 +3,19 @@
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="192x192" href="/android-chrome-192x192.png">
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
<link rel="manifest" href="/site.webmanifest">
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-TileColor" content="#00a572">
<meta name="theme-color" content="#ffffff">
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600&display=swap" rel="stylesheet">
<meta name="viewport" content="width=device-width, shrink-to-fit=no">
<meta name="description" content="TorrServer - torrent to http stream" />
<title>TorrServer</title>
<title>TorrServer MatriX</title>
</head>
<body>
@@ -42,4 +41,4 @@
</script>
</body>
</html>
</html>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@@ -1,19 +1,19 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}
"name": "",
"short_name": "",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

View File

@@ -2,7 +2,12 @@ import { useTranslation } from 'react-i18next'
export default () => {
const { i18n } = useTranslation()
const currentLanguage = i18n.language === 'en-US' || i18n.language === 'en' ? 'en' : i18n.language
const currentLanguage =
i18n.language === 'en-US' || i18n.language === 'en'
? 'en'
: i18n.language === 'ru-RU' || i18n.language === 'ru'
? 'ru'
: i18n.language
return [currentLanguage, lang => i18n.changeLanguage(lang)]
}