diff --git a/bazarr/main.py b/bazarr/main.py index c08be5178..0f8e036e9 100644 --- a/bazarr/main.py +++ b/bazarr/main.py @@ -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/') @login_required def movie(no): diff --git a/views/_main.html b/views/_main.html index 0e8b1dcd2..8c6667b23 100644 --- a/views/_main.html +++ b/views/_main.html @@ -174,7 +174,7 @@ {% endif %} {% if settings.general.getboolean('use_radarr') %} -
  • Movies
  • {% endif %} diff --git a/views/movie.html b/views/movie.html index 7b917b7ac..1d86877f7 100644 --- a/views/movie.html +++ b/views/movie.html @@ -1,375 +1,120 @@ - - - - - - - - - - - +{% extends '_main.html' %} - - - - - - - - - - {{details['title']}} - Bazarr - - - - %import ast - %from os import path - %from get_languages import * - %from config import settings - %from helper import path_replace_movie - %single_language = settings.general.getboolean('single_language') -
    -
    -
    Loading...
    + #movieDetails { + padding: 30px; + background: rgba(0, 0, 0, 0.7); + color: white; + margin: -32px; + } + + #moviePoster { + width: 250px; + } + + h1 { + color: white; + } + + span { + margin-right: 0.5em; + } + +{% endblock head %} + +{% block bcleft %} +
    + + +
    +{% endblock bcleft %} + +{% block bcright %} +
    + +
    +{% endblock bcright %} + +{% block body %} +
    +
    +
    +
    - % include('menu.tpl') - -
    -
    -
    -
    - -
    - -
    -
    -
    -
    -

    - %if details['monitored'] == 'True': - - %else: - - %end - {{details['title']}} -

    -
    - -
    -
    - - - <% - subs_languages = ast.literal_eval(str(details['languages'])) - subs_languages_list = [] - if subs_languages is not None: - for subs_language in subs_languages: - subs_languages_list.append(subs_language) - end - end - %> - %if subs_languages is not None: - - - %end - -
    -
    -
    - -
    - {{details['overview']}} -
    - -
    -
    {{details['audio_language']}}
    -
    {{details['path']}}
    - % if details['sceneName'] is not None: -
    {{details['sceneName']}}
    - % end -
    - -
    - %for language in subs_languages_list: -
    {{language}}
    - %end -
    - -
    -
    Hearing-impaired: {{details['hearing_impaired']}}
    -
    Forced: {{details['forced']}}
    -
    -
    -
    +
    +
    +
    +

    +
    - -
    - -
    -
    - - - - - - - - - - <% - subtitles_files = ast.literal_eval(str(details['subtitles'])) - subtitles_files.sort(key=lambda x: x[0]) - if subtitles_files is not None: - for subtitles_file in subtitles_files: - if subtitles_file[0].endswith(':forced'): - forced = True - else: - forced = False - end - %> - - %if subtitles_file[1] is not None: - - %else: - - %end - - - - <% - end - if len(subtitles_files) == 0: - %> - - <% - end - end - %> - -
    Subtitles PathLanguage(s)
    {{path.basename(path_replace_movie(subtitles_file[1]))}}Video File Subtitles Track
    {{language_from_alpha2(subtitles_file[0].split(':')[0])}}{{' forced' if forced else ''}}
    - %if subtitles_file[1] is not None: - - - - %end -
    No Subtitles Detected For This Movie.
    - <% - if details['missing_subtitles'] is not None: - missing_subs_languages = ast.literal_eval(details['missing_subtitles']) - else: - missing_subs_languages = [] - end - from get_subtitle import search_active - if missing_subs_languages is not None: - %> - - - - - - -
    Missing Subtitles
    - <% - for missing_subs_language in missing_subs_languages: - if len(missing_subs_language) > 2: - forced = missing_subs_language[2] - forced_bool = True - else: - forced = False - forced_bool = False - end - - if details['failedAttempts'] is not None and settings.general.getboolean('adaptive_searching') and missing_subs_language in details['failedAttempts']: - for lang in ast.literal_eval(details['failedAttempts']): - if missing_subs_language in lang: - if search_active(lang[1]): - %> - - {{language_from_alpha2(str(missing_subs_language.split(':')[0]))}}{{' forced' if forced else ''}} - - - %else: - - {{language_from_alpha2(str(missing_subs_language.split(':')[0]))}}{{' forced' if forced else ''}} - - - <% - end - end - end - else: - %> - - {{language_from_alpha2(str(missing_subs_language.split(':')[0]))}}{{' forced' if forced else ''}} - - - <% - end - end - end - %> -
    -
    -
    -
    - - - - - - - - - - -
    Language.:Provider:Score:Date:
    -
    -
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + + + + + + + + +
    Subtitles PathLanguage(s)
    +
    -