diff options
author | morpheus65535 <[email protected]> | 2017-12-19 22:25:10 -0500 |
---|---|---|
committer | morpheus65535 <[email protected]> | 2017-12-19 22:25:10 -0500 |
commit | e7b261b36aeb297bee9e925d8adcc48d326b5494 (patch) | |
tree | 18386c7bc4bc41e0cb98673ba059177cd033b126 /get_episodes.py | |
parent | 6b74cacda40a169c8afbfbba52c2cd9753b3cea3 (diff) | |
download | bazarr-e7b261b36aeb297bee9e925d8adcc48d326b5494.tar.gz bazarr-e7b261b36aeb297bee9e925d8adcc48d326b5494.zip |
Remove requirement to restart Bazarr when changing Sonarr settings
Diffstat (limited to 'get_episodes.py')
-rw-r--r-- | get_episodes.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/get_episodes.py b/get_episodes.py index 603dc4fcb..0cbc8cdc0 100644 --- a/get_episodes.py +++ b/get_episodes.py @@ -4,10 +4,14 @@ import requests import logging
from get_general_settings import *
-from get_sonarr_settings import *
from list_subtitles import *
-
+
def update_all_episodes():
+ from get_sonarr_settings import get_sonarr_settings
+ url_sonarr = get_sonarr_settings()[0]
+ url_sonarr_short = get_sonarr_settings()[1]
+ apikey_sonarr = get_sonarr_settings()[2]
+
# Open database connection
db = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db'), timeout=30)
c = db.cursor()
@@ -72,6 +76,11 @@ def update_all_episodes(): logging.info('All missing subtitles updated in database.')
def add_new_episodes():
+ from get_sonarr_settings import get_sonarr_settings
+ url_sonarr = get_sonarr_settings()[0]
+ url_sonarr_short = get_sonarr_settings()[1]
+ apikey_sonarr = get_sonarr_settings()[2]
+
# Open database connection
db = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db'), timeout=30)
c = db.cursor()
|