diff options
author | morpheus65535 <[email protected]> | 2021-02-24 08:25:24 -0500 |
---|---|---|
committer | morpheus65535 <[email protected]> | 2021-02-24 08:25:24 -0500 |
commit | ef8c4a43d4a633acd314ac619936a919b60345ec (patch) | |
tree | 0614bb8139d90cb42ab1b93faeca4ebd97d8550f | |
parent | e04e0c75c8b549cc7a0c811f19903387604383e3 (diff) | |
download | bazarr-ef8c4a43d4a633acd314ac619936a919b60345ec.tar.gz bazarr-ef8c4a43d4a633acd314ac619936a919b60345ec.zip |
Improved the scenename in manual search modal if none is provided.
-rw-r--r-- | views/episodes.html | 10 | ||||
-rw-r--r-- | views/movie.html | 11 |
2 files changed, 14 insertions, 7 deletions
diff --git a/views/episodes.html b/views/episodes.html index ffb98b849..7081cdb5e 100644 --- a/views/episodes.html +++ b/views/episodes.html @@ -143,8 +143,8 @@ </button> </div> <div class="modal-body"> - <h6>Episode path is: <span id="episode_path_span" class="badge badge-secondary"></span> - <br>Scenename is: <span id="episode_scenename_span" class="badge badge-secondary"></span></h6> + <h6>Episode path: <span id="episode_path_span" class="badge badge-secondary"></span> + <br>Scenename: <span id="episode_scenename_span" class="badge badge-secondary"></span></h6> <div class="container-fluid" style="padding:0px;"> <table id="search_result" class="table table-striped" style="width:100%"> <thead> @@ -808,7 +808,11 @@ e.preventDefault(); $("#series_title_span").html(seriesDetails['title'] + ' - ' + $(this).data("season") + 'x' + $(this).data("episode") + ' - ' + $(this).data("episode_title")); $("#episode_path_span").html($(this).attr("data-episodePath")); - $("#episode_scenename_span").html($(this).attr("data-sceneName")); + if ($(this).attr("data-sceneName") === 'null') { + $("#episode_scenename_span").html('Not provided by Sonarr'); + } else { + $("#episode_scenename_span").html($(this).attr("data-sceneName")); + } episodePath = $(this).attr("data-episodePath"); sceneName = $(this).attr("data-sceneName"); diff --git a/views/movie.html b/views/movie.html index 56d3233cd..8efcf4e9e 100644 --- a/views/movie.html +++ b/views/movie.html @@ -140,8 +140,8 @@ </button> </div> <div class="modal-body"> - <h6>Movie path is: <span id="movie_path_span" class="badge badge-secondary"></span> - <br>Scenename is: <span id="movie_scenename_span" class="badge badge-secondary"></span></h6> + <h6>Movie path: <span id="movie_path_span" class="badge badge-secondary"></span> + <br>Scenename: <span id="movie_scenename_span" class="badge badge-secondary"></span></h6> <div class="container-fluid" style="padding:0px;"> <table id="search_result" class="table table-striped" style="width:100%"> <thead> @@ -581,8 +581,11 @@ e.preventDefault(); $("#movie_title_span").html(movieDetails['title']); $("#movie_path_span").html(movieDetails['mapped_path']); - $("#movie_scenename_span").html(movieDetails['sceneName']); - + if (movieDetails['sceneName'] === null) { + $("#movie_scenename_span").html('Not provided by Radarr'); + } else { + $("#movie_scenename_span").html(movieDetails['sceneName']); + } moviePath = movieDetails['mapped_path']; sceneName = movieDetails['sceneName']; profileId = movieDetails['profileId'].id; |