mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-01-30 18:47:59 +08:00
Git ignore
This commit is contained in:
parent
a9187e033e
commit
122ec09f9a
8 changed files with 19 additions and 8 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.pyc
|
20
bazarr.py
20
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)
|
||||
|
|
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>
|
||||
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>
|
||||
|
|
Loading…
Reference in a new issue