From 94907b31d9b129ca2aa6fb9dbb9d40086abc173b Mon Sep 17 00:00:00 2001 From: morpheus65535 <5130500+morpheus65535@users.noreply.github.com> Date: Fri, 22 Dec 2017 06:40:32 -0500 Subject: [PATCH] Ajax reloading incorrectly when searching from wanted page --- views/wanted.tpl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/views/wanted.tpl b/views/wanted.tpl index 232765c4d..29e39c3ae 100644 --- a/views/wanted.tpl +++ b/views/wanted.tpl @@ -151,16 +151,14 @@ sonarrSeriesId: $(this).attr("data-sonarrSeriesId"), sonarrEpisodeId: $(this).attr("data-sonarrEpisodeId") }; + $('#loader').addClass('active'); $.ajax({ url: "{{base_url}}get_subtitle", type: "POST", dataType: "json", data: values - }); - $('#loader').addClass('active'); + }).always(function () { + window.location.reload(); + }); }) - - $(document).ajaxStop(function(){ - window.location.reload(); - }); \ No newline at end of file