read token from config

This commit is contained in:
Ben Sarmiento
2023-10-20 01:49:06 +02:00
parent 464f522fea
commit 0e442fc9be
9 changed files with 23 additions and 22 deletions

View File

@@ -45,9 +45,9 @@ func (handler *TorrentManager) refreshTorrents() {
// NewTorrentManager creates a new torrent manager
// it will fetch all torrents and their info in the background
// and store them in-memory
func NewTorrentManager(token string, config config.ConfigInterface) *TorrentManager {
func NewTorrentManager(config config.ConfigInterface) *TorrentManager {
handler := &TorrentManager{
token: token,
token: config.GetToken(),
workerPool: make(chan bool, 10),
config: config,
}