diff --git a/.vs/Crunchyroll Downloader/v17/.suo b/.vs/Crunchyroll Downloader/v17/.suo index ca0be91..69ff4a7 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 5d224c6..d692a6f 100644 --- a/Crunchyroll Downloader/Anime_Add.vb +++ b/Crunchyroll Downloader/Anime_Add.vb @@ -30,8 +30,11 @@ Public Class Anime_Add Dim locale As String = "en-US" If CBool(InStr(Url, "crunchyroll.com")) = True And CBool(InStr(Url, "watch")) = True And CBool(Main.CrBetaBasic = Nothing) = False Then #Region "Get Cookies" - Dim Cookies As String = Main.CR_Cookies '"Cookie: " + Main.CR_Cookies = "Cookie: " Try + Dim rk As RegistryKey = Registry.CurrentUser.CreateSubKey("Software\CRDownloader") + Dim etp_rt As Boolean = False + Dim ajs_user_id As Boolean = False Dim Collector As New TaskCookieVisitor Dim CM As ICookieManager = CefSharp_Browser.WebBrowser1.GetCookieManager CM.VisitAllCookies(Collector) @@ -39,24 +42,62 @@ Public Class Anime_Add Dim list As List(Of Global.CefSharp.Cookie) = Collector.Task.Result() For i As Integer = 0 To list.Count - 1 + '__cf_bm If CBool(InStr(list.Item(i).Domain, ".crunchyroll.com")) And CBool(InStr(list.Item(i).Name, "_evidon_suppress")) = False Then - Cookies = Cookies + list.Item(i).Name + "=" + list.Item(i).Value + ";" + Main.CR_Cookies = Main.CR_Cookies + list.Item(i).Name + "=" + list.Item(i).Value + ";" End If If CBool(InStr(list.Item(i).Domain, ".crunchyroll.com")) And CBool(InStr(list.Item(i).Name, "c_locale")) Then locale = list.Item(i).Value End If - If CBool(InStr(list.Item(i).Domain, ".crunchyroll.com")) And CBool(InStr(list.Item(i).Name, "etp_rt")) Then - 'MsgBox(list.Item(i).Domain + ":" + list.Item(i).Name + ":" + vbNewLine + list.Item(i).Value) + If CBool(InStr(list.Item(i).Domain, ".crunchyroll.com")) = True And CBool(InStr(list.Item(i).Name, "etp_rt")) = True And Main.CheckCRLogin = True And Main.CR_etp_rt = Nothing Then + Debug.WriteLine("etp_rt = True") + etp_rt = True + Main.CR_etp_rt = list.Item(i).Value + rk.SetValue("etp_rt", Main.CR_etp_rt, RegistryValueKind.String) + ElseIf CBool(InStr(list.Item(i).Domain, ".crunchyroll.com")) = True And CBool(InStr(list.Item(i).Name, "__cf_bm")) = True = True And Main.CheckCRLogin = True And Main.CR_ajs_user_id = Nothing Then + 'MsgBox(list.Item(i).Value) + Debug.WriteLine("ajs_user_id = True") + ajs_user_id = True + Main.CR_ajs_user_id = list.Item(i).Value + rk.SetValue("ajs_user_id", Main.CR_ajs_user_id, RegistryValueKind.String) End If Next + + + + If Main.CR_etp_rt IsNot Nothing And etp_rt = False Then + Main.CR_Cookies = "Cookie: " + "etp_rt" + "=" + Main.CR_etp_rt + ";" + Main.CR_Cookies.Replace("Cookie: ", "") + Dim etp_rt_cookie As New CefSharp.Cookie + etp_rt_cookie.Name = "etp_rt" + etp_rt_cookie.Value = Main.CR_etp_rt + etp_rt_cookie.HttpOnly = True + etp_rt_cookie.Domain = ".crunchyroll.com" + Debug.WriteLine("Set etp_rt_cookie: " + CM.SetCookieAsync("http://www.crunchyroll.com", etp_rt_cookie).Result.ToString) + End If + + If Main.CR_ajs_user_id IsNot Nothing And ajs_user_id = False Then + Main.CR_Cookies = Main.CR_Cookies + "ajs_user_id" + "=" + Main.CR_ajs_user_id + ";" + Dim ajs_user_id_cookie As New CefSharp.Cookie + ajs_user_id_cookie.Name = "__cf_bm" + ajs_user_id_cookie.Value = Main.CR_ajs_user_id + ajs_user_id_cookie.HttpOnly = True + ajs_user_id_cookie.Domain = ".crunchyroll.com" + Debug.WriteLine("Set ajs_user_id_cookie: " + CM.SetCookieAsync("http://www.crunchyroll.com", ajs_user_id_cookie).Result.ToString) + End If + + + Catch ex As Exception CefSharp_Browser.WebBrowser1.Load(Url) Exit Sub End Try + + + 'MsgBox(Cookies) - Cookies = " -H " + Chr(34) + Cookies + Chr(34) + Main.CR_Cookies = " -H " + Chr(34) + Main.CR_Cookies + Chr(34) #End Region Dim Auth As String = " -H " + Chr(34) + "Authorization: " + Main.CrBetaBasic + Chr(34) @@ -64,10 +105,10 @@ Public Class Anime_Add Dim CRBetaBearer As String = "Bearer " - Dim v1Token As String = Main.CurlPost("https://www.crunchyroll.com/auth/v1/token", Cookies, Auth, Post) + Dim v1Token As String = Main.CurlPost("https://www.crunchyroll.com/auth/v1/token", Main.CR_Cookies, Auth, Post) If CBool(InStr(v1Token, "curl:")) = True Then - v1Token = Main.CurlPost("https://www.crunchyroll.com/auth/v1/token", Cookies, Auth, Post) + v1Token = Main.CurlPost("https://www.crunchyroll.com/auth/v1/token", Main.CR_Cookies, Auth, Post) End If If CBool(InStr(v1Token, "curl:")) = True Then @@ -94,12 +135,12 @@ Public Class Anime_Add ' client.Headers.Add(Cookies) '+ WebBrowser1.Document.Cookie) 'MsgBox(OmUStreamSplitEpisodeIndex(1)) Dim Auth2 As String = " -H " + Chr(34) + "Authorization: " + CRBetaBearer + Chr(34) - Dim v2Content As String = Main.CurlAuth("https://www.crunchyroll.com/index/v2", Cookies, Auth2) 'client.DownloadString("https://www.crunchyroll.com/index/v2") + Dim v2Content As String = Main.CurlAuth("https://www.crunchyroll.com/index/v2", Main.CR_Cookies, Auth2) 'client.DownloadString("https://www.crunchyroll.com/index/v2") 'Debug.WriteLine(v2Content) 'MsgBox("v2: " + v2Content) If CBool(InStr(v2Content, "curl:")) = True Then - v2Content = Main.CurlAuth("https://www.crunchyroll.com/index/v2", Cookies, Auth2) + v2Content = Main.CurlAuth("https://www.crunchyroll.com/index/v2", Main.CR_Cookies, Auth2) End If If CBool(InStr(v2Content, "curl:")) = True Then diff --git a/Crunchyroll Downloader/CefSharp_Browser.vb b/Crunchyroll Downloader/CefSharp_Browser.vb index 8babe34..ddeaddb 100644 --- a/Crunchyroll Downloader/CefSharp_Browser.vb +++ b/Crunchyroll Downloader/CefSharp_Browser.vb @@ -34,7 +34,6 @@ Public Class CefSharp_Browser Me.Invoke(New Action(Function() As Object - Main.LoadedUrls.Clear() Debug.WriteLine("FrameLoadEnd" + Date.Now.ToString) Main.WebbrowserURL = WebBrowser1.Address @@ -147,28 +146,10 @@ Public Class CefSharp_Browser Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click - Dim locale As String = "en-US" - Main.CR_Cookies = "Cookies: " - Try - Dim Collector As New TaskCookieVisitor - Dim CM As ICookieManager = WebBrowser1.GetCookieManager - CM.VisitAllCookies(Collector) - Dim DeviceRegion As String = Nothing - Dim list As List(Of Global.CefSharp.Cookie) = Collector.Task.Result() - For i As Integer = 0 To list.Count - 1 - If CBool(InStr(list.Item(i).Domain, ".crunchyroll.com")) = True And CBool(InStr(list.Item(i).Name, "_evidon_suppress")) = False Then - Main.CR_Cookies = Main.CR_Cookies + list.Item(i).Name + "=" + list.Item(i).Value + ";" - ' MsgBox(list.Item(i).Domain + vbNewLine + list.Item(i).Name + ":" + vbNewLine + list.Item(i).Value) - End If - If CBool(InStr(list.Item(i).Domain, ".crunchyroll.com")) And CBool(InStr(list.Item(i).Name, "c_locale")) Then - locale = list.Item(i).Value - - End If - Next - Catch ex As Exception - Debug.Write(ex.ToString) - End Try + 'MsgBox(Main.CR_etp_rt) + 'MsgBox(Main.CR_ajs_user_id) + 'MsgBox(Main.CheckCRLogin.ToString) Try My.Computer.Clipboard.SetText(WebBrowser1.Address) @@ -218,7 +199,7 @@ Public Class CefSharp_Browser If CBool(InStr(WebBrowser1.Address, "https://proxer.me/read/")) Then Main.WebbrowserURL = WebBrowser1.Address Dim NameDLFinal As String = Nothing - Dim NameDL As String() = Document.Split(New String() {"
"}, System.StringSplitOptions.RemoveEmptyEntries) + Dim NameDL As String() = Document.Split(New String() {"
"}, System.StringSplitOptions.RemoveEmptyEntries) Dim NameDL2 As String() = NameDL(1).Split(New String() {"
"}, System.StringSplitOptions.RemoveEmptyEntries) Dim NameDL3 As String() = NameDL2(0).Split(New String() {Chr(34) + "true" + Chr(34) + ">"}, System.StringSplitOptions.RemoveEmptyEntries) For i As Integer = 0 To NameDL3.Count - 1 @@ -321,10 +302,12 @@ Public Class CefSharp_Browser End Sub) Else If CBool(InStr(e.Request.Url, "crunchyroll.com")) = True And CBool(InStr(e.Request.Headers, "Basic ")) = True And Main.CrBetaBasic = Nothing Then + Dim Basic As String() = e.Request.Headers.Split(New String() {"Basic "}, System.StringSplitOptions.RemoveEmptyEntries) Dim Basic2 As String() = Basic(1).Split(New String() {","}, System.StringSplitOptions.RemoveEmptyEntries) Main.CrBetaBasic = "Basic " + Basic2(0) Debug.WriteLine(Main.CrBetaBasic) + End If @@ -335,6 +318,8 @@ Public Class CefSharp_Browser + + ' 'Debug.WriteLine(e.Request.Url) diff --git a/Crunchyroll Downloader/Main.designer.vb b/Crunchyroll Downloader/Main.designer.vb index ce76fc9..10c403e 100644 --- a/Crunchyroll Downloader/Main.designer.vb +++ b/Crunchyroll Downloader/Main.designer.vb @@ -52,6 +52,7 @@ Partial Class Main Me.ThreadCount = New System.Windows.Forms.ToolStripMenuItem() Me.MsgBoxToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.CRCookieToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.ClearAllSettingsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() CType(Me.PictureBox5, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.PictureBox6, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.MetroStyleManager1, System.ComponentModel.ISupportInitialize).BeginInit() @@ -185,7 +186,7 @@ Partial Class Main ' 'ContextMenuStrip1 ' - Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToggleDebugModeToolStripMenuItem, Me.OpenSettingsToolStripMenuItem, Me.TestDownloadToolStripMenuItem, Me.CheckCRBetaTokenToolStripMenuItem, Me.AddonHTMLToolStripMenuItem, Me.Timer3OffToolStripMenuItem, Me.ThreadCount, Me.MsgBoxToolStripMenuItem, Me.CRCookieToolStripMenuItem}) + Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToggleDebugModeToolStripMenuItem, Me.OpenSettingsToolStripMenuItem, Me.TestDownloadToolStripMenuItem, Me.CheckCRBetaTokenToolStripMenuItem, Me.AddonHTMLToolStripMenuItem, Me.Timer3OffToolStripMenuItem, Me.ThreadCount, Me.MsgBoxToolStripMenuItem, Me.CRCookieToolStripMenuItem, Me.ClearAllSettingsToolStripMenuItem}) Me.ContextMenuStrip1.Name = "ContextMenuStrip1" resources.ApplyResources(Me.ContextMenuStrip1, "ContextMenuStrip1") ' @@ -234,6 +235,11 @@ Partial Class Main Me.CRCookieToolStripMenuItem.Name = "CRCookieToolStripMenuItem" resources.ApplyResources(Me.CRCookieToolStripMenuItem, "CRCookieToolStripMenuItem") ' + 'ClearAllSettingsToolStripMenuItem + ' + Me.ClearAllSettingsToolStripMenuItem.Name = "ClearAllSettingsToolStripMenuItem" + resources.ApplyResources(Me.ClearAllSettingsToolStripMenuItem, "ClearAllSettingsToolStripMenuItem") + ' 'Main ' Me.ApplyImageInvert = True @@ -291,4 +297,5 @@ Partial Class Main Friend WithEvents ThreadCount As ToolStripMenuItem Friend WithEvents MsgBoxToolStripMenuItem As ToolStripMenuItem Friend WithEvents CRCookieToolStripMenuItem As ToolStripMenuItem + Friend WithEvents ClearAllSettingsToolStripMenuItem As ToolStripMenuItem End Class diff --git a/Crunchyroll Downloader/Main.resx b/Crunchyroll Downloader/Main.resx index 08fd487..f1b4a7a 100644 --- a/Crunchyroll Downloader/Main.resx +++ b/Crunchyroll Downloader/Main.resx @@ -540,6 +540,12 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ClearAllSettingsToolStripMenuItem + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + Main @@ -609,8 +615,14 @@ CR_Cookie + + 233, 22 + + + Clear all settings + - 234, 202 + 234, 246 ContextMenuStrip1 diff --git a/Crunchyroll Downloader/Main.vb b/Crunchyroll Downloader/Main.vb index 60bbac2..c52ab16 100644 --- a/Crunchyroll Downloader/Main.vb +++ b/Crunchyroll Downloader/Main.vb @@ -22,12 +22,18 @@ Public Class Main Dim t As Thread Dim HTML As String = Nothing Public CR_Cookies As String = "Cookie: " + + Public CR_etp_rt As String = Nothing + Public CR_ajs_user_id As String = Nothing + Public CheckCRLogin As Boolean = True + 'Public LoadedUrl As String = Nothing Public CrBetaMass As String = Nothing Public CrBetaMassEpisodes As String = Nothing Public CrBetaMassParameters As String = Nothing Public CrBetaMassBaseURL As String = Nothing Public CrBetaBasic As String = Nothing + 'Public CrBetaObjects As String = Nothing 'Public CrBetaStreams As String = Nothing 'Public CrBetaStreamsUrl As String = Nothing @@ -74,14 +80,14 @@ Public Class Main Public SubsOnly As Boolean = False Public VideoFormat As String = ".mp4" Public MergeSubsFormat As String = "mov_text" - Public LoginDialog As Boolean = False - Public NonCR_Timeout As Integer = 5 - Public NonCR_URL As String = Nothing + 'Public LoginDialog As Boolean = False + 'Public NonCR_Timeout As Integer = 5 + 'Public NonCR_URL As String = Nothing Public DlSoftSubsRDY As Boolean = True Public DialogTaskString As String - Public ErrorBrowserString As String - Public ErrorBrowserUrl As String - Public ErrorBrowserBackString As String + 'Public ErrorBrowserString As String + 'Public ErrorBrowserUrl As String + 'Public ErrorBrowserBackString As String Public UserCloseDialog As Boolean = False Dim Aktuell As String Dim Gesamt As String @@ -355,6 +361,7 @@ Public Class Main End Function Private Sub Form8_Load(sender As Object, e As EventArgs) Handles MyBase.Load + ' Me.ContextMenuStrip = ContextMenuStrip1 Dim tbtl As TextBoxTraceListener = New TextBoxTraceListener(TheTextBox) Trace.Listeners.Add(tbtl) @@ -397,6 +404,16 @@ Public Class Main DarkModeValue = CBool(Integer.Parse(rkg.GetValue("Dark_Mode").ToString)) Catch ex As Exception End Try + Try + Dim rkg As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\CRDownloader") + CR_etp_rt = rkg.GetValue("etp_rt").ToString + Catch ex As Exception + End Try + Try + Dim rkg As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\CRDownloader") + CR_ajs_user_id = rkg.GetValue("ajs_user_id").ToString + Catch ex As Exception + End Try Manager.Style = MetroColorStyle.Orange If DarkModeValue = True Then Manager.Theme = MetroThemeStyle.Dark @@ -589,7 +606,7 @@ Public Class Main MergeSubsFormat = "mov_text" End If - ElseIf MergeSubsFormat = "None" Or MergeSubsFormat = "0" Then + ElseIf MergeSubsFormat = "None" Or MergeSubsFormat = "0" Or MergeSubsFormat = "[merge disabled]" Then MergeSubs = False Else MergeSubs = True @@ -633,10 +650,9 @@ Public Class Main Dim Format As String = rkg.GetValue("VideoFormat").ToString If Format = ".mkv" Then VideoFormat = ".mkv" - MergeSubsFormat = "copy" ElseIf Format = ".aac" Then VideoFormat = ".aac" - MergeSubsFormat = "copy" + MergeSubsFormat = "[merge disabled]" End If Catch ex2 As Exception End Try @@ -998,6 +1014,7 @@ Public Class Main Dim sr As StreamReader Dim sr2 As StreamReader + Dim cmd As String = "--no-alpn -fsSLm 15 -A " + My.Resources.ffmpeg_user_agend.Replace("User-Agent: ", "") + " " + Chr(34) + Url + Chr(34) Dim Proc As New Process 'MsgBox(cmd) @@ -1026,9 +1043,11 @@ Public Class Main Loop Until Proc.HasExited If CurlOutput = Nothing Then + Debug.WriteLine("curl-E: " + CurlError) Return CurlError Else + Debug.WriteLine("curl-O: " + CurlOutput) Return CurlOutput End If @@ -1076,9 +1095,11 @@ Public Class Main Loop Until Proc.HasExited If CurlOutput = Nothing Then + Debug.WriteLine("curl-E: " + CurlError) Return CurlError Else + Debug.WriteLine("curl-O: " + CurlOutput) Return CurlOutput End If @@ -1127,11 +1148,11 @@ Public Class Main Loop Until Proc.HasExited If CurlOutput = Nothing Then + Debug.WriteLine("curl-E: " + CurlError) Return CurlError - Else + Debug.WriteLine("curl-O: " + CurlOutput) Return CurlOutput - End If @@ -1288,6 +1309,9 @@ Public Class Main End Sub Public Sub GetBetaVideo(ByVal Streams As String, ByVal WebsiteURL As String) ', ByVal ObjectJson As String, ByVal VideoJson As String) ' + If b = False Then + b = True + End If Debug.WriteLine(Streams) Debug.WriteLine(vbCrLf) Debug.WriteLine("Website: " + WebsiteURL) @@ -1728,7 +1752,8 @@ Public Class Main 'MsgBox(SoftSub_3) Dim client0 As New WebClient client0.Encoding = Encoding.UTF8 - Dim str0 As String = client0.DownloadString(SoftSub_3) + Dim str0 As String = client0.DownloadString(SoftSub_3) 'Curl(SoftSub_3) + 'MsgBox(str0) Dim Pfad3 As String = Pfad2.Replace(Chr(34), "") Dim FN As String = Path.ChangeExtension(Path.Combine(Path.GetFileNameWithoutExtension(Pfad3) + "." + GetSubFileLangName(SoftSubs2(i)) + Path.GetExtension(Pfad3)), "ass") 'MsgBox(FN) @@ -3407,70 +3432,7 @@ Public Class Main Dim localHTML As String = document Debug.WriteLine(Date.Now.ToString + "." + Date.Now.Millisecond.ToString) Debug.WriteLine(Address) - 'If CBool(InStr(Address, "crunchyroll.com/")) And CBool(InStr(Address, "streams?")) Then - ' Debug.WriteLine("Streams") - ' My.Computer.FileSystem.WriteAllText("D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0 - CefSharp\Crunchyroll Downloader\bin\x64\Debug\WebInterface\CrBetaStreams.txt", CrBetaStreams, False) - ' CrBetaStreamsUrl = Address - ' CrBetaStreams = localHTML.Replace("", "").Replace("", "").Replace("
", "").Replace("
", "").Replace("", "").Replace(My.Resources.htmlReplace, "") - - ' Dim ObjectsURLBuilder() As String = Address.Split(New String() {"videos"}, System.StringSplitOptions.RemoveEmptyEntries) - ' Dim ObjectsURLBuilder2() As String = ObjectsURLBuilder(1).Split(New String() {"/streams"}, System.StringSplitOptions.RemoveEmptyEntries) - ' Dim ObjectsURLBuilder3() As String = LoadedUrl.Split(New String() {"watch/"}, System.StringSplitOptions.RemoveEmptyEntries) - ' Dim ObjectsURLBuilder4() As String = ObjectsURLBuilder3(1).Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries) - ' Dim ObjectsURL As String = ObjectsURLBuilder(0) + "objects/" + ObjectsURLBuilder4(0) + ObjectsURLBuilder2(1) - ' Debug.WriteLine(ObjectsURL) - - - - ' CefSharp_Browser.WebBrowser1.LoadUrl(ObjectsURL) - - 'ElseIf CBool(InStr(Address, "crunchyroll.com/")) And CBool(InStr(Address, "objects")) Then - - ' CrBetaObjects = localHTML.Replace("", "").Replace("", "").Replace("
", "").Replace("
", "").Replace("", "").Replace(My.Resources.htmlReplace, "") - - ' GetBetaVideoProxy(CrBetaStreamsUrl, LoadedUrl, CrBetaObjects, CrBetaStreams) - - 'Else - 'If CBool(InStr(Address, "crunchyroll.com/")) And CBool(InStr(Address, "seasons?series_id=")) Then - - ' GetBetaSeasons(Address, localHTML.Replace("", "").Replace("", "").Replace("
", "").Replace("
", "").Replace("", "").Replace(My.Resources.htmlReplace, "")) - - 'Else - 'If CBool(InStr(Address, CrBetaMassBaseURL + "episodes?season_id=")) Then - - - ' Dim EpisodeJson As String = localHTML.Replace("", "").Replace("", "").Replace("
", "").Replace("
", "").Replace("", "").Replace(My.Resources.htmlReplace, "") - - - ' CrBetaMassEpisodes = EpisodeJson - - ' 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) - ' 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) - ' If EpisodeSplit(i).Substring(0, 1) = Chr(34) Then - ' Anime_Add.comboBox3.Items.Add(EpisodeNameSplit2(0)) - ' Anime_Add.comboBox4.Items.Add(EpisodeNameSplit2(0)) - ' Else - ' Anime_Add.comboBox3.Items.Add("Episode " + EpisodeSplit2(0)) - ' Anime_Add.comboBox4.Items.Add("Episode " + EpisodeSplit2(0)) - ' End If - - ' Next - - ' If Anime_Add.comboBox3.Items.Count > 0 Then - ' Anime_Add.comboBox3.SelectedIndex = 0 - ' Anime_Add.comboBox4.SelectedIndex = Anime_Add.comboBox4.Items.Count - 1 - ' End If - - ' Anime_Add.comboBox3.Enabled = True - ' Anime_Add.comboBox4.Enabled = True - - ' Else If CBool(InStr(Address, "title-api.prd.funimationsvc.com")) Then If FunimationJsonBrowser = "EpisodeJson" Then Anime_Add.FillFunimationEpisodes(localHTML.Replace("", "").Replace("", "").Replace("
", "").Replace("
", "").Replace("", "").Replace("
", "")) '
@@ -3516,34 +3478,45 @@ Public Class Main
             End If
         End If
         If b = True Then
