mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
add error if file db not open
This commit is contained in:
@@ -1,5 +1,12 @@
|
|||||||
package settings
|
package settings
|
||||||
|
|
||||||
|
import (
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
|
||||||
|
"server/log"
|
||||||
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
tdb *TDB
|
tdb *TDB
|
||||||
Path string
|
Path string
|
||||||
@@ -10,6 +17,10 @@ var (
|
|||||||
func InitSets(readOnly bool) {
|
func InitSets(readOnly bool) {
|
||||||
ReadOnly = readOnly
|
ReadOnly = readOnly
|
||||||
tdb = NewTDB()
|
tdb = NewTDB()
|
||||||
|
if tdb == nil {
|
||||||
|
log.TLogln("Error open db:", filepath.Join(Path, "config.db"))
|
||||||
|
os.Exit(1)
|
||||||
|
}
|
||||||
loadBTSets()
|
loadBTSets()
|
||||||
Migrate()
|
Migrate()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user