diff --git a/.vs/Crunchyroll Downloader/v17/.suo b/.vs/Crunchyroll Downloader/v17/.suo index 350412e..7a4b47c 100644 Binary files a/.vs/Crunchyroll Downloader/v17/.suo and b/.vs/Crunchyroll Downloader/v17/.suo differ diff --git a/Crunchyroll Downloader/Anime_Add.vb b/Crunchyroll Downloader/Anime_Add.vb index efa5d39..4f0d225 100644 --- a/Crunchyroll Downloader/Anime_Add.vb +++ b/Crunchyroll Downloader/Anime_Add.vb @@ -147,7 +147,9 @@ Public Class Anime_Add ComboBox2.Items.AddRange(Result.ToArray) ComboBox2.SelectedItem = SubFolder_Value Catch ex As Exception - + ' MsgBox(ex.ToString) + 'SubFolder_Nothing + ComboBox2.SelectedItem = SubFolder_Nothing End Try 'Timer3.Enabled = True diff --git a/Crunchyroll Downloader/Browser.vb b/Crunchyroll Downloader/Browser.vb index 0c885de..cdad930 100644 --- a/Crunchyroll Downloader/Browser.vb +++ b/Crunchyroll Downloader/Browser.vb @@ -18,25 +18,28 @@ Public Class Browser Private Sub WebView2_CoreWebView2InitializationCompleted(sender As Object, e As CoreWebView2InitializationCompletedEventArgs) Handles WebView2.CoreWebView2InitializationCompleted - WebView2.CoreWebView2.AddWebResourceRequestedFilter("https://www.crunchyroll.com/*", CoreWebView2WebResourceContext.All) - WebView2.CoreWebView2.AddWebResourceRequestedFilter("https://www.funimation.com/*", CoreWebView2WebResourceContext.All) + Try + WebView2.CoreWebView2.AddWebResourceRequestedFilter("https://www.crunchyroll.com/*", CoreWebView2WebResourceContext.All) + WebView2.CoreWebView2.AddWebResourceRequestedFilter("https://www.funimation.com/*", CoreWebView2WebResourceContext.All) - 'WebView2.CoreWebView2.AddWebResourceRequestedFilter("*", CoreWebView2WebResourceContext.All) - AddHandler WebView2.CoreWebView2.WebResourceResponseReceived, AddressOf ObserveResponse - AddHandler WebView2.CoreWebView2.WebResourceRequested, AddressOf ObserveHttp - 'WebView2.CoreWebView2.Settings.UserAgent = My.Settings.User_Agend.Replace(Chr(34), "").Replace("User-Agent: ", "") - ' - 'WebView2.CoreWebView2.Settings.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Trident/7.0; rv:11.0) like Gecko" - My.Settings.User_Agend = Chr(34) + "User-Agent: " + WebView2.CoreWebView2.Settings.UserAgent + Chr(34) - 'MsgBox(My.Settings.User_Agend) + 'WebView2.CoreWebView2.AddWebResourceRequestedFilter("*", CoreWebView2WebResourceContext.All) + AddHandler WebView2.CoreWebView2.WebResourceResponseReceived, AddressOf ObserveResponse + AddHandler WebView2.CoreWebView2.WebResourceRequested, AddressOf ObserveHttp + 'WebView2.CoreWebView2.Settings.UserAgent = My.Settings.User_Agend.Replace(Chr(34), "").Replace("User-Agent: ", "") + ' + 'WebView2.CoreWebView2.Settings.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Trident/7.0; rv:11.0) like Gecko" + My.Settings.User_Agend = Chr(34) + "User-Agent: " + WebView2.CoreWebView2.Settings.UserAgent + Chr(34) + 'MsgBox(My.Settings.User_Agend) - If WebView2.CoreWebView2.Source = "about:blank" Or WebView2.CoreWebView2.Source = Nothing Then - 'TextBox1.Text = Main.Startseite - WebView2.CoreWebView2.Navigate(Main.Startseite) + If WebView2.CoreWebView2.Source = "about:blank" Or WebView2.CoreWebView2.Source = Nothing Then + 'TextBox1.Text = Main.Startseite + WebView2.CoreWebView2.Navigate(Main.Startseite) - End If + End If + Catch ex As Exception + End Try End Sub @@ -79,6 +82,11 @@ Public Class Browser Anime_Add.btn_dl.BackgroundImage = My.Resources.main_button_download_default End If + If Main.Startseite IsNot My.Settings.Startseite Then + Main.LoadBrowser(Main.Startseite, 1) + Main.Startseite = My.Settings.Startseite + End If + End If End Sub diff --git a/Crunchyroll Downloader/CRD_List_Item.vb b/Crunchyroll Downloader/CRD_List_Item.vb index 3c06f47..970fb97 100644 --- a/Crunchyroll Downloader/CRD_List_Item.vb +++ b/Crunchyroll Downloader/CRD_List_Item.vb @@ -156,23 +156,29 @@ Public Class CRD_List_Item Return StatusRunning End Function Public Function GetIsStatusFinished() As Boolean - If Canceld = True Then + If Canceld = True Or Finished = True Then Return True - ElseIf HybridRunning = True Then - Return False Else - Try - If proc.HasExited = True Then - Return True - Else - Return False - End If - Catch ex As Exception - Return False - End Try - + Return False End If + 'If Canceld = True Then + ' Return True + 'ElseIf HybridRunning = True Then + ' Return False + 'Else + ' Try + ' If proc.HasExited = True Then + ' Return True + ' Else + ' Return False + ' End If + ' Catch ex As Exception + ' Return False + ' End Try + + 'End If + End Function Public Function GetThumbnailSource() As String Try @@ -1381,6 +1387,8 @@ Public Class CRD_List_Item If CBool(InStr(e.Data, "Duration: N/A, bitrate: N/A")) Then + ElseIf Finished = True Then + ElseIf CBool(InStr(e.Data, "Duration: ")) Then Dim ZeitGesamt As String() = e.Data.Split(New String() {"Duration: "}, System.StringSplitOptions.RemoveEmptyEntries) Dim ZeitGesamt2 As String() = ZeitGesamt(1).Split(New [Char]() {System.Convert.ToChar(".")}) @@ -1440,6 +1448,8 @@ Public Class CRD_List_Item ElseIf CBool(InStr(e.Data, "muxing overhead:")) Then Finished = True Me.Invoke(New Action(Function() As Object + + ProgressBar1.Value = ProgressBar1.Maximum Dim Done As String() = Label_percent.Text.Split(New String() {"MB"}, System.StringSplitOptions.RemoveEmptyEntries) Label_percent.Text = "Finished - " + Done(0) + "MB" Return Nothing diff --git a/Crunchyroll Downloader/GetData.vb b/Crunchyroll Downloader/GetData.vb index 43cdc9e..447d9aa 100644 --- a/Crunchyroll Downloader/GetData.vb +++ b/Crunchyroll Downloader/GetData.vb @@ -52,11 +52,11 @@ Module GetData Loop Until Proc.HasExited Or Microsoft.VisualBasic.DateAndTime.Timer < finish - If CBool(InStr(CurlError, "curl")) Then + If CBool(InStr(CurlError, "curl:")) Then Debug.WriteLine(CurlError) Throw New System.Exception("Error - Getting" + vbNewLine + CurlError) Return Nothing - ElseIf CBool(InStr(CurlOutput, "curl")) Then + ElseIf CBool(InStr(CurlOutput, "curl:")) Then Debug.WriteLine(CurlOutput) Throw New System.Exception("Error - Getting" + vbNewLine + CurlError) Return Nothing @@ -115,11 +115,11 @@ Module GetData Loop Until Proc.HasExited Or Microsoft.VisualBasic.DateAndTime.Timer < finish - If CBool(InStr(CurlError, "curl")) Then + If CBool(InStr(CurlError, "curl:")) Then Debug.WriteLine(CurlError) Throw New System.Exception("Error - Getting" + vbNewLine + CurlError) Return Nothing - ElseIf CBool(InStr(CurlOutput, "curl")) Then + ElseIf CBool(InStr(CurlOutput, "curl:")) Then Debug.WriteLine(CurlOutput) Throw New System.Exception("Error - Getting" + vbNewLine + CurlError) Return Nothing @@ -185,11 +185,11 @@ Module GetData - If CBool(InStr(CurlError, "curl")) Then + If CBool(InStr(CurlError, "curl:")) Then Debug.WriteLine(CurlError) Throw New System.Exception("Error - Getting" + vbNewLine + CurlError) Return Nothing - ElseIf CBool(InStr(CurlOutput, "curl")) Then + ElseIf CBool(InStr(CurlOutput, "curl:")) Then Debug.WriteLine(CurlOutput) Throw New System.Exception("Error - Getting" + vbNewLine + CurlError) Return Nothing diff --git a/Crunchyroll Downloader/Main.vb b/Crunchyroll Downloader/Main.vb index 3ab0a2a..d6e62df 100644 --- a/Crunchyroll Downloader/Main.vb +++ b/Crunchyroll Downloader/Main.vb @@ -1147,12 +1147,15 @@ Public Class Main VideoJson = CurlAuthNew(Streams, Loc_CR_Cookies, Loc_AuthToken) + Debug.WriteLine("VideoJson: " + VideoJson) Debug.WriteLine("VideoStreams: " + Streams) Dim CR_HardSubLang As String = SubSprache.CR_Value VideoJson = CleanJSON(VideoJson) + + 'MsgBox(VideoJson) #End Region #Region "Check for dub override" @@ -1857,7 +1860,6 @@ Public Class Main Dim SubText As String = "" SubText = Curl(SoftSubsList(i2).Url.Replace(" -i ", "").Replace(Chr(34), "")) - If My.Settings.SubtitleMod1 = True Then SubText = AddScaledBorderAndShadow(SubText) End If @@ -2010,16 +2012,37 @@ Public Class Main ElseIf CBool(InStr(ex.ToString, Chr(34) + "UserAbort" + Chr(34))) Then MsgBox(ex.ToString, MsgBoxStyle.Information) ElseIf CBool(InStr(ex.ToString, "Error - Getting")) Then - If RT_count = 0 Then - If File.Exists("cookies.txt") = True Then - MsgBox("Request refused, try a new cookies.txt", MsgBoxStyle.Exclamation) - End If - Navigate(WebsiteURL) - Pause(5) - LoadBrowser(WebsiteURL, 1) - Exit Sub - End If + MsgBox(ex.ToString) + 'If RT_count = 0 Then + ' If File.Exists("cookies.txt") = True Then + ' MsgBox("Request refused, try a new cookies.txt", MsgBoxStyle.Exclamation) + ' Exit Sub + ' End If + ' Me.Invoke(New Action(Function() As Object + ' Anime_Add.StatusLabel.Text = "Browser reset..." + ' Me.Text = "Browser reset..." + ' ResoBackString = Nothing + ' Me.Invalidate() + ' Return Nothing + ' End Function)) + + ' If Application.OpenForms().OfType(Of Browser).Any = True Then + ' Browser.Close() + ' Startseite = WebsiteURL + ' Pause(5) + ' UserBowser = False + ' Browser.Show() + ' 'Anime_Add.btn_dl.Cursor = Cursors.Default + ' 'Anime_Add.btn_dl.BackgroundImage = My.Resources.main_button_download_default + ' End If + + ' 'Navigate(WebsiteURL) + ' 'Pause(5) + ' 'LoadBrowser(WebsiteURL, 1) + ' Exit Sub + 'End If + ' MsgBox(ex.ToString) ' b = False ' Navigate(WebsiteURL) Else diff --git a/Crunchyroll Downloader/My Project/AssemblyInfo.vb b/Crunchyroll Downloader/My Project/AssemblyInfo.vb index 432f990..987f0b4 100644 --- a/Crunchyroll Downloader/My Project/AssemblyInfo.vb +++ b/Crunchyroll Downloader/My Project/AssemblyInfo.vb @@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/Crunchyroll Downloader/einstellungen.vb b/Crunchyroll Downloader/einstellungen.vb index 005cc01..917d7f3 100644 --- a/Crunchyroll Downloader/einstellungen.vb +++ b/Crunchyroll Downloader/einstellungen.vb @@ -39,7 +39,7 @@ Public Class Einstellungen CB_Mod1.Checked = My.Settings.SubtitleMod1 - CB_vtt.Checked = My.Settings.vttStyleRemove + CB_vttStyle.Checked = My.Settings.vttStyleRemove TempTB.Text = Main.TempFolder LeadingZeroDD.SelectedIndex = Main.LeadingZero