-            'LoadedUrls
-            'Debug.WriteLine(LoadedUrls.Count.ToString)
             LoadedUrls.Clear()
-            Debug.WriteLine("Just Browsing, exiting...")
             Grapp_RDY = True
+            Debug.WriteLine("Just Browsing, exiting...")
+            'Debug.WriteLine("Just Browsing, exiting... for real...")
             Exit Sub
         End If
         'MsgBox("loaded!")
         If CBool(InStr(Address, "crunchyroll.com")) Then
             WebbrowserURL = Address
-            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"
-                    Grapp_RDY = True
-                    Exit Sub
-                    LoadedUrls.Clear()
-                End If
 
-                If Application.OpenForms().OfType(Of CefSharp_Browser).Any = True Then
+
+            For i As Integer = 10 To 1 Step -1
+                If Application.OpenForms().OfType(Of Anime_Add).Any = True Then
                     Anime_Add.StatusLabel.Text = "Status: Processing Url " + i.ToString
                 End If
                 Me.Text = "Status: Processing Url " + i.ToString
 
                 Pause(1)
+
+                If b = True Then
+                    If Application.OpenForms().OfType(Of Anime_Add).Any = True Then
+                        Anime_Add.StatusLabel.Text = "Status: idle"
+                    End If
+                    Me.Text = "Crunchyroll Downloader"
+                    Grapp_RDY = True
+                    LoadedUrls.Clear()
+                    Debug.WriteLine("canceled....")
+                    Exit Sub
+                End If
             Next
