mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 21:46:11 +05:00
* https service added on port 8091 default * https port check * format * readme * readme * readme * readme --------- Co-authored-by: evfedoto <evfedoto@cisco.com> Co-authored-by: nikk <tsynik@gmail.com>
39 lines
510 B
Go
39 lines
510 B
Go
package settings
|
|
|
|
import (
|
|
"os"
|
|
"path/filepath"
|
|
|
|
"server/log"
|
|
)
|
|
|
|
var (
|
|
tdb *TDB
|
|
Path string
|
|
Port string
|
|
SslPort string
|
|
Ssl bool
|
|
ReadOnly bool
|
|
HttpAuth bool
|
|
SearchWA bool
|
|
PubIPv4 string
|
|
PubIPv6 string
|
|
TorAddr string
|
|
)
|
|
|
|
func InitSets(readOnly, searchWA bool) {
|
|
ReadOnly = readOnly
|
|
SearchWA = searchWA
|
|
tdb = NewTDB()
|
|
if tdb == nil {
|
|
log.TLogln("Error open db:", filepath.Join(Path, "config.db"))
|
|
os.Exit(1)
|
|
}
|
|
loadBTSets()
|
|
Migrate()
|
|
}
|
|
|
|
func CloseDB() {
|
|
tdb.CloseDB()
|
|
}
|