This commit is contained in:
Louis Vézina 2020-05-31 21:59:33 -04:00
parent a067d10352
commit af40005616
3 changed files with 16 additions and 8 deletions

View file

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

View file

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

View file

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