mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 02:26:53 -07:00
Refactor downloader configuration to plugins.downloaders
This commit is contained in:
parent
ef950d8024
commit
e1aa32aee7
15 changed files with 218 additions and 186 deletions
15
core/plugins/downloaders/nzb/configuration.py
Normal file
15
core/plugins/downloaders/nzb/configuration.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
import core
|
||||
|
||||
|
||||
def configure_nzbs(config):
|
||||
nzb_config = config['Nzb']
|
||||
core.NZB_CLIENT_AGENT = nzb_config['clientAgent'] # sabnzbd
|
||||
core.NZB_DEFAULT_DIRECTORY = nzb_config['default_downloadDirectory']
|
||||
|
||||
configure_sabnzbd(nzb_config)
|
||||
|
||||
|
||||
def configure_sabnzbd(config):
|
||||
core.SABNZBD_HOST = config['sabnzbd_host']
|
||||
core.SABNZBD_PORT = int(config['sabnzbd_port'] or 8080) # defaults to accommodate NzbGet
|
||||
core.SABNZBD_APIKEY = config['sabnzbd_apikey']
|
Loading…
Add table
Add a link
Reference in a new issue