mirror of
https://github.com/morpheus65535/bazarr
synced 2024-12-25 17:17:12 +00:00
WIP
This commit is contained in:
parent
b6435ad612
commit
80a740c5bd
3 changed files with 725 additions and 737 deletions
|
@ -491,11 +491,11 @@ def image_proxy(url):
|
|||
def image_proxy_movies(url):
|
||||
apikey = settings.radarr.apikey
|
||||
try:
|
||||
url_image = (url_radarr_short() + '/' + url + '?apikey=' + apikey).replace('/fanart.jpg', '/banner.jpg')
|
||||
req = requests.get(url_radarr() + '/api' + url_image.split(url_radarr())[1], stream=True, timeout=15, verify=False)
|
||||
url_image = (url_radarr() + '/' + url + '?apikey=' + apikey).replace('/fanart.jpg', '/banner.jpg')
|
||||
req = requests.get(url_image, stream=True, timeout=15, verify=False)
|
||||
except:
|
||||
url_image = url_radarr_short() + '/' + url + '?apikey=' + apikey
|
||||
req = requests.get(url_radarr() + '/api' + url_image.split(url_radarr())[1], stream=True, timeout=15, verify=False)
|
||||
req = requests.get(url_image, stream=True, timeout=15, verify=False)
|
||||
else:
|
||||
return Response(stream_with_context(req.iter_content(2048)), content_type=req.headers['content-type'])
|
||||
|
||||
|
@ -571,36 +571,6 @@ def movieseditor():
|
|||
return render_template('movieseditor.html')
|
||||
|
||||
|
||||
@app.route('/edit_movieseditor', methods=['POST'])
|
||||
@login_required
|
||||
def edit_movieseditor():
|
||||
|
||||
ref = request.environ['HTTP_REFERER']
|
||||
|
||||
movies = request.form.get('movies')
|
||||
movies = ast.literal_eval(str('[' + movies + ']'))
|
||||
lang = request.form.getlist('languages')
|
||||
hi = request.form.get('hearing_impaired')
|
||||
forced = request.form.get('forced')
|
||||
|
||||
for movie in movies:
|
||||
if str(lang) != "[]" and str(lang) != "['']":
|
||||
if str(lang) == "['None']":
|
||||
lang = 'None'
|
||||
else:
|
||||
lang = str(lang)
|
||||
database.execute("UPDATE table_movies SET languages=? WHERE radarrId=?", (lang, movie))
|
||||
if hi != '':
|
||||
database.execute("UPDATE table_movies SET hearing_impaired=? WHERE radarrId=?", (hi, movie))
|
||||
if forced != '':
|
||||
database.execute("UPDATE table_movies SET forced=? WHERE radarrId=?", (forced, movie))
|
||||
|
||||
for movie in movies:
|
||||
list_missing_subtitles_movies(movie)
|
||||
|
||||
redirect(ref)
|
||||
|
||||
|
||||
@app.route('/movie/<no>')
|
||||
@login_required
|
||||
def movie(no):
|
||||
|
|
|
@ -174,7 +174,7 @@
|
|||
</li>
|
||||
{% endif %}
|
||||
{% if settings.general.getboolean('use_radarr') %}
|
||||
<li><a href="{{ url_for('movies') }}"><i class="fas fa-film"></i><span
|
||||
<li id="movies_nav"><a href="{{ url_for('movies') }}"><i class="fas fa-film"></i><span
|
||||
class="hide-menu"> Movies</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
|
1424
views/movie.html
1424
views/movie.html
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue