pull/1038/head
Louis Vézina 5 years ago
parent a067d10352
commit af40005616

@ -589,6 +589,7 @@ class EpisodesSubtitlesUpload(Resource):
sonarrSeriesId = request.form.get('sonarrSeriesId') sonarrSeriesId = request.form.get('sonarrSeriesId')
sonarrEpisodeId = request.form.get('sonarrEpisodeId') sonarrEpisodeId = request.form.get('sonarrEpisodeId')
title = request.form.get('title') title = request.form.get('title')
audioLanguage = request.form.get('audioLanguage')
_, ext = os.path.splitext(upload.filename) _, ext = os.path.splitext(upload.filename)
@ -602,7 +603,8 @@ class EpisodesSubtitlesUpload(Resource):
title=title, title=title,
scene_name=sceneName, scene_name=sceneName,
media_type='series', media_type='series',
subtitle=upload) subtitle=upload,
audio_language=audioLanguage)
if result is not None: if result is not None:
message = result[0] message = result[0]
@ -944,6 +946,7 @@ class MovieSubtitlesUpload(Resource):
upload = request.files.get('upload') upload = request.files.get('upload')
radarrId = request.form.get('radarrId') radarrId = request.form.get('radarrId')
title = request.form.get('title') title = request.form.get('title')
audioLanguage = request.form.get('audioLanguage')
_, ext = os.path.splitext(upload.filename) _, ext = os.path.splitext(upload.filename)
@ -957,7 +960,8 @@ class MovieSubtitlesUpload(Resource):
title=title, title=title,
scene_name=sceneName, scene_name=sceneName,
media_type='movie', media_type='movie',
subtitle=upload) subtitle=upload,
audio_language=audioLanguage)
if result is not None: if result is not None:
message = result[0] message = result[0]

@ -199,6 +199,7 @@
<input type="hidden" id="upload_sonarrSeriesId" name="sonarrSeriesId" value=""/> <input type="hidden" id="upload_sonarrSeriesId" name="sonarrSeriesId" value=""/>
<input type="hidden" id="upload_sonarrEpisodeId" name="sonarrEpisodeId" value=""/> <input type="hidden" id="upload_sonarrEpisodeId" name="sonarrEpisodeId" value=""/>
<input type="hidden" id="upload_title" name="title" value=""/> <input type="hidden" id="upload_title" name="title" value=""/>
<input type="hidden" id="upload_audioLanguage" name="audioLanguage" value=""/>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="submit" id="upload_save_button" class="btn btn-info">Save</button> <button type="submit" id="upload_save_button" class="btn btn-info">Save</button>
@ -675,6 +676,7 @@
$('#upload_sonarrSeriesId').val($(this).data("sonarrseriesid")); $('#upload_sonarrSeriesId').val($(this).data("sonarrseriesid"));
$('#upload_sonarrEpisodeId').val($(this).data("sonarrepisodeid")); $('#upload_sonarrEpisodeId').val($(this).data("sonarrepisodeid"));
$('#upload_title').val($(this).data("episode_title")); $('#upload_title').val($(this).data("episode_title"));
$('#upload_audioLanguage').val(seriesDetails['audio_language']['name']);
$('#manual_language_select').empty(); $('#manual_language_select').empty();
$.each(enabledLanguages, function (i, item) { $.each(enabledLanguages, function (i, item) {
@ -896,7 +898,7 @@
$('#seriesAlternateTitles').hide(); $('#seriesAlternateTitles').hide();
} }
$('#seriesAudioLanguage').text(seriesDetails['audio_language'].name); $('#seriesAudioLanguage').text(seriesDetails['audio_language']['name']);
$('#seriesMappedPath').text(seriesDetails['mapped_path']); $('#seriesMappedPath').text(seriesDetails['mapped_path']);
$('#seriesMappedPath').attr("data-original-title", seriesDetails['mapped_path']); $('#seriesMappedPath').attr("data-original-title", seriesDetails['mapped_path']);
$('#seriesFileCount').text(seriesDetails['episodeFileCount'] + ' files'); $('#seriesFileCount').text(seriesDetails['episodeFileCount'] + ' files');

@ -205,6 +205,7 @@
<input type="hidden" id="upload_sceneName" name="sceneName" value="" /> <input type="hidden" id="upload_sceneName" name="sceneName" value="" />
<input type="hidden" id="upload_radarrId" name="radarrId" value="" /> <input type="hidden" id="upload_radarrId" name="radarrId" value="" />
<input type="hidden" id="upload_title" name="title" value="" /> <input type="hidden" id="upload_title" name="title" value="" />
<input type="hidden" id="upload_audioLanguage" name="audioLanguage" value="" />
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="submit" id="upload_save_button" class="btn btn-info">Save</button> <button type="submit" id="upload_save_button" class="btn btn-info">Save</button>
@ -535,10 +536,11 @@
$('#upload_button').on('click', function(e){ $('#upload_button').on('click', function(e){
e.preventDefault(); e.preventDefault();
$("#upload_movie_title_span").html(movieDetails['title']); $("#upload_movie_title_span").html(movieDetails['title']);
$('#upload_moviePath').val($(this).data("moviepath")); $('#upload_moviePath').val(movieDetails['mapped_path']);
$('#upload_sceneName').val($(this).data("scenename")); $('#upload_sceneName').val(movieDetails['sceneName']);
$('#upload_radarrId').val($(this).data("radarrid")); $('#upload_radarrId').val(movieDetails['radarrId']);
$('#upload_title').val($(this).data("movie_title")); $('#upload_title').val(movieDetails['title']);
$('#upload_audioLanguage').val(movieDetails['audio_language']['name']);
$('#manual_language_select').empty(); $('#manual_language_select').empty();
$.each(enabledLanguages, function (i, item) { $.each(enabledLanguages, function (i, item) {
@ -719,7 +721,7 @@
$('#moviealternativeTitles').hide(); $('#moviealternativeTitles').hide();
} }
$('#movieAudioLanguage').text(movieDetails['audio_language'].name); $('#movieAudioLanguage').text(movieDetails['audio_language']['name']);
$('#movieMappedPath').text(movieDetails['mapped_path']); $('#movieMappedPath').text(movieDetails['mapped_path']);
$('#movieMappedPath').attr("data-original-title", movieDetails['mapped_path']); $('#movieMappedPath').attr("data-original-title", movieDetails['mapped_path']);

Loading…
Cancel
Save