This commit is contained in:
afkarxyz
2026-04-02 08:23:58 +07:00
parent 6de2bae67b
commit b96fc8d96c
5 changed files with 175 additions and 19 deletions
+1 -5
View File
@@ -3,7 +3,6 @@ package backend
import (
"encoding/json"
"fmt"
"os"
"path/filepath"
"sort"
"time"
@@ -35,13 +34,10 @@ const (
func InitHistoryDB(appName string) error {
appDir, err := GetFFmpegDir()
appDir, err := EnsureAppDir()
if err != nil {
return err
}
if _, err := os.Stat(appDir); os.IsNotExist(err) {
os.MkdirAll(appDir, 0755)
}
dbPath := filepath.Join(appDir, "history.db")
db, err := bolt.Open(dbPath, 0600, &bolt.Options{Timeout: 1 * time.Second})