+
+            Debug.WriteLine(LoadedUrls.Count.ToString)
+            For i As Integer = 0 To LoadedUrls.Count - 1
+                Debug.WriteLine(LoadedUrls(i))
+            Next
+
+            If Application.OpenForms().OfType(Of Anime_Add).Any = True Then
+                Anime_Add.StatusLabel.Text = "Status: Processing... "
+            End If
             Me.Text = "Status: Processing... "
             ProcessUrls()
             Exit Sub
@@ -3612,7 +3585,14 @@ Public Class Main
         For i As Integer = 0 To LoadedUrls.Count - 1
             Dim requesturl As String = LoadedUrls.Item(i)
             If CBool(InStr(requesturl, "crunchyroll.com/")) And CBool(InStr(requesturl, "streams?")) Then
+
                 If b = False Then
+
+                    If Application.OpenForms().OfType(Of Anime_Add).Any = True Then
+                        Anime_Add.StatusLabel.Text = "Status: Crunchyroll episode found."
+                    End If
+                    Me.Text = "Status: Crunchyroll episode found."
+
                     GetBetaVideoProxy(requesturl, WebbrowserURL)
                     b = True
 
@@ -3624,7 +3604,14 @@ Public Class Main
                     Exit Sub
                 End If
             ElseIf CBool(InStr(requesturl, "crunchyroll.com/")) And CBool(InStr(requesturl, "seasons?series_id=")) Then
