1
0
Fork 0
mirror of https://github.com/morpheus65535/bazarr synced 2024-12-26 01:27:07 +00:00
This commit is contained in:
Louis Vézina 2020-02-06 06:40:39 -05:00
parent b6435ad612
commit 80a740c5bd
3 changed files with 725 additions and 737 deletions

View file

@ -491,11 +491,11 @@ def image_proxy(url):
def image_proxy_movies(url): def image_proxy_movies(url):
apikey = settings.radarr.apikey apikey = settings.radarr.apikey
try: try:
url_image = (url_radarr_short() + '/' + url + '?apikey=' + apikey).replace('/fanart.jpg', '/banner.jpg') url_image = (url_radarr() + '/' + 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) req = requests.get(url_image, stream=True, timeout=15, verify=False)
except: except:
url_image = url_radarr_short() + '/' + url + '?apikey=' + apikey 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: else:
return Response(stream_with_context(req.iter_content(2048)), content_type=req.headers['content-type']) 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') 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>') @app.route('/movie/<no>')
@login_required @login_required
def movie(no): def movie(no):

View file

@ -174,7 +174,7 @@
</li> </li>
{% endif %} {% endif %}
{% if settings.general.getboolean('use_radarr') %} {% 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> class="hide-menu"> Movies</span></a>
</li> </li>
{% endif %} {% endif %}

File diff suppressed because it is too large Load diff