From 2b13322dbb38288da412d6069a1b64896d45e667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Sun, 26 Nov 2017 19:54:59 -0500 Subject: [PATCH 01/21] Test --- check_update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check_update.py b/check_update.py index a7a75836b..501e6d869 100644 --- a/check_update.py +++ b/check_update.py @@ -14,7 +14,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: From 012d3688fa3f7d5ad037f2b9aca72a92dbf0dd6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Sun, 26 Nov 2017 21:36:51 -0500 Subject: [PATCH 02/21] Docker git config username and email --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 1f21c71aa..4223f1bba 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 +RNU git config --global user.name "Bazarr" && git config --global user.email "bazarr@fake.email" VOLUME /bazarr/data From 8e8cfd00a1965747926edf52beea5e8e8ff6b14d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Sun, 26 Nov 2017 21:44:52 -0500 Subject: [PATCH 03/21] Typo --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4223f1bba..3ce6a3345 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +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 -RNU git config --global user.name "Bazarr" && git config --global user.email "bazarr@fake.email" +RUN git config --global user.name "Bazarr" && git config --global user.email "bazarr@fake.email" VOLUME /bazarr/data From 239997c8fcb08119a11b4e7a759b35152ffb0c9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Sun, 26 Nov 2017 21:45:37 -0500 Subject: [PATCH 04/21] Chane missing subtitles search interval --- scheduler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scheduler.py b/scheduler.py index 724b9a12b..656b05c4b 100644 --- a/scheduler.py +++ b/scheduler.py @@ -18,7 +18,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): From a99f55e6241563b963439cb9e146c6250857f833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Mon, 27 Nov 2017 13:54:42 -0500 Subject: [PATCH 05/21] Test --- list_subtitles.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/list_subtitles.py b/list_subtitles.py index 1535137f4..36155b50a 100644 --- a/list_subtitles.py +++ b/list_subtitles.py @@ -109,7 +109,7 @@ def full_scan_subtitles(): c_db.close() for episode in episodes: - store_subtitles(path_replace(episode[0])) + store_subtitles(path_replace(episode[0]).encode('utf8')) def series_scan_subtitles(no): conn_db = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db')) @@ -118,7 +118,7 @@ def series_scan_subtitles(no): c_db.close() for episode in episodes: - store_subtitles(path_replace(episode[0])) + store_subtitles(path_replace(episode[0]).encode('utf8')) list_missing_subtitles(no) @@ -129,4 +129,4 @@ def new_scan_subtitles(): c_db.close() for episode in episodes: - store_subtitles(path_replace(episode[0])) + store_subtitles(path_replace(episode[0]).encode('utf8')) From 97c1c05ceee8796463f5ea2964fe9f60f5ff1831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Mon, 27 Nov 2017 15:46:28 -0500 Subject: [PATCH 06/21] Test --- list_subtitles.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/list_subtitles.py b/list_subtitles.py index 36155b50a..2698b6d98 100644 --- a/list_subtitles.py +++ b/list_subtitles.py @@ -109,7 +109,7 @@ def full_scan_subtitles(): c_db.close() for episode in episodes: - store_subtitles(path_replace(episode[0]).encode('utf8')) + store_subtitles(path_replace(episode[0]).encode('string_escape')) def series_scan_subtitles(no): conn_db = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db')) @@ -118,7 +118,7 @@ def series_scan_subtitles(no): c_db.close() for episode in episodes: - store_subtitles(path_replace(episode[0]).encode('utf8')) + store_subtitles(path_replace(episode[0]).encode('string_escape')) list_missing_subtitles(no) @@ -129,4 +129,4 @@ def new_scan_subtitles(): c_db.close() for episode in episodes: - store_subtitles(path_replace(episode[0]).encode('utf8')) + store_subtitles(path_replace(episode[0]).encode('string_escape')) From 2d0e09dff2f90b9de1116391036443b66329fabd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Mon, 27 Nov 2017 15:49:50 -0500 Subject: [PATCH 07/21] Test --- list_subtitles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/list_subtitles.py b/list_subtitles.py index 2698b6d98..dcc764793 100644 --- a/list_subtitles.py +++ b/list_subtitles.py @@ -60,7 +60,7 @@ def store_subtitles(file): conn_db = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db')) c_db = conn_db.cursor() - c_db.execute("UPDATE table_episodes SET subtitles = ? WHERE path = ?", (str(actual_subtitles), path_replace_reverse(file))) + c_db.execute("UPDATE table_episodes SET subtitles = ? WHERE path = ?", (str(actual_subtitles).encode('string_escape'), path_replace_reverse(file))) conn_db.commit() c_db.close() From 69a74c50041ddf6542a28fed6efa5f3e9e00bea6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Mon, 27 Nov 2017 15:53:16 -0500 Subject: [PATCH 08/21] Test --- list_subtitles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/list_subtitles.py b/list_subtitles.py index dcc764793..089cb3667 100644 --- a/list_subtitles.py +++ b/list_subtitles.py @@ -60,7 +60,7 @@ def store_subtitles(file): conn_db = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db')) c_db = conn_db.cursor() - c_db.execute("UPDATE table_episodes SET subtitles = ? WHERE path = ?", (str(actual_subtitles).encode('string_escape'), path_replace_reverse(file))) + c_db.execute("UPDATE table_episodes SET subtitles = ? WHERE path = ?", (actual_subtitles.encode('string_escape'), path_replace_reverse(file))) conn_db.commit() c_db.close() From fcb34449842a8100d0b25da65a99f1d3f795a3a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Mon, 27 Nov 2017 15:56:50 -0500 Subject: [PATCH 09/21] Test --- list_subtitles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/list_subtitles.py b/list_subtitles.py index 089cb3667..2698b6d98 100644 --- a/list_subtitles.py +++ b/list_subtitles.py @@ -60,7 +60,7 @@ def store_subtitles(file): conn_db = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db')) c_db = conn_db.cursor() - c_db.execute("UPDATE table_episodes SET subtitles = ? WHERE path = ?", (actual_subtitles.encode('string_escape'), path_replace_reverse(file))) + c_db.execute("UPDATE table_episodes SET subtitles = ? WHERE path = ?", (str(actual_subtitles), path_replace_reverse(file))) conn_db.commit() c_db.close() From 05daf9692b2756dfdd0de2e8b38e59d63da1dbcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Mon, 27 Nov 2017 15:58:40 -0500 Subject: [PATCH 10/21] Test --- get_general_settings.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/get_general_settings.py b/get_general_settings.py index a517e63cb..fcfdf1287 100644 --- a/get_general_settings.py +++ b/get_general_settings.py @@ -41,6 +41,7 @@ def path_replace(path): return path def path_replace_reverse(path): + print path for path_mapping in path_mappings: if path_mapping[1] in path: path = path.replace(path_mapping[1], path_mapping[0]) @@ -49,4 +50,5 @@ def path_replace_reverse(path): elif path.startswith('/'): path = path.replace('\\', '/') break + print path return path From fd37cab842e43cb0e181d92634db004a33d8110a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Mon, 27 Nov 2017 16:10:02 -0500 Subject: [PATCH 11/21] Test --- get_general_settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/get_general_settings.py b/get_general_settings.py index fcfdf1287..2d494e687 100644 --- a/get_general_settings.py +++ b/get_general_settings.py @@ -38,7 +38,7 @@ def path_replace(path): elif path.startswith('/'): path = path.replace('\\', '/') break - return path + return path.encode('string_escape') def path_replace_reverse(path): print path @@ -51,4 +51,4 @@ def path_replace_reverse(path): path = path.replace('\\', '/') break print path - return path + return path.encode('string_escape') From bc4bc4f045ff5feb7546c935f66eaa6295823334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Mon, 27 Nov 2017 16:12:01 -0500 Subject: [PATCH 12/21] Test --- get_general_settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/get_general_settings.py b/get_general_settings.py index 2d494e687..bc8cd6e50 100644 --- a/get_general_settings.py +++ b/get_general_settings.py @@ -38,7 +38,7 @@ def path_replace(path): elif path.startswith('/'): path = path.replace('\\', '/') break - return path.encode('string_escape') + return path.encode('utf8') def path_replace_reverse(path): print path @@ -51,4 +51,4 @@ def path_replace_reverse(path): path = path.replace('\\', '/') break print path - return path.encode('string_escape') + return path.encode('utf8') From a67f7f00604a73ad50a87a31963abf54fc2bd92a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Mon, 27 Nov 2017 20:53:53 -0500 Subject: [PATCH 13/21] Path replacement bug under Linux --- get_general_settings.py | 6 ++---- list_subtitles.py | 7 ++++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/get_general_settings.py b/get_general_settings.py index bc8cd6e50..a517e63cb 100644 --- a/get_general_settings.py +++ b/get_general_settings.py @@ -38,10 +38,9 @@ def path_replace(path): elif path.startswith('/'): path = path.replace('\\', '/') break - return path.encode('utf8') + return path def path_replace_reverse(path): - print path for path_mapping in path_mappings: if path_mapping[1] in path: path = path.replace(path_mapping[1], path_mapping[0]) @@ -50,5 +49,4 @@ def path_replace_reverse(path): elif path.startswith('/'): path = path.replace('\\', '/') break - print path - return path.encode('utf8') + return path diff --git a/list_subtitles.py b/list_subtitles.py index 2698b6d98..88e105202 100644 --- a/list_subtitles.py +++ b/list_subtitles.py @@ -8,6 +8,7 @@ from subliminal import * import pycountry import sqlite3 import ast +import sys from get_general_settings import * @@ -109,7 +110,7 @@ def full_scan_subtitles(): c_db.close() for episode in episodes: - store_subtitles(path_replace(episode[0]).encode('string_escape')) + store_subtitles(path_replace(episode[0]).encode(sys.getfilesystemencoding())) def series_scan_subtitles(no): conn_db = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db')) @@ -118,7 +119,7 @@ def series_scan_subtitles(no): c_db.close() for episode in episodes: - store_subtitles(path_replace(episode[0]).encode('string_escape')) + store_subtitles(path_replace(episode[0]).encode(sys.getfilesystemencoding())) list_missing_subtitles(no) @@ -129,4 +130,4 @@ def new_scan_subtitles(): c_db.close() for episode in episodes: - store_subtitles(path_replace(episode[0]).encode('string_escape')) + store_subtitles(path_replace(episode[0]).encode(sys.getfilesystemencoding())) From 71b7672242a70dcd0588daa9dc734dec02593a59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Mon, 27 Nov 2017 21:25:03 -0500 Subject: [PATCH 14/21] Path replacement bug under Linux --- list_subtitles.py | 8 +++++--- update.py | 9 --------- 2 files changed, 5 insertions(+), 12 deletions(-) delete mode 100644 update.py diff --git a/list_subtitles.py b/list_subtitles.py index 88e105202..96929d97b 100644 --- a/list_subtitles.py +++ b/list_subtitles.py @@ -39,6 +39,8 @@ def list_subtitles(file): def store_subtitles(file): languages = [] actual_subtitles = [] + if os.name == 'nt': + file = file.decode('utf8') if os.path.exists(file): if os.path.splitext(file)[1] == '.mkv': try: @@ -110,7 +112,7 @@ def full_scan_subtitles(): c_db.close() for episode in episodes: - store_subtitles(path_replace(episode[0]).encode(sys.getfilesystemencoding())) + store_subtitles(path_replace(episode[0]).encode('utf8')) def series_scan_subtitles(no): conn_db = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db')) @@ -119,7 +121,7 @@ def series_scan_subtitles(no): c_db.close() for episode in episodes: - store_subtitles(path_replace(episode[0]).encode(sys.getfilesystemencoding())) + store_subtitles(path_replace(episode[0]).encode('utf8')) list_missing_subtitles(no) @@ -130,4 +132,4 @@ def new_scan_subtitles(): c_db.close() for episode in episodes: - store_subtitles(path_replace(episode[0]).encode(sys.getfilesystemencoding())) + store_subtitles(path_replace(episode[0]).encode('utf8')) 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) From 93e658b10fffb9eebaeebd12bc5210df5bba57ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Mon, 27 Nov 2017 22:06:51 -0500 Subject: [PATCH 15/21] Test --- list_subtitles.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/list_subtitles.py b/list_subtitles.py index 96929d97b..1535137f4 100644 --- a/list_subtitles.py +++ b/list_subtitles.py @@ -8,7 +8,6 @@ from subliminal import * import pycountry import sqlite3 import ast -import sys from get_general_settings import * @@ -39,8 +38,6 @@ def list_subtitles(file): def store_subtitles(file): languages = [] actual_subtitles = [] - if os.name == 'nt': - file = file.decode('utf8') if os.path.exists(file): if os.path.splitext(file)[1] == '.mkv': try: @@ -112,7 +109,7 @@ def full_scan_subtitles(): c_db.close() for episode in episodes: - store_subtitles(path_replace(episode[0]).encode('utf8')) + store_subtitles(path_replace(episode[0])) def series_scan_subtitles(no): conn_db = sqlite3.connect(os.path.join(os.path.dirname(__file__), 'data/db/bazarr.db')) @@ -121,7 +118,7 @@ def series_scan_subtitles(no): c_db.close() for episode in episodes: - store_subtitles(path_replace(episode[0]).encode('utf8')) + store_subtitles(path_replace(episode[0])) list_missing_subtitles(no) @@ -132,4 +129,4 @@ def new_scan_subtitles(): c_db.close() for episode in episodes: - store_subtitles(path_replace(episode[0]).encode('utf8')) + store_subtitles(path_replace(episode[0])) From 90b802d128fe7438288b7bcc859a84014a7691cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Mon, 27 Nov 2017 22:12:55 -0500 Subject: [PATCH 16/21] Test --- list_subtitles.py | 1 + 1 file changed, 1 insertion(+) diff --git a/list_subtitles.py b/list_subtitles.py index 1535137f4..cd003d075 100644 --- a/list_subtitles.py +++ b/list_subtitles.py @@ -38,6 +38,7 @@ def list_subtitles(file): def store_subtitles(file): languages = [] actual_subtitles = [] + print file if os.path.exists(file): if os.path.splitext(file)[1] == '.mkv': try: From 783cc067fd647186650f4dea16cb8a1ec1f86a51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Mon, 27 Nov 2017 22:45:00 -0500 Subject: [PATCH 17/21] Test --- list_subtitles.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/list_subtitles.py b/list_subtitles.py index cd003d075..884e44312 100644 --- a/list_subtitles.py +++ b/list_subtitles.py @@ -14,7 +14,7 @@ from get_general_settings import * def list_subtitles(file): languages = [] actual_subtitles = [] - if os.path.exists(file): + if os.path.exists(unicode(file)): if os.path.splitext(file)[1] == '.mkv': try: with open(file, 'rb') as f: @@ -38,7 +38,6 @@ def list_subtitles(file): def store_subtitles(file): languages = [] actual_subtitles = [] - print file if os.path.exists(file): if os.path.splitext(file)[1] == '.mkv': try: From 44ec18f8096a9a816a804a24353b17f7942a09a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Mon, 27 Nov 2017 22:46:27 -0500 Subject: [PATCH 18/21] Test --- list_subtitles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/list_subtitles.py b/list_subtitles.py index 884e44312..0419c3022 100644 --- a/list_subtitles.py +++ b/list_subtitles.py @@ -38,7 +38,7 @@ def list_subtitles(file): def store_subtitles(file): languages = [] actual_subtitles = [] - if os.path.exists(file): + if os.path.exists(unicode(file)): if os.path.splitext(file)[1] == '.mkv': try: with open(file, 'rb') as f: From 55a784b0779c94436357ff7d9212bd452c4010e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Mon, 27 Nov 2017 22:49:08 -0500 Subject: [PATCH 19/21] Test --- list_subtitles.py | 1 + 1 file changed, 1 insertion(+) diff --git a/list_subtitles.py b/list_subtitles.py index 0419c3022..cb6a475e7 100644 --- a/list_subtitles.py +++ b/list_subtitles.py @@ -38,6 +38,7 @@ def list_subtitles(file): def store_subtitles(file): languages = [] actual_subtitles = [] + print type(file) if os.path.exists(unicode(file)): if os.path.splitext(file)[1] == '.mkv': try: From ee3ca1add6fcb9f389b07ede74c6c006cad8b64f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Mon, 27 Nov 2017 23:04:31 -0500 Subject: [PATCH 20/21] Test --- list_subtitles.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/list_subtitles.py b/list_subtitles.py index cb6a475e7..5e482805d 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 From 5d1aacddd17b3752f62bec5f254d88012e769f9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Mon, 27 Nov 2017 23:09:24 -0500 Subject: [PATCH 21/21] Test --- bazarr.py | 3 --- check_update.py | 3 --- get_episodes.py | 3 --- get_general_settings.py | 3 --- get_languages.py | 3 --- get_providers.py | 3 --- get_series.py | 3 --- get_sonarr_settings.py | 3 --- get_subtitle.py | 3 --- init_db.py | 3 --- list_subtitles.py | 5 ++--- scheduler.py | 3 --- utils.py | 3 --- 13 files changed, 2 insertions(+), 39 deletions(-) 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 501e6d869..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 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 5e482805d..6eeb92940 100644 --- a/list_subtitles.py +++ b/list_subtitles.py @@ -11,7 +11,7 @@ from get_general_settings import * def list_subtitles(file): languages = [] actual_subtitles = [] - if os.path.exists(unicode(file)): + if os.path.exists(file): if os.path.splitext(file)[1] == '.mkv': try: with open(file, 'rb') as f: @@ -35,8 +35,7 @@ def list_subtitles(file): def store_subtitles(file): languages = [] actual_subtitles = [] - print type(file) - if os.path.exists(unicode(file)): + if os.path.exists(file): if os.path.splitext(file)[1] == '.mkv': try: with open(file, 'rb') as f: diff --git a/scheduler.py b/scheduler.py index 656b05c4b..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 * 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