mirror of https://github.com/morpheus65535/bazarr
Git ignore
This commit is contained in:
parent
a9187e033e
commit
122ec09f9a
|
@ -0,0 +1 @@
|
||||||
|
*.pyc
|
20
bazarr.py
20
bazarr.py
|
@ -3,10 +3,6 @@ import bottle
|
||||||
bottle.debug(True)
|
bottle.debug(True)
|
||||||
bottle.TEMPLATES.clear()
|
bottle.TEMPLATES.clear()
|
||||||
|
|
||||||
application = bottle.default_app()
|
|
||||||
|
|
||||||
from paste import httpserver
|
|
||||||
|
|
||||||
import sqlite3
|
import sqlite3
|
||||||
import itertools
|
import itertools
|
||||||
import operator
|
import operator
|
||||||
|
@ -28,6 +24,7 @@ def static(path):
|
||||||
|
|
||||||
@route('/image_proxy/<url:path>', method='GET')
|
@route('/image_proxy/<url:path>', method='GET')
|
||||||
def image_proxy(url):
|
def image_proxy(url):
|
||||||
|
print url_sonarr_short + url
|
||||||
img_pil = Image.open(BytesIO(requests.get(url_sonarr_short + '/' + url).content))
|
img_pil = Image.open(BytesIO(requests.get(url_sonarr_short + '/' + url).content))
|
||||||
img_buffer = BytesIO()
|
img_buffer = BytesIO()
|
||||||
img_pil.tobytes()
|
img_pil.tobytes()
|
||||||
|
@ -141,4 +138,17 @@ def remove_subtitles():
|
||||||
except OSError:
|
except OSError:
|
||||||
redirect('/episodes/' + sonarrSeriesId + '?error=1')
|
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.
BIN
init_db.pyc
BIN
init_db.pyc
Binary file not shown.
Binary file not shown.
|
@ -19,7 +19,7 @@
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
background-color: #1b1c1d;
|
background-color: #1b1c1d;
|
||||||
background-image: url("/image_proxy/{{details[3]}}");
|
background-image: url("/image_proxy{{details[3]}}");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-attachment: fixed;
|
background-attachment: fixed;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
%import ast
|
%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 id='loader' class="ui page dimmer">
|
||||||
<div class="ui indeterminate text loader">Loading...</div>
|
<div class="ui indeterminate text loader">Loading...</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -114,7 +114,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="divdetails" class="ui container">
|
<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>
|
<h2>{{details[0]}}</h2>
|
||||||
<p>{{details[1]}}</p>
|
<p>{{details[1]}}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue