diff --git a/.vs/Crunchyroll Downloader/v17/.suo b/.vs/Crunchyroll Downloader/v17/.suo index ba5d98f..3d57eac 100644 Binary files a/.vs/Crunchyroll Downloader/v17/.suo and b/.vs/Crunchyroll Downloader/v17/.suo differ diff --git a/Crunchyroll Downloader/CRD_List_Item.vb b/Crunchyroll Downloader/CRD_List_Item.vb index 220d18f..845469c 100644 --- a/Crunchyroll Downloader/CRD_List_Item.vb +++ b/Crunchyroll Downloader/CRD_List_Item.vb @@ -60,7 +60,7 @@ Public Class CRD_List_Item Dim FailedSegments As New List(Of FailedSegemtsWithURL) Dim LogText As New List(Of String) - Dim GlobalLogfile As String + 'Dim GlobalLogfile As String Private Event UpdateUI(ByVal Percent As Integer, ByVal di As DirectoryInfo, ByVal Idle As Integer) @@ -485,7 +485,7 @@ Public Class CRD_List_Item HistoryDL_Pfad = DL_Pfad HistoryFilename = Filename - GlobalLogfile = DL_Pfad.Replace(".mkv", ".txt").Replace(Chr(34), "") + 'GlobalLogfile = DL_Pfad.Replace(".mkv", ".txt").Replace(Chr(34), "") 'Debug.WriteLine(GlobalLogfile) diff --git a/Crunchyroll Downloader/Main.vb b/Crunchyroll Downloader/Main.vb index 4c43607..a55f159 100644 --- a/Crunchyroll Downloader/Main.vb +++ b/Crunchyroll Downloader/Main.vb @@ -2908,91 +2908,36 @@ Public Class Main -#Region "Get Cookies" - - 'CR_Cookies = "Cookie: " - ''MsgBox("Cookies") - 'If File.Exists("cookies.txt") = True Then - ' CR_Cookies = GetCookiesFromFile("crunchyroll.com") - ' NoBrowser = True - ' CrBetaBasic = "Basic bm9haWhkZXZtXzZpeWcwYThsMHE6" - ' 'MsgBox(True.ToString) - 'Else - ' Browser.GetCookies(Url) - - ' Debug.WriteLine(CookieList.Count.ToString) - ' If CookieList.Count = 0 Then - ' Browser.WebView2.CoreWebView2.Navigate(Url) - ' SetStatusLabel("Status: loading in browser...") - ' Me.Text = "Status: loading in browser..." - ' Exit Sub - ' End If +#Region "Get local" + If CBool(InStr(Url, "/series")) Then + Dim locale1() As String = Url.Split(New String() {"crunchyroll.com/"}, System.StringSplitOptions.RemoveEmptyEntries) + Dim locale2() As String = locale1(1).Split(New String() {"/series"}, System.StringSplitOptions.RemoveEmptyEntries) + locale = Convert_locale(locale2(0)) + If locale = "en-US" Then + Url_locale = "" + Else + Url_locale = locale2(0) + End If - ' For i As Integer = 0 To CookieList.Count - 1 + ElseIf CBool(InStr(Url, "/watch")) Then + Dim locale1() As String = Url.Split(New String() {"crunchyroll.com/"}, System.StringSplitOptions.RemoveEmptyEntries) + Dim locale2() As String = locale1(1).Split(New String() {"/watch"}, System.StringSplitOptions.RemoveEmptyEntries) + 'MsgBox(locale2(0)) - ' If CBool(InStr(CookieList.Item(i).Domain, ".crunchyroll.com")) And CBool(InStr(CookieList.Item(i).Name, "_evidon_suppress")) = False Then - ' CR_Cookies = CR_Cookies + CookieList.Item(i).Name + "=" + CookieList.Item(i).Value + ";" - ' End If - - ' Next - - 'End If - - ''MsgBox(Main.CR_Cookies) - - 'Dim DeviceRegion As String = Nothing - - 'If CBool(InStr(Url, "/series")) Then - ' Dim locale1() As String = Url.Split(New String() {"crunchyroll.com/"}, System.StringSplitOptions.RemoveEmptyEntries) - ' Dim locale2() As String = locale1(1).Split(New String() {"/series"}, System.StringSplitOptions.RemoveEmptyEntries) - ' locale = Convert_locale(locale2(0)) - ' If locale = "en-US" Then - ' Url_locale = "" - ' Else - ' Url_locale = locale2(0) - ' End If + locale = Convert_locale(locale2(0)) + 'End If + If locale = "en-US" Then + Url_locale = "" + Else + Url_locale = locale2(0) + End If - 'ElseIf CBool(InStr(Url, "/watch")) Then - ' Dim locale1() As String = Url.Split(New String() {"crunchyroll.com/"}, System.StringSplitOptions.RemoveEmptyEntries) - ' Dim locale2() As String = locale1(1).Split(New String() {"/watch"}, System.StringSplitOptions.RemoveEmptyEntries) - ' 'MsgBox(locale2(0)) - - ' locale = Convert_locale(locale2(0)) - ' 'End If - ' If locale = "en-US" Then - ' Url_locale = "" - ' Else - ' Url_locale = locale2(0) - ' End If - - ' 'If CBool(InStr(Url, "musicvideo/")) Then - ' ' SetStatusLabel("Status: musicvideo detected - partial support only") - - ' ' Browser.WebView2.CoreWebView2.Navigate(Url) - ' ' Exit Sub - ' 'Else - ' 'If CBool(InStr(Url, "/concert/")) Then - - ' ' SetStatusLabel("Status: concert detected - partial support only") - ' ' Browser.WebView2.CoreWebView2.Navigate(Url) - ' ' Exit Sub - - ' ' End If + End If - 'End If - - ''Debug.WriteLine("###" + CR_Cookies + "###") - - 'Dim Loc_CR_Cookies = " -H " + Chr(34) + CR_Cookies + Chr(34) - - - ''CR_v1Token = "Get" - ''Browser.WebView2.Source = New Uri(Url) - ''Exit Sub #End Region