diff --git a/Dockerfile b/Dockerfile index 1f21c71aa..3ce6a3345 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,7 @@ RUN apt-get install -y build-essential python-dev python-pip python-setuptools l # Get application source from Github RUN git clone -b master --single-branch https://github.com/morpheus65535/bazarr.git /bazarr +RUN git config --global user.name "Bazarr" && git config --global user.email "bazarr@fake.email" VOLUME /bazarr/data diff --git a/bazarr.py b/bazarr.py index 390b0ec80..1d88e8306 100644 --- a/bazarr.py +++ b/bazarr.py @@ -1,6 +1,3 @@ -# coding: utf-8 -from __future__ import unicode_literals - bazarr_version = '0.1.4' from bottle import route, run, template, static_file, request, redirect diff --git a/check_update.py b/check_update.py index a7a75836b..6c32ebd7c 100644 --- a/check_update.py +++ b/check_update.py @@ -1,6 +1,3 @@ -# coding: utf-8 -from __future__ import unicode_literals - from get_general_settings import * import os @@ -14,7 +11,7 @@ def check_and_apply_update(repo=local_repo, remote_name='origin'): for remote in repo.remotes: if remote.name == remote_name: remote.fetch() - remote_id = repo.lookup_reference('refs/remotes/origin/' + branch).target + remote_id = repo.lookup_reference('refs/remotes/origin/' + str(branch)).target merge_result, _ = repo.merge_analysis(remote_id) # Up to date, do nothing if merge_result & pygit2.GIT_MERGE_ANALYSIS_UP_TO_DATE: diff --git a/get_episodes.py b/get_episodes.py index ee9f5750e..f8ad5ab34 100644 --- a/get_episodes.py +++ b/get_episodes.py @@ -1,6 +1,3 @@ -# coding: utf-8 -from __future__ import unicode_literals - import os import sqlite3 import requests diff --git a/get_general_settings.py b/get_general_settings.py index a517e63cb..c8c770e0e 100644 --- a/get_general_settings.py +++ b/get_general_settings.py @@ -1,6 +1,3 @@ -# coding: utf-8 -from __future__ import unicode_literals - import sqlite3 import os import ast diff --git a/get_languages.py b/get_languages.py index 8a81cb1cf..efb7cc4b0 100644 --- a/get_languages.py +++ b/get_languages.py @@ -1,6 +1,3 @@ -# coding: utf-8 -from __future__ import unicode_literals - import sqlite3 import pycountry import os diff --git a/get_providers.py b/get_providers.py index cfdf109ed..c02e5c126 100644 --- a/get_providers.py +++ b/get_providers.py @@ -1,6 +1,3 @@ -# coding: utf-8 -from __future__ import unicode_literals - import sqlite3 import os from subliminal import * diff --git a/get_series.py b/get_series.py index 61f89d080..07c52f924 100644 --- a/get_series.py +++ b/get_series.py @@ -1,6 +1,3 @@ -# coding: utf-8 -from __future__ import unicode_literals - import os import sqlite3 import requests diff --git a/get_sonarr_settings.py b/get_sonarr_settings.py index 93a02f1cc..bf64883b4 100644 --- a/get_sonarr_settings.py +++ b/get_sonarr_settings.py @@ -1,6 +1,3 @@ -# coding: utf-8 -from __future__ import unicode_literals - import sqlite3 import os import ast diff --git a/get_subtitle.py b/get_subtitle.py index f1e72c88e..f9adef8bb 100644 --- a/get_subtitle.py +++ b/get_subtitle.py @@ -1,6 +1,3 @@ -# coding: utf-8 -from __future__ import unicode_literals - import os import sqlite3 import ast diff --git a/init_db.py b/init_db.py index 9db99101b..1b6393284 100644 --- a/init_db.py +++ b/init_db.py @@ -1,6 +1,3 @@ -# coding: utf-8 -from __future__ import unicode_literals - import os import sqlite3 diff --git a/list_subtitles.py b/list_subtitles.py index 1535137f4..6eeb92940 100644 --- a/list_subtitles.py +++ b/list_subtitles.py @@ -1,6 +1,3 @@ -# coding: utf-8 -from __future__ import unicode_literals - import os import enzyme import babelfish diff --git a/scheduler.py b/scheduler.py index 724b9a12b..d57e108e3 100644 --- a/scheduler.py +++ b/scheduler.py @@ -1,6 +1,3 @@ -# coding: utf-8 -from __future__ import unicode_literals - from get_general_settings import * from get_series import * from get_episodes import * @@ -18,7 +15,7 @@ scheduler.add_job(update_series, 'interval', minutes=1, max_instances=1, coalesc scheduler.add_job(add_new_episodes, 'interval', minutes=1, max_instances=1, coalesce=True, id='add_new_episodes', name='Add new episodes from Sonarr') scheduler.add_job(update_all_episodes, 'cron', hour=4, max_instances=1, coalesce=True, id='update_all_episodes', name='Update all episodes from Sonarr') scheduler.add_job(list_missing_subtitles, 'interval', minutes=5, max_instances=1, coalesce=True, id='list_missing_subtitles', name='Process missing subtitles for all series') -scheduler.add_job(wanted_search_missing_subtitles, 'interval', minutes=15, max_instances=1, coalesce=True, id='wanted_search_missing_subtitles', name='Search for wanted subtitles') +scheduler.add_job(wanted_search_missing_subtitles, 'interval', hours=3, max_instances=1, coalesce=True, id='wanted_search_missing_subtitles', name='Search for wanted subtitles') scheduler.start() def execute_now(taskid): diff --git a/update.py b/update.py deleted file mode 100644 index 02b31f232..000000000 --- a/update.py +++ /dev/null @@ -1,9 +0,0 @@ -# coding: utf-8 -from __future__ import unicode_literals - -from get_general_settings import * - -import git - -g = git.cmd.Git(os.path.dirname(__file__)) -print g.pull('--dry-run', 'origin', branch) diff --git a/utils.py b/utils.py index 8cc932785..68adf89ad 100644 --- a/utils.py +++ b/utils.py @@ -1,6 +1,3 @@ -# coding: utf-8 -from __future__ import unicode_literals - import os import sqlite3 import time