+
                 If b = False Then
+
+                    If Application.OpenForms().OfType(Of Anime_Add).Any = True Then
+                        Anime_Add.StatusLabel.Text = "Status: Crunchyroll season found."
+                    End If
+                    Me.Text = "Status: Crunchyroll season found."
+
                     GetBetaSeasons(requesturl)
                     'CefSharp_Browser.WebBrowser1.LoadUrl(requesturl)
                     b = True
@@ -4290,6 +4277,16 @@ Public Class Main
         MsgBox(CR_Cookies)
     End Sub
 
+    Private Sub ClearAllSettingsToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ClearAllSettingsToolStripMenuItem.Click
+
+
+        If MessageBox.Show("This will clear all settings and close the programm!", "confirm?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then
+            Registry.CurrentUser.DeleteSubKey("Software\CRDownloader")
+            Me.Close()
+        End If
+
+    End Sub
+
 
     'Dim TN As String = "https://www.crunchyroll.com/imgsrv/display/thumbnail/320x180/catalog/crunchyroll/43a60a9d2877b11429d71c81db6d7636.jpeg"
     'Dim cmd As String = "-i " + Chr(34) + "https://pl.crunchyroll.com/evs3/edc1a2ad856c347b4f86c0985ecc6d01/assets/efmaqxcadlmjn3o_2040239.mp4/index-v1-a1.m3u8?res=640x360&Expires=1666448510&Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9wbC5jcnVuY2h5cm9sbC5jb20vZXZzMy9lZGMxYTJhZDg1NmMzNDdiNGY4NmMwOTg1ZWNjNmQwMS9hc3NldHMvZWZtYXF4Y2FkbG1qbjNvXzIwNDAyMzkubXA0L2luZGV4LXYxLWExLm0zdTg~cmVzPTY0MHgzNjAiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE2NjY0NDg1MTB9fX1dfQ__&Signature=gd6oVG0w2pUa~l8~3JTecsU~0yyzkK1aaPQ~0WN32MeAuYfo49eYwz1C3AgeFAEeFyy8yMyW~3D4awwE7veS8BHptQzRlrcdFqw7VNDPUaA-3kzaqPFWOPlj2V~HkVv4m-soVs2HSs14i7Is8cWGQ6-0vQ6lFkxSxu2dg-eZdxcagkqSPwMsnjU~M17p1MhK0aQNWh2KyJUZ3zmeZNHrMQiAq4cBXM9aMp05XxI-li2ptCRMh63wYaYdmnvwOICDqgq5kwhLA-NNBavnjYo4HlEyfXwQWWEF2H~lQeAsZ90S6wF8~IrbP~DdMZc1Othh26Z0QWVX0BFEhPHmsoHqqw__&Key-Pair-Id=APKAJMWSQ5S7ZB3MF5VA" + Chr(34) + " -c copy "
diff --git a/Crunchyroll Downloader/My Project/AssemblyInfo.vb b/Crunchyroll Downloader/My Project/AssemblyInfo.vb
index 70016ff..e97ef51 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/Trackbar.Designer.vb b/Crunchyroll Downloader/Trackbar.Designer.vb
index 53f6a2f..1f44105 100644
--- a/Crunchyroll Downloader/Trackbar.Designer.vb	
+++ b/Crunchyroll Downloader/Trackbar.Designer.vb	
@@ -36,7 +36,7 @@ Partial Class Trackbar
         Me.Button1.Name = "Button1"
         Me.Button1.Size = New System.Drawing.Size(100, 41)
         Me.Button1.TabIndex = 0
-        Me.Button1.Text = "Applay"
+        Me.Button1.Text = "Apply"
         Me.Button1.UseVisualStyleBackColor = True
         '
         'TrackBar1
diff --git a/Crunchyroll Downloader/einstellungen.vb b/Crunchyroll Downloader/einstellungen.vb
index 8c4f82a..6bf2b5d 100644
--- a/Crunchyroll Downloader/einstellungen.vb	
+++ b/Crunchyroll Downloader/einstellungen.vb	
@@ -559,7 +559,7 @@ Public Class Einstellungen
         Else
             Main.MergeSubsFormat = CB_Merge.SelectedItem.ToString
             Main.MergeSubs = False
-            rk.SetValue("MergeSubs", "None", RegistryValueKind.String)
+            rk.SetValue("MergeSubs", "[merge disabled]", RegistryValueKind.String)
         End If
 
 
@@ -1223,18 +1223,21 @@ Public Class Einstellungen
 
     Private Sub CB_Format_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CB_Format.SelectedIndexChanged
         If CB_Format.Text = "AAC (Audio only)" Then
-            If CB_Merge.SelectedIndex > 0 Then
-                MsgBox("Merged subs are not avalible with audio only!", MsgBoxStyle.Information)
-            End If
-            CB_Merge.SelectedIndex = 0
-        ElseIf CB_Format.Text = "MP4" Then
             CB_Merge.SelectedIndex = 0
             CB_Merge.Items.Clear()
-            CB_Merge.Items.Add("[merge disabled]") 'mov_text
+            CB_Merge.Items.Add("[merge disabled]")
+            CB_Merge.SelectedIndex = 0
+            CB_Merge.Enabled = False
+        ElseIf CB_Format.Text = "MP4" Then
+            CB_Merge.Enabled = True
+            CB_Merge.SelectedIndex = 0
+            CB_Merge.Items.Clear()
+            CB_Merge.Items.Add("[merge disabled]")
             CB_Merge.Items.Add("mov_text")
             'CB_Merge.Items.Add("srt")
             CB_Merge.SelectedItem = Main.MergeSubsFormat
         ElseIf CB_Format.Text = "MKV" Then
+            CB_Merge.Enabled = True
             CB_Merge.SelectedIndex = 0
             CB_Merge.Items.Clear()
             CB_Merge.Items.Add("[merge disabled]")