From 4ca14961ba097c01e0cb2d70416c3a2abd9d2b30 Mon Sep 17 00:00:00 2001 From: hama3254 <52826614+hama3254@users.noreply.github.com> Date: Sat, 1 Oct 2022 12:13:29 +0200 Subject: [PATCH] fix lock-up with cancel download fix lock-up with cancel download #532 --- .vs/Crunchyroll Downloader/v17/.suo | Bin 155136 -> 153088 bytes Crunchyroll Downloader/Anime_Add.vb | 228 ++++++++++++++-------------- Crunchyroll Downloader/Main.vb | 39 ++++- 3 files changed, 154 insertions(+), 113 deletions(-) diff --git a/.vs/Crunchyroll Downloader/v17/.suo b/.vs/Crunchyroll Downloader/v17/.suo index d12677bcb07ae9bf1cf4ecd220c01eb1274884a9..8d9acc7da8580c79cddd87df12b37466d612d134 100644 GIT binary patch delta 7327 zcmd^D3tW^{7XQwj0Ra&K$6?fwSBRj1GlINS91xJw1fN-&0*X%*#F2b$jArU@b6uFL z93NyxZCY6(V}33gjOdm|q4ra^b+tlTH8VxSw$xzH9fsA+S~dIq+}#iUbMHO(eg5a% z@7&L{$Jw;ixlq@QN%qHGlIUMj5Sp5sn}t;5wFGa=_LPZGl$&B^*>1XQ%gASseFD9y z!jQrjumzyuSJ?=q2MM^fdl0DjT*XknucO{$0*Pvs^g~ZO!Vmn#2(JP? zTnJ*y?smB=rD{Sa!Ve_xLTN|B+XOL~=*ubnk`P7sgIy-%qJ8Vr>lV3?wQVV9Hg}_p zAE75fM+hN=5;_o^39*DWgfK!lVHTkeA(GISAQs#Dw5M`ELVrRWVE`e8Z%=uI`$k2> zRLTwFo1#=Y(I4u*7e!c zZZC*6v?{-K53K}F5yJtMq~mUni)jb%(Cv$P#VJ?dd!ARLI^HBV|>Rq>5lA>?Kqa_7V0I{z7<<@IK)H z;UM7yLJi?V!bgN!!Xd(8!V$v9grfv8!!b&a6Pk)L26yaCnXd>J2wxK}60Xq_dU;)^ z+zrAHgeF2WK?2Fr92yF~?KUL6>sGntO#NTS9jftH6vdvqv|4fS&z;`8u;cNjAtP0M zNUt5m;jj^Ne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yroll Downloader/Anime_Add.vb b/Crunchyroll Downloader/Anime_Add.vb index 74aece2..619517b 100644 --- a/Crunchyroll Downloader/Anime_Add.vb +++ b/Crunchyroll Downloader/Anime_Add.vb @@ -350,60 +350,62 @@ Public Class Anime_Add If CBool(InStr(textBox1.Text, "crunchyroll.com")) Or CBool(InStr(textBox1.Text, "funimation.com")) Or CBool(InStr(textBox1.Text, "vrv.co/series/")) Or CBool(InStr(textBox1.Text, "vrv.co/watch/")) Then - If StatusLabel.Text = "Status: waiting for episode selection" Then - If MessageBox.Show("Are you sure you want cancel the advanced download?", "confirm?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then - StatusLabel.Text = "Status: idle" - Else - Exit Sub - btn_dl.Enabled = True - End If - 'ElseIf LabelUpdate = "Status: looking for video file" Then - ' Exit Sub - ' pictureBox4.Enabled = True + 'If StatusLabel.Text = "Status: waiting for episode selection" Then + ' If MessageBox.Show("Are you sure you want cancel the advanced download?", "confirm?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then + ' StatusLabel.Text = "Status: idle" + ' Else + ' Exit Sub + ' btn_dl.Enabled = True + ' End If + ' 'ElseIf LabelUpdate = "Status: looking for video file" Then + ' ' Exit Sub + ' ' pictureBox4.Enabled = True + 'Else + If Main.RunningDownloads >= Main.MaxDL Then + Debug.WriteLine("Max_Dl") + ListBox1.Items.Add(textBox1.Text) + textBox1.ForeColor = Color.FromArgb(9248044) + Pause(2) + textBox1.ForeColor = Color.Black + textBox1.Text = "URL" Else - If Main.RunningDownloads >= Main.MaxDL Then - ListBox1.Items.Add(textBox1.Text) - textBox1.ForeColor = Color.FromArgb(9248044) - Pause(1) - textBox1.ForeColor = Color.Black - textBox1.Text = "URL" + + If CBool(InStr(textBox1.Text, "funimation.com")) Then + + Main.WebbrowserURL = textBox1.Text + + If CBool(InStr(textBox1.Text, "funimation.com/v/")) Then + Dim Episode() As String = textBox1.Text.Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries) + Dim v1JsonUrl As String = "https://d33et77evd9bgg.cloudfront.net/data/v1/episodes/" + Episode(Episode.Length - 1) + ".json" + Dim v1Json As String = Nothing + Try + Using client As New WebClient() + client.Encoding = System.Text.Encoding.UTF8 + client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), "")) + v1Json = client.DownloadString(v1JsonUrl) + End Using + Main.GetFunimationNewJS_VideoProxy(Nothing, v1Json) + Exit Sub + Catch ex As Exception + Debug.WriteLine("error- getting v1Json data for the bypasss") + Debug.WriteLine(ex.ToString) + End Try + + End If + + End If + + If Main.Grapp_RDY = True Then + + Main.b = False + Debug.WriteLine("Start loading: " + Date.Now.ToString) + LoadBrowser(textBox1.Text) + StatusLabel.Text = "Status: loading ...." Else - - If CBool(InStr(textBox1.Text, "funimation.com")) Then - - Main.WebbrowserURL = textBox1.Text - - If CBool(InStr(textBox1.Text, "funimation.com/v/")) Then - Dim Episode() As String = textBox1.Text.Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries) - Dim v1JsonUrl As String = "https://d33et77evd9bgg.cloudfront.net/data/v1/episodes/" + Episode(Episode.Length - 1) + ".json" - Dim v1Json As String = Nothing - Try - Using client As New WebClient() - client.Encoding = System.Text.Encoding.UTF8 - client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), "")) - v1Json = client.DownloadString(v1JsonUrl) - End Using - Main.GetFunimationNewJS_VideoProxy(Nothing, v1Json) - Exit Sub - Catch ex As Exception - Debug.WriteLine("error- getting v1Json data for the bypasss") - Debug.WriteLine(ex.ToString) - End Try - - End If - - End If - - If Main.Grapp_RDY = True Then - - Main.b = False - Debug.WriteLine("Start loading: " + Date.Now.ToString) - LoadBrowser(textBox1.Text) - StatusLabel.Text = "Status: loading ...." - - End If + Debug.WriteLine("Not Ready!") End If End If + 'End If ElseIf CBool(InStr(textBox1.Text, "Test=true")) Then @@ -438,11 +440,13 @@ Public Class Anime_Add Main.Grapp_Abord = True Main.b = True groupBox1.Visible = True + btn_dl.Text = "Download" btn_dl.BackgroundImage = My.Resources.main_button_download_default + StatusLabel.Text = "Status: idle" ElseIf CBool(InStr(Main.WebbrowserURL, "funimation.com")) = True Then - StatusLabel.Text = "Status: idle" + 'btn_dl.BackgroundImage = My.Resources.add_mass_running_cancel btn_dl.Text = "Cancel" Mass_DL_Cancel = True @@ -480,7 +484,7 @@ Public Class Anime_Add comboBox3.Enabled = False ComboBox1.Enabled = False - Else + Else 'CR StatusLabel.Text = "Status: idle" 'btn_dl.BackgroundImage = My.Resources.add_mass_running_cancel @@ -656,39 +660,39 @@ Public Class Anime_Add ElseIf CBool(InStr(Main.WebbrowserURL, "vrv.co")) = True Then - comboBox3.Items.Clear() - comboBox4.Items.Clear() - comboBox3.Enabled = True - comboBox4.Enabled = True - comboBox3.Text = Nothing - comboBox4.Text = Nothing - Dim SeasonSplit() As String = Main.VRVMass.Split(New String() {Chr(34) + "id" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) + comboBox3.Items.Clear() + comboBox4.Items.Clear() + comboBox3.Enabled = True + comboBox4.Enabled = True + comboBox3.Text = Nothing + comboBox4.Text = Nothing + Dim SeasonSplit() As String = Main.VRVMass.Split(New String() {Chr(34) + "id" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) - Dim SeasonSplit2() As String = SeasonSplit(ComboBox1.SelectedIndex + 1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) + Dim SeasonSplit2() As String = SeasonSplit(ComboBox1.SelectedIndex + 1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) - Dim EpisodeJsonURL As String = Main.VRVMassBaseURL + "episodes?season_id=" + SeasonSplit2(0) + "&Policy=" + Main.VRVMassParameters - Dim EpisodeJson As String = Nothing - Debug.WriteLine(EpisodeJsonURL) + Dim EpisodeJsonURL As String = Main.VRVMassBaseURL + "episodes?season_id=" + SeasonSplit2(0) + "&Policy=" + Main.VRVMassParameters + Dim EpisodeJson As String = Nothing + Debug.WriteLine(EpisodeJsonURL) - Try - Using client As New WebClient() - client.Encoding = System.Text.Encoding.UTF8 - client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), "")) - EpisodeJson = client.DownloadString(EpisodeJsonURL) - End Using - Catch ex As Exception - Debug.WriteLine("error- getting EpisodeJson data") - Debug.WriteLine(ex.ToString) - Exit Sub - End Try - Main.VRVMassEpisodes = EpisodeJson + Try + Using client As New WebClient() + client.Encoding = System.Text.Encoding.UTF8 + client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), "")) + EpisodeJson = client.DownloadString(EpisodeJsonURL) + End Using + Catch ex As Exception + Debug.WriteLine("error- getting EpisodeJson data") + Debug.WriteLine(ex.ToString) + Exit Sub + End Try + Main.VRVMassEpisodes = EpisodeJson - Dim EpisodeNameSplit() As String = EpisodeJson.Split(New String() {Chr(34) + "title" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) + Dim EpisodeNameSplit() As String = EpisodeJson.Split(New String() {Chr(34) + "title" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) - Dim EpisodeSplit() As String = EpisodeJson.Split(New String() {Chr(34) + "episode" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) + Dim EpisodeSplit() As String = EpisodeJson.Split(New String() {Chr(34) + "episode" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) For i As Integer = 1 To EpisodeSplit.Count - 1 Dim EpisodeSplit2() As String = EpisodeSplit(i).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) Dim EpisodeNameSplit2() As String = EpisodeNameSplit(i).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) @@ -708,47 +712,47 @@ Public Class Anime_Add End If ElseIf Main.WebbrowserURL = "https://funimation.com/js" Then - comboBox3.Items.Clear() - comboBox4.Items.Clear() - comboBox3.Text = Nothing - comboBox4.Text = Nothing - Dim ContentID As String = Nothing + comboBox3.Items.Clear() + comboBox4.Items.Clear() + comboBox3.Text = Nothing + comboBox4.Text = Nothing + Dim ContentID As String = Nothing - For i As Integer = 0 To Main.FunimtaionSeasonList.Count - 1 - If ComboBox1.Text = Main.FunimtaionSeasonList.Item(i).Title Then - ContentID = Main.FunimtaionSeasonList.Item(i).ID - Exit For - End If - Next - - If ContentID = Nothing Then - MsgBox("error during season selection") - Exit Sub + For i As Integer = 0 To Main.FunimtaionSeasonList.Count - 1 + If ComboBox1.Text = Main.FunimtaionSeasonList.Item(i).Title Then + ContentID = Main.FunimtaionSeasonList.Item(i).ID + Exit For End If + Next - Dim BaseUrl() As String = Main.FunimationSeasonAPIUrl.Split(New String() {"/shows/"}, System.StringSplitOptions.RemoveEmptyEntries) + If ContentID = Nothing Then + MsgBox("error during season selection") + Exit Sub + End If + + Dim BaseUrl() As String = Main.FunimationSeasonAPIUrl.Split(New String() {"/shows/"}, System.StringSplitOptions.RemoveEmptyEntries) - Dim EpisodeJsonURL As String = BaseUrl(0) + "/seasons/" + ContentID + ".json" - Dim EpisodeJson As String = Nothing - Debug.WriteLine(EpisodeJsonURL) + Dim EpisodeJsonURL As String = BaseUrl(0) + "/seasons/" + ContentID + ".json" + Dim EpisodeJson As String = Nothing + Debug.WriteLine(EpisodeJsonURL) - Try - Using client As New WebClient() - client.Encoding = System.Text.Encoding.UTF8 - client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), "")) - EpisodeJson = client.DownloadString(EpisodeJsonURL) - End Using - Catch ex As Exception - Debug.WriteLine("error- getting EpisodeJson data") - Debug.WriteLine(ex.ToString) - Main.FunimationJsonBrowser = "EpisodeJson" - LoadBrowser(EpisodeJsonURL) - Exit Sub - End Try + Try + Using client As New WebClient() + client.Encoding = System.Text.Encoding.UTF8 + client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), "")) + EpisodeJson = client.DownloadString(EpisodeJsonURL) + End Using + Catch ex As Exception + Debug.WriteLine("error- getting EpisodeJson data") + Debug.WriteLine(ex.ToString) + Main.FunimationJsonBrowser = "EpisodeJson" + LoadBrowser(EpisodeJsonURL) + Exit Sub + End Try - FillFunimationEpisodes(EpisodeJson) + FillFunimationEpisodes(EpisodeJson) If comboBox3.Items.Count > 0 Then @@ -759,8 +763,8 @@ Public Class Anime_Add Else - 'MsgBox(Main.WebbrowserURL) - comboBox3.Items.Clear() + 'MsgBox(Main.WebbrowserURL) + comboBox3.Items.Clear() comboBox4.Items.Clear() comboBox3.Enabled = True comboBox4.Enabled = True diff --git a/Crunchyroll Downloader/Main.vb b/Crunchyroll Downloader/Main.vb index 9153e47..5854d15 100644 --- a/Crunchyroll Downloader/Main.vb +++ b/Crunchyroll Downloader/Main.vb @@ -1672,6 +1672,7 @@ Public Class Main b = True Exit For Grapp_Abord = True + Grapp_RDY = True 'MsgBox("dl_abourd") End If If UseQueue = True Then @@ -4569,12 +4570,29 @@ Public Class Main 'Debug.WriteLine(LoadedUrls.Count.ToString) LoadedUrls.Clear() Debug.WriteLine("Just Browsing, exiting...") + Grapp_RDY = True Exit Sub End If 'MsgBox("loaded!") If CBool(InStr(Address, "beta.crunchyroll.com")) Then WebbrowserURL = Address - Pause(10) + For i As Integer = 10 To 1 Step -1 + If b = True Then + If Application.OpenForms().OfType(Of CefSharp_Browser).Any = True Then + Anime_Add.StatusLabel.Text = "Status: idle" + End If + Me.Text = "Crunchyroll Downloader" + Exit Sub + End If + + If Application.OpenForms().OfType(Of CefSharp_Browser).Any = True Then + Anime_Add.StatusLabel.Text = "Status: Processing Url " + i.ToString + End If + Me.Text = "Status: Processing Url " + i.ToString + + Pause(1) + Next + Me.Text = "Status: Processing... " ProcessUrls() Exit Sub ElseIf CBool(InStr(Address, "crunchyroll.com")) Then @@ -4748,6 +4766,7 @@ Public Class Main GetBetaVideoProxy(requesturl, WebbrowserURL) b = True LoadedUrls.Clear() + Me.Text = "Crunchyroll Downloader" Exit Sub End If ElseIf CBool(InStr(requesturl, "https://beta.crunchyroll.com/")) And CBool(InStr(requesturl, "streams?")) Then @@ -4755,6 +4774,7 @@ Public Class Main GetBetaVideoProxy(requesturl, WebbrowserURL) b = True LoadedUrls.Clear() + Me.Text = "Crunchyroll Downloader" Exit Sub End If ElseIf CBool(InStr(requesturl, "https://beta-api.crunchyroll.com/")) And CBool(InStr(requesturl, "seasons?series_id=")) Then @@ -4762,6 +4782,7 @@ Public Class Main GetBetaSeasons(requesturl) b = True LoadedUrls.Clear() + Me.Text = "Crunchyroll Downloader" Exit Sub End If ElseIf CBool(InStr(requesturl, "https://beta.crunchyroll.com/")) And CBool(InStr(requesturl, "seasons?series_id=")) Then @@ -4769,6 +4790,7 @@ Public Class Main GetBetaSeasons(requesturl) b = True LoadedUrls.Clear() + Me.Text = "Crunchyroll Downloader" Exit Sub End If End If @@ -4778,6 +4800,7 @@ Public Class Main Get_VRV_VideoProxy(requesturl, WebbrowserURL) b = True LoadedUrls.Clear() + Me.Text = "Crunchyroll Downloader" Exit Sub End If ElseIf CBool(InStr(requesturl, "https://api.vrv.co")) And CBool(InStr(requesturl, "seasons?series_id=")) Then @@ -4786,6 +4809,7 @@ Public Class Main VRVSeason = requesturl 'b = True 'LoadedUrls.Clear() + 'Me.Text = "Crunchyroll Downloader" 'Exit Sub End If End If @@ -4799,6 +4823,7 @@ Public Class Main Return Nothing End Function)) LoadedUrls.Clear() + Me.Text = "Crunchyroll Downloader" Exit Sub End If If CBool(InStr(requesturl, "data/v1/episodes/")) Then @@ -4811,6 +4836,7 @@ Public Class Main Return Nothing End Function)) LoadedUrls.Clear() + Me.Text = "Crunchyroll Downloader" Exit Sub End If If CBool(InStr(requesturl, "https://title-api.prd.funimationsvc.com")) And CBool(InStr(requesturl, "?region=")) Then @@ -4863,6 +4889,7 @@ Public Class Main GetFunimationNewJS_VideoProxy(requesturl) Debug.WriteLine("processing :" + requesturl) LoadedUrls.Clear() + Me.Text = "Crunchyroll Downloader" Exit Sub End If End If @@ -4873,9 +4900,19 @@ Public Class Main Get_VRV_Seasons(VRVSeason) b = True LoadedUrls.Clear() + Me.Text = "Crunchyroll Downloader" Exit Sub End If LoadedUrls.Clear() + + If b = True Then + LoadedUrls.Clear() + Debug.WriteLine("Just Browsing after all, exiting...") + Grapp_RDY = True + Me.Text = "Crunchyroll Downloader" + Exit Sub + End If + End Sub Public Sub Navigate(ByVal Url As String)