summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLouis Vézina <[email protected]>2017-09-15 21:33:49 -0400
committerLouis Vézina <[email protected]>2017-09-15 21:33:49 -0400
commit122ec09f9af060cdf992f43f9be8950ec1004b59 (patch)
tree82911e6485cd276beaac0bd3d7a98fff757cf061
parenta9187e033e4d559c4de7b4c12781fa7eb10d2302 (diff)
downloadbazarr-122ec09f9af060cdf992f43f9be8950ec1004b59.tar.gz
bazarr-122ec09f9af060cdf992f43f9be8950ec1004b59.zip
Git ignore
-rw-r--r--.gitignore1
-rw-r--r--bazarr.py20
-rw-r--r--get_general_settings.pycbin1378 -> 1378 bytes
-rw-r--r--get_languages.pycbin590 -> 590 bytes
-rw-r--r--get_sonarr_settings.pycbin871 -> 871 bytes
-rw-r--r--init_db.pycbin491 -> 491 bytes
-rw-r--r--list_subtitles.pycbin2733 -> 2733 bytes
-rw-r--r--views/episodes.tpl6
8 files changed, 19 insertions, 8 deletions
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/<url:path>', 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 ad1bef5a3..af3401c42 100644
--- a/get_general_settings.pyc
+++ b/get_general_settings.pyc
Binary files differ
diff --git a/get_languages.pyc b/get_languages.pyc
index 5b23d3f87..396da377d 100644
--- a/get_languages.pyc
+++ b/get_languages.pyc
Binary files differ
diff --git a/get_sonarr_settings.pyc b/get_sonarr_settings.pyc
index e7fcef83a..3dc844f3d 100644
--- a/get_sonarr_settings.pyc
+++ b/get_sonarr_settings.pyc
Binary files differ
diff --git a/init_db.pyc b/init_db.pyc
index cf1ce3fb4..488ba4aad 100644
--- a/init_db.pyc
+++ b/init_db.pyc
Binary files differ
diff --git a/list_subtitles.pyc b/list_subtitles.pyc
index e536f6d24..b82a1a6ff 100644
--- a/list_subtitles.pyc
+++ b/list_subtitles.pyc
Binary files differ
diff --git a/views/episodes.tpl b/views/episodes.tpl
index 9244f4752..600abfb4c 100644
--- a/views/episodes.tpl
+++ b/views/episodes.tpl
@@ -19,7 +19,7 @@
<style>
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 @@
</head>
<body>
%import ast
- <div style="display: none;"><img src="/image_proxy/{{details[3]}}"></div>
+ <div style="display: none;"><img src="/image_proxy{{details[3]}}"></div>
<div id='loader' class="ui page dimmer">
<div class="ui indeterminate text loader">Loading...</div>
</div>
@@ -114,7 +114,7 @@
</div>
<div id="divdetails" class="ui container">
- <img class="left floated ui image" src="/image_proxy/{{details[2]}}">
+ <img class="left floated ui image" src="/image_proxy{{details[2]}}">
<h2>{{details[0]}}</h2>
<p>{{details[1]}}</p>
</div>