Add token management

This commit is contained in:
Ben Adrian Sarmiento
2024-06-28 13:19:09 +02:00
parent 962845fb81
commit c3aea427d0
9 changed files with 100 additions and 114 deletions

View File

@@ -121,7 +121,7 @@ func MainApp(configPath string) {
}
defer workerPool.Release()
api := realdebrid.NewRealDebrid(
rd := realdebrid.NewRealDebrid(
apiClient,
unrestrictClient,
downloadClient,
@@ -132,7 +132,7 @@ func MainApp(configPath string) {
premium.MonitorPremiumStatus(
workerPool,
api,
rd,
zurglog,
)
@@ -145,14 +145,14 @@ func MainApp(configPath string) {
torrentMgr := torrent.NewTorrentManager(
config,
api,
rd,
workerPool,
hasFFprobe,
log.Named("manager"),
log.Named("repair"),
)
downloader := universal.NewDownloader(downloadClient, workerPool)
downloader := universal.NewDownloader(rd, workerPool)
router := chi.NewRouter()
handlers.AttachHandlers(
@@ -160,7 +160,7 @@ func MainApp(configPath string) {
downloader,
torrentMgr,
config,
api,
rd,
workerPool,
hosts,
log.Named("router"),