From 122ec09f9af060cdf992f43f9be8950ec1004b59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Fri, 15 Sep 2017 21:33:49 -0400 Subject: [PATCH] Git ignore --- .gitignore | 1 + bazarr.py | 20 +++++++++++++++----- get_general_settings.pyc | Bin 1378 -> 1378 bytes get_languages.pyc | Bin 590 -> 590 bytes get_sonarr_settings.pyc | Bin 871 -> 871 bytes init_db.pyc | Bin 491 -> 491 bytes list_subtitles.pyc | Bin 2733 -> 2733 bytes views/episodes.tpl | 6 +++--- 8 files changed, 19 insertions(+), 8 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..0d20b6487 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.pyc diff --git a/bazarr.py b/bazarr.py index cbffdca0b..e666e5037 100644 --- a/bazarr.py +++ b/bazarr.py @@ -3,10 +3,6 @@ import bottle bottle.debug(True) bottle.TEMPLATES.clear() -application = bottle.default_app() - -from paste import httpserver - import sqlite3 import itertools import operator @@ -28,6 +24,7 @@ def static(path): @route('/image_proxy/', method='GET') def image_proxy(url): + print url_sonarr_short + url img_pil = Image.open(BytesIO(requests.get(url_sonarr_short + '/' + url).content)) img_buffer = BytesIO() img_pil.tobytes() @@ -141,4 +138,17 @@ def remove_subtitles(): except OSError: redirect('/episodes/' + sonarrSeriesId + '?error=1') -httpserver.serve(application, host=ip, port=port) +@route('/remove_subtitles', method='GET') +def remove_subtitles(): + episodePath = request.GET.episodePath + subtitlesPath = request.GET.subtitlesPath + sonarrSeriesId = request.GET.sonarrSeriesId + + try: + os.remove(subtitlesPath) + store_subtitles(episodePath) + redirect('/episodes/' + sonarrSeriesId) + except OSError: + redirect('/episodes/' + sonarrSeriesId + '?error=1') + +run(host=ip, port=port) diff --git a/get_general_settings.pyc b/get_general_settings.pyc index ad1bef5a35b4acb43ffcf2ee2b85f8a19f912125..af3401c4273296a53d5463ea087b180c49111fc4 100644 GIT binary patch delta 16 XcmaFF^@xj|`7

OFv|r+ delta 16 XcmaFP_MDBK`7

OF&za( diff --git a/init_db.pyc b/init_db.pyc index cf1ce3fb4303e7884c67f6361a3547486fb22aef..488ba4aad45ddabaccc4a9428a4d4cec468f91d9 100644 GIT binary patch delta 47 zcmaFO{F<4A`7l5(`7l5(`7 body { background-color: #1b1c1d; - background-image: url("/image_proxy/{{details[3]}}"); + background-image: url("/image_proxy{{details[3]}}"); background-repeat: no-repeat; background-attachment: fixed; background-size: cover; @@ -75,7 +75,7 @@ %import ast -

+
Loading...
@@ -114,7 +114,7 @@
- +

{{details[0]}}

{{details[1]}}