Try to fix subtitles deletion

pull/489/head
Halali 6 years ago
parent 3a2c28f3cf
commit f7d308fc3d

@ -1618,7 +1618,7 @@ def remove_subtitles():
subtitlesPath = request.forms.get('subtitlesPath') subtitlesPath = request.forms.get('subtitlesPath')
sonarrSeriesId = request.forms.get('sonarrSeriesId') sonarrSeriesId = request.forms.get('sonarrSeriesId')
sonarrEpisodeId = request.forms.get('sonarrEpisodeId') sonarrEpisodeId = request.forms.get('sonarrEpisodeId')
subfolder = ('\\' + get_subtitle_destination_folder() + '\\') if get_subtitle_destination_folder() else '\\' subfolder = ('/' + get_subtitle_destination_folder() + '/') if get_subtitle_destination_folder() else '/'
subtitlesPath = os.path.split(subtitlesPath) subtitlesPath = os.path.split(subtitlesPath)
try: try:
@ -1639,7 +1639,7 @@ def remove_subtitles_movie():
language = request.forms.get('language') language = request.forms.get('language')
subtitlesPath = request.forms.get('subtitlesPath') subtitlesPath = request.forms.get('subtitlesPath')
radarrId = request.forms.get('radarrId') radarrId = request.forms.get('radarrId')
subfolder = ('\\' + get_subtitle_destination_folder() + '\\') if get_subtitle_destination_folder() else '\\' subfolder = ('/' + get_subtitle_destination_folder() + '/') if get_subtitle_destination_folder() else '/'
subtitlesPath = os.path.split(subtitlesPath) subtitlesPath = os.path.split(subtitlesPath)
try: try:

@ -472,7 +472,7 @@
hi: hi, hi: hi,
sonarrSeriesId: sonarrSeriesId, sonarrSeriesId: sonarrSeriesId,
sonarrEpisodeId: sonarrEpisodeId, sonarrEpisodeId: sonarrEpisodeId,
title: '{{!details[0].replace("'", "\'")}}' title: "{{!details[0].replace("'", "\'")}}"
}; };
$('#search_result').DataTable( { $('#search_result').DataTable( {
@ -556,7 +556,7 @@
hi: hi, hi: hi,
sonarrSeriesId: sonarrSeriesId, sonarrSeriesId: sonarrSeriesId,
sonarrEpisodeId: sonarrEpisodeId, sonarrEpisodeId: sonarrEpisodeId,
title: '{{!details[0].replace("'", "\\'")}}' title: "{{!details[0].replace("'", "\\'")}}"
}; };
$('#loader_text').text("Downloading subtitle to disk..."); $('#loader_text').text("Downloading subtitle to disk...");

@ -2401,7 +2401,7 @@
} else { } else {
protocol = 'http'; protocol = 'http';
} }
const sonarr_url = $('#settings_sonarr_ip').val() + ":" + $('#settings_sonarr_port').val() + $('#settings_sonarr_baseurl').val().replace(/\/$/, "") + "/api/system/status?apikey=" + $('#settings_sonarr_apikey').val(); const sonarr_url = $('#settings_sonarr_ip').val() + ":" + $('#settings_sonarr_port').val() + $('#settings_sonarr_baseurl').val().replace(/\/$/, "") + "api/system/status?apikey=" + $('#settings_sonarr_apikey').val();
$.getJSON("{{base_url}}test_url/" + protocol + "/" + encodeURIComponent(sonarr_url), function (data) { $.getJSON("{{base_url}}test_url/" + protocol + "/" + encodeURIComponent(sonarr_url), function (data) {
if (data.status) { if (data.status) {

Loading…
Cancel
Save