Skip to content

Commit

Permalink
Update file main.go
Browse files Browse the repository at this point in the history
  • Loading branch information
Book Father committed Aug 21, 2024
1 parent 830fddf commit a19a863
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ import (
var (
folderPath = os.Getenv("TORBOX_WATCH_FOLDER")
torboxAPIKey = os.Getenv("TORBOX_API_KEY")
torboxAPIBase = os.Getenv("TORBOX_API_BASE")
torboxAPIVer = os.Getenv("TORBOX_API_VERSION")
deleteAfterUpload bool
)

const (
maxRetries = 3
retryDelay = 5 * time.Second
maxRetries = 3
retryDelay = 5 * time.Second
torboxAPIBase = "https://api.torbox.app"
torboxAPIVersion = "v1"
)

type TorBoxResponse struct {
Expand Down Expand Up @@ -210,14 +210,14 @@ func main() {
log.Println("Krantorbox Auto-Upload Started")
log.Printf("Watching folder: %s", folderPath)
log.Printf("TorBox API Base: %s", torboxAPIBase)
log.Printf("TorBox API Version: %s", torboxAPIVer)
log.Printf("TorBox API Version: %s", torboxAPIVersion)
if deleteAfterUpload {
log.Println("File deletion after upload is enabled")
} else {
log.Println("File deletion after upload is disabled")
}

if folderPath == "" || torboxAPIKey == "" || torboxAPIBase == "" || torboxAPIVer == "" {
if folderPath == "" || torboxAPIKey == "" {
log.Fatal("Please set all required environment variables")
}

Expand Down

0 comments on commit a19a863

Please sign in to comment.