Git ignore

This commit is contained in:
Louis Vézina 2017-09-15 21:33:49 -04:00
parent a9187e033e
commit 122ec09f9a
8 changed files with 19 additions and 8 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.pyc

View File

@ -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)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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>