diff --git a/.vs/Crunchyroll Downloader/v15/.suo b/.vs/Crunchyroll Downloader/v15/.suo index 7af9cd1..4915899 100644 Binary files a/.vs/Crunchyroll Downloader/v15/.suo and b/.vs/Crunchyroll Downloader/v15/.suo differ diff --git a/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide b/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide index eca4821..899dea7 100644 Binary files a/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide and b/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide differ diff --git a/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-shm b/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-shm index 16c2b03..889ba97 100644 Binary files a/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-shm and b/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-shm differ diff --git a/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-wal b/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-wal index d8ab5a8..cce8cc4 100644 Binary files a/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-wal and b/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-wal differ diff --git a/Crunchyroll Downloader/Anime_Add.vb b/Crunchyroll Downloader/Anime_Add.vb index caf5adf..aebd15e 100644 --- a/Crunchyroll Downloader/Anime_Add.vb +++ b/Crunchyroll Downloader/Anime_Add.vb @@ -177,6 +177,8 @@ Public Class Anime_Add Private Sub Btn_dl_Click(sender As Object, e As EventArgs) Handles btn_dl.Click + + CefSharp_Browser.Show() Main.LoginOnly = "Download Mode!" 'MsgBox(Main.WebbrowserURL) @@ -190,81 +192,6 @@ Public Class Anime_Add Try 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 -#Region "Funimation url parameter" - 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 - - - - - If Main.DubFunimation = "Disabled" Then - Else - If CBool(InStr(textBox1.Text, "?lang=")) Then - Dim ClearUri As String() = textBox1.Text.Split(New String() {"?lang="}, System.StringSplitOptions.RemoveEmptyEntries) - If ClearUri.Count > 1 Then - If CBool(InStr(ClearUri(1), "&")) Then - Dim ClearUri2 As String() = ClearUri(1).Split(New String() {"&"}, System.StringSplitOptions.RemoveEmptyEntries) - Dim Parms As String = Nothing - For i As Integer = 1 To ClearUri2.Count - 1 - Parms = Parms + "&" + ClearUri2(i) - Next - textBox1.Text = ClearUri(0) + "?lang=" + Main.DubFunimation + Parms - Else - textBox1.Text = ClearUri(0) + "?lang=" + Main.DubFunimation - End If - Else - textBox1.Text = ClearUri(0) + "?lang=" + Main.DubFunimation - End If - ElseIf CBool(InStr(textBox1.Text, "&lang=")) Then - Dim ClearUri As String() = textBox1.Text.Split(New String() {"&lang="}, System.StringSplitOptions.RemoveEmptyEntries) - If ClearUri.Count > 1 Then - - If CBool(InStr(ClearUri(1), "&")) Then - Dim ClearUri2 As String() = ClearUri(1).Split(New String() {"&"}, System.StringSplitOptions.RemoveEmptyEntries) - Dim Parms As String = Nothing - For i As Integer = 1 To ClearUri2.Count - 1 - Parms = Parms + "&" + ClearUri2(i) - Next - textBox1.Text = ClearUri(0) + "&lang=" + Main.DubFunimation + Parms - Else - textBox1.Text = ClearUri(0) + "&lang=" + Main.DubFunimation - End If - Else - textBox1.Text = ClearUri(0) + "&lang=" + Main.DubFunimation - End If - - ElseIf CBool(InStr(textBox1.Text, "?")) Then - textBox1.AppendText("&lang=" + Main.DubFunimation) - Else - textBox1.AppendText("?lang=" + Main.DubFunimation) - End If - End If - 'ElseIf CBool(InStr(textBox1.Text, "vrv.co/series/")) Then - - - - End If -#End Region 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 @@ -284,6 +211,32 @@ Public Class Anime_Add textBox1.ForeColor = Color.Black textBox1.Text = "URL" 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 @@ -730,6 +683,11 @@ Public Class Anime_Add client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), "")) v1Json = client.DownloadString(v1JsonUrl) End Using + Main.Funimation_Grapp_RDY = False + Main.WebbrowserURL = UriUsed + ListBox1.Items.Remove(ListBox1.Items(0)) + Main.b = False + Main.Invalidate() Main.GetFunimationNewJS_VideoProxy(Nothing, v1Json) Exit Sub Catch ex As Exception @@ -739,57 +697,9 @@ Public Class Anime_Add End If - - If Main.DubFunimation = "Disabled" Then - Else - If CBool(InStr(UriUsed, "?lang=")) Then - Dim ClearUri As String() = UriUsed.Split(New String() {"?lang="}, System.StringSplitOptions.RemoveEmptyEntries) - If ClearUri.Count > 1 Then - If CBool(InStr(ClearUri(1), "&")) Then - Dim ClearUri2 As String() = ClearUri(1).Split(New String() {"&"}, System.StringSplitOptions.RemoveEmptyEntries) - Dim Parms As String = Nothing - For i As Integer = 1 To ClearUri2.Count - 1 - Parms = Parms + "&" + ClearUri2(i) - Next - UriUsed = ClearUri(0) + "?lang=" + Main.DubFunimation + Parms - Else - UriUsed = ClearUri(0) + "?lang=" + Main.DubFunimation - End If - Else - UriUsed = ClearUri(0) + "?lang=" + Main.DubFunimation - End If - ElseIf CBool(InStr(UriUsed, "&lang=")) Then - Dim ClearUri As String() = UriUsed.Split(New String() {"&lang="}, System.StringSplitOptions.RemoveEmptyEntries) - If ClearUri.Count > 1 Then - - If CBool(InStr(ClearUri(1), "&")) Then - Dim ClearUri2 As String() = ClearUri(1).Split(New String() {"&"}, System.StringSplitOptions.RemoveEmptyEntries) - Dim Parms As String = Nothing - For i As Integer = 1 To ClearUri2.Count - 1 - Parms = Parms + "&" + ClearUri2(i) - Next - UriUsed = ClearUri(0) + "&lang=" + Main.DubFunimation + Parms - Else - UriUsed = ClearUri(0) + "&lang=" + Main.DubFunimation - End If - Else - UriUsed = ClearUri(0) + "&lang=" + Main.DubFunimation - End If - - ElseIf CBool(InStr(UriUsed, "?")) Then - UriUsed = UriUsed + "&lang=" + Main.DubFunimation - Else - UriUsed = UriUsed + "?lang=" + Main.DubFunimation - End If - End If - Main.Funimation_Grapp_RDY = False Main.WebbrowserURL = UriUsed - 'MsgBox(UriUsed) ListBox1.Items.Remove(ListBox1.Items(0)) - 'Main.b = False - - Main.b = False CefSharp_Browser.WebBrowser1.Load(UriUsed) StatusLabel.Text = "Status: loading in browser" diff --git a/Crunchyroll Downloader/CefSharp_Browser.vb b/Crunchyroll Downloader/CefSharp_Browser.vb index 86cdc4e..b4f0788 100644 --- a/Crunchyroll Downloader/CefSharp_Browser.vb +++ b/Crunchyroll Downloader/CefSharp_Browser.vb @@ -11,6 +11,9 @@ Imports System.Text Imports AdapterRequestHandler Public Class CefSharp_Browser + + + Public keks As String = Nothing 'Public c As Boolean = True Dim t As Thread @@ -122,16 +125,21 @@ Public Class CefSharp_Browser Catch ex As Exception End Try + If Main.UserBowser = False Then - Me.Location = New Point(-10000, -1000) + Me.Location = New Point(-10000, -10000) + End If End Sub - Private Sub GeckoFX_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing + Private Sub CefSharp_Browser_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing Main.UserBowser = False - Main.ProcessUrls() + Me.Location = New Point(-10000, -10000) + + e.Cancel = True End Sub + Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Try @@ -299,7 +307,7 @@ Public Class CefSharp_Browser Exit Sub End If Debug.WriteLine(e.RequestUrl) - ElseIf CBool(InStr(e.requesturl, "https://api.vrv.co")) And CBool(InStr(e.requesturl, "streams?")) Then + ElseIf CBool(InStr(e.RequestUrl, "https://api.vrv.co")) And CBool(InStr(e.RequestUrl, "streams?")) Then If (Me.InvokeRequired) Then Me.Invoke(Sub() Main.LoadedUrls.Add(e.RequestUrl)) Exit Sub @@ -308,7 +316,7 @@ Public Class CefSharp_Browser Exit Sub End If Debug.WriteLine(e.RequestUrl) - ElseIf CBool(InStr(e.requesturl, "https://api.vrv.co")) And CBool(InStr(e.requesturl, "seasons?series_id=")) Then + ElseIf CBool(InStr(e.RequestUrl, "https://api.vrv.co")) And CBool(InStr(e.RequestUrl, "seasons?series_id=")) Then If (Me.InvokeRequired) Then Me.Invoke(Sub() Main.LoadedUrls.Add(e.RequestUrl)) Exit Sub @@ -318,7 +326,7 @@ Public Class CefSharp_Browser End If Debug.WriteLine(e.RequestUrl) - End If + End If Exit Sub @@ -489,8 +497,10 @@ Public Class CefSharp_Browser + 'Private Sub WebBrowser1_ConsoleMessage(sender As Object, e As ConsoleMessageEventArgs) Handles WebBrowser1.ConsoleMessage ' Debug.WriteLine(e.Message) 'End Sub + End Class diff --git a/Crunchyroll Downloader/Main.vb b/Crunchyroll Downloader/Main.vb index 8b3d986..78a401a 100644 --- a/Crunchyroll Downloader/Main.vb +++ b/Crunchyroll Downloader/Main.vb @@ -112,6 +112,7 @@ Public Class Main Public Grapp_non_cr_RDY As Boolean = True Public Grapp_Abord As Boolean = False Public CR_NameMethode As Integer = 0 + Public LeadingZero As Integer = 1 Public MaxDL As Integer Public ResoNotFoundString As String Public ResoBackString As String @@ -321,6 +322,29 @@ Public Class Main Einstellungen.Theme = Manager.Theme End Sub + Function AddLeadingZeros(ByVal txt As String) As String + + txt = txt.Replace(",", ".") + Dim Post As String = Nothing + If CBool(InStr(txt, ".")) = True Then + Dim txt_split As String() = txt.Split(New String() {"."}, System.StringSplitOptions.RemoveEmptyEntries) + txt = txt_split(0) + Post = "." + txt_split(1) + End If + + For i As Integer = 0 To LeadingZero + 1 + If txt.Count = LeadingZero + 1 Then + Exit For + Else + txt = "0" + txt + End If + Next + + Dim Output As String = txt + Post + + Return Output + 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) @@ -357,6 +381,7 @@ Public Class Main 'Initialize Cef with the provided settings Cef.Initialize(settings) + Try Dim rkg As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\CRDownloader") DarkModeValue = CBool(Integer.Parse(rkg.GetValue("Dark_Mode").ToString)) @@ -462,6 +487,12 @@ Public Class Main 'MsgBox(Resu) Catch ex As Exception End Try + Try + Dim rkg As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\CRDownloader") + LeadingZero = Integer.Parse(rkg.GetValue("LeadingZero").ToString) + 'MsgBox(Resu) + Catch ex As Exception + End Try Try Dim rkg As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\CRDownloader") SubSprache = rkg.GetValue("Sub").ToString @@ -597,6 +628,8 @@ Public Class Main BlockList = New List(Of String) BackgroundWorker1.RunWorkerAsync() RetryWithCachedFiles() + + End Sub Private Sub BackgroundWorker1_DoWork(sender As Object, e As DoWorkEventArgs) Handles BackgroundWorker1.DoWork @@ -1122,26 +1155,7 @@ Public Class Main Dim CR_Episode_2 As String() = CR_Episode_1(1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) '(New [Char]() {"-"}) CR_Anime_Folge_int = String.Join(" ", CR_Episode_2(0).Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c) 'System.Text.RegularExpressions.Regex.Replace(CR_Name_2(0), "[^\w\\-]", " ") CR_Anime_Folge_int = RemoveExtraSpaces(CR_Anime_Folge_int) - Dim CleanedNumber As String = Nothing - Dim myChars() As Char = CR_Anime_Folge_int.ToCharArray() - For Each ch As Char In myChars - If Char.IsDigit(ch) Then - CleanedNumber = CleanedNumber + ch.ToString - ElseIf ch = "." Then - CleanedNumber = CleanedNumber + ch.ToString - ElseIf ch = "," Then - CleanedNumber = CleanedNumber + "." - End If - Next - If CleanedNumber = Nothing Then - ElseIf CBool(InStr(CleanedNumber, ".")) Then - Dim Folge_Double As Double = Double.Parse(CleanedNumber, CultureInfo.InvariantCulture) - If Folge_Double < 10 Then - CR_Anime_Folge_int = String.Format("{0:00.0}", Folge_Double) - End If - ElseIf Integer.Parse(CleanedNumber) < 10 Then - CR_Anime_Folge_int = "0" + CleanedNumber - End If + 'CR_Anime_Folge_int = AddLeadingZeros(CR_Anime_Folge_int) End If If CBool(InStr(CR_Anime_Folge_int, ",")) Then CR_Anime_Folge_int = CR_Anime_Folge_int.Replace(",", ".") @@ -1174,7 +1188,7 @@ Public Class Main End If If Episode_Prefix = "[default episode prefix]" Then Else - CR_Anime_Folge = Episode_Prefix + CR_Anime_Folge_int + CR_Anime_Folge = Episode_Prefix + AddLeadingZeros(CR_Anime_Folge_int) End If If CR_Anime_Titel = Nothing Then CR_FilenName = CR_Anime_Name @@ -1773,9 +1787,9 @@ Public Class Main End If If CR_episode = Nothing Then ElseIf Episode_Prefix = "[default episode prefix]" Then - CR_episode = "Episode " + CR_episode + CR_episode = "Episode " + AddLeadingZeros(CR_episode) Else - CR_episode = Episode_Prefix + CR_episode + CR_episode = Episode_Prefix + AddLeadingZeros(CR_episode) End If If CR_NameMethode = 0 Then 'nummer If CR_season_number = Nothing Then @@ -2279,9 +2293,9 @@ Public Class Main End If If CR_episode = Nothing Then ElseIf Episode_Prefix = "[default episode prefix]" Then - CR_episode = "Episode " + CR_episode + CR_episode = "Episode " + AddLeadingZeros(CR_episode) Else - CR_episode = Episode_Prefix + CR_episode + CR_episode = Episode_Prefix + AddLeadingZeros(CR_episode) End If If CR_NameMethode = 0 Then 'nummer If CR_season_number = Nothing Then @@ -2882,6 +2896,14 @@ Public Class Main End Sub Private Sub Btn_add_Click(sender As Object, e As EventArgs) Handles Btn_add.Click + + + If Application.OpenForms().OfType(Of CefSharp_Browser).Any = True Then + Else + UserBowser = False + CefSharp_Browser.Show() + End If + If Anime_Add.WindowState = System.Windows.Forms.FormWindowState.Minimized Then Anime_Add.WindowState = System.Windows.Forms.FormWindowState.Normal Else @@ -2930,12 +2952,17 @@ Public Class Main End Sub Private Sub Btn_Browser_Click(sender As Object, e As EventArgs) Handles Btn_Browser.Click - If Application.OpenForms().OfType(Of CefSharp_Browser).Any = True Then - CefSharp_Browser.Location = Me.Location - End If Debug.WriteLine(Date.Now.ToString + "." + Date.Now.Millisecond.ToString) UserBowser = True - CefSharp_Browser.Show() + + If Application.OpenForms().OfType(Of CefSharp_Browser).Any = True Then + CefSharp_Browser.Location = Me.Location + Else + CefSharp_Browser.Location = Me.Location + CefSharp_Browser.Show() + End If + + End Sub Public Function RemoveExtraSpaces(input_text As String) As String @@ -3390,25 +3417,30 @@ Public Class Main End If End Function Public Sub GetFunimationNewJS_VideoProxy(Optional ByVal v1JsonURL As String = Nothing, Optional ByVal v1JsonData As String = Nothing) - Dim Collector As New TaskCookieVisitor - Dim CM As ICookieManager = CefSharp_Browser.WebBrowser1.GetCookieManager - CM.VisitAllCookies(Collector) - Dim list As List(Of Global.CefSharp.Cookie) = Collector.Task.Result() - Dim Cookie As String = "" - For i As Integer = 0 To list.Count - 1 - If CBool(InStr(list.Item(i).Domain, "funimation.com")) Then 'list.Item(i).Domain = "funimation.com" Then - 'MsgBox(list.Item(i).Name + vbNewLine + list.Item(i).Value) - Cookie = Cookie + list.Item(i).Name + "=" + list.Item(i).Value + ";" - End If - If CBool(InStr(list.Item(i).Domain, "funimation.com")) And CBool(InStr(list.Item(i).Name, "src_token")) Then 'list.Item(i).Domain = "funimation.com" Then - 'MsgBox(list.Item(i).Name + vbNewLine + list.Item(i).Value) - FunimationToken = "Token " + list.Item(i).Value - End If - If CBool(InStr(list.Item(i).Domain, "funimation.com")) And CBool(InStr(list.Item(i).Name, "region")) Then 'list.Item(i).Domain = "funimation.com" Then - 'MsgBox(list.Item(i).Name + vbNewLine + list.Item(i).Value) - FunimationDeviceRegion = "?deviceType=web&" + list.Item(i).Name + "=" + list.Item(i).Value - End If - Next + Try + Dim Collector As New TaskCookieVisitor + Dim CM As ICookieManager = CefSharp_Browser.WebBrowser1.GetCookieManager + CM.VisitAllCookies(Collector) + Dim list As List(Of Global.CefSharp.Cookie) = Collector.Task.Result() + Dim Cookie As String = "" + For i As Integer = 0 To list.Count - 1 + If CBool(InStr(list.Item(i).Domain, "funimation.com")) Then 'list.Item(i).Domain = "funimation.com" Then + 'MsgBox(list.Item(i).Name + vbNewLine + list.Item(i).Value) + Cookie = Cookie + list.Item(i).Name + "=" + list.Item(i).Value + ";" + End If + If CBool(InStr(list.Item(i).Domain, "funimation.com")) And CBool(InStr(list.Item(i).Name, "src_token")) Then 'list.Item(i).Domain = "funimation.com" Then + 'MsgBox(list.Item(i).Name + vbNewLine + list.Item(i).Value) + FunimationToken = "Token " + list.Item(i).Value + End If + If CBool(InStr(list.Item(i).Domain, "funimation.com")) And CBool(InStr(list.Item(i).Name, "region")) Then 'list.Item(i).Domain = "funimation.com" Then + 'MsgBox(list.Item(i).Name + vbNewLine + list.Item(i).Value) + FunimationDeviceRegion = "?deviceType=web&" + list.Item(i).Name + "=" + list.Item(i).Value + End If + Next + + Catch ex As Exception + + End Try ' region=US; LoadedUrls.Clear() Dim Evaluator = New Thread(Sub() Me.GetFunimationNewJS_Video(v1JsonURL, v1JsonData)) @@ -3493,9 +3525,9 @@ Public Class Main Case "episodeNumber" Dim FunimationEpisode3 As String = RemoveExtraSpaces(item.Value.ToString) If Episode_Prefix = "[default episode prefix]" Then - FunimationEpisode = "Episode " + FunimationEpisode3 + FunimationEpisode = "Episode " + AddLeadingZeros(FunimationEpisode3) Else - FunimationEpisode = Episode_Prefix + FunimationEpisode3 + FunimationEpisode = Episode_Prefix + AddLeadingZeros(FunimationEpisode3) End If Case "name" Dim NameData As List(Of JToken) = item.Values.ToList() @@ -5002,27 +5034,31 @@ Public Class Main End Sub Private Sub TestDownloadToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles TestDownloadToolStripMenuItem.Click - Dim Collector As New TaskCookieVisitor - Dim CM As ICookieManager = CefSharp_Browser.WebBrowser1.GetCookieManager - CM.VisitAllCookies(Collector) Dim Token As String = Nothing - Dim DeviceRegion As String = Nothing - Dim list As List(Of Global.CefSharp.Cookie) = Collector.Task.Result() - Dim Cookie As String = "" - For i As Integer = 0 To list.Count - 1 - If CBool(InStr(list.Item(i).Domain, "funimation.com")) Then 'list.Item(i).Domain = "funimation.com" Then - 'MsgBox(list.Item(i).Name + vbNewLine + list.Item(i).Value) - Cookie = Cookie + list.Item(i).Name + "=" + list.Item(i).Value + ";" - End If - If CBool(InStr(list.Item(i).Domain, "funimation.com")) And CBool(InStr(list.Item(i).Name, "src_token")) Then 'list.Item(i).Domain = "funimation.com" Then - 'MsgBox(list.Item(i).Name + vbNewLine + list.Item(i).Value) - Token = "Token " + list.Item(i).Value - End If - If CBool(InStr(list.Item(i).Domain, "funimation.com")) And CBool(InStr(list.Item(i).Name, "region")) Then 'list.Item(i).Domain = "funimation.com" Then - 'MsgBox(list.Item(i).Name + vbNewLine + list.Item(i).Value) - DeviceRegion = "?deviceType=web&" + list.Item(i).Name + "=" + list.Item(i).Value - End If - Next + Try + Dim Collector As New TaskCookieVisitor + Dim CM As ICookieManager = CefSharp_Browser.WebBrowser1.GetCookieManager + CM.VisitAllCookies(Collector) + Dim DeviceRegion As String = Nothing + Dim list As List(Of Global.CefSharp.Cookie) = Collector.Task.Result() + Dim Cookie As String = "" + For i As Integer = 0 To list.Count - 1 + If CBool(InStr(list.Item(i).Domain, "funimation.com")) Then 'list.Item(i).Domain = "funimation.com" Then + 'MsgBox(list.Item(i).Name + vbNewLine + list.Item(i).Value) + Cookie = Cookie + list.Item(i).Name + "=" + list.Item(i).Value + ";" + End If + If CBool(InStr(list.Item(i).Domain, "funimation.com")) And CBool(InStr(list.Item(i).Name, "src_token")) Then 'list.Item(i).Domain = "funimation.com" Then + 'MsgBox(list.Item(i).Name + vbNewLine + list.Item(i).Value) + Token = "Token " + list.Item(i).Value + End If + If CBool(InStr(list.Item(i).Domain, "funimation.com")) And CBool(InStr(list.Item(i).Name, "region")) Then 'list.Item(i).Domain = "funimation.com" Then + 'MsgBox(list.Item(i).Name + vbNewLine + list.Item(i).Value) + DeviceRegion = "?deviceType=web&" + list.Item(i).Name + "=" + list.Item(i).Value + End If + Next + Catch ex As Exception + + End Try ' region=US; If Token = Nothing Then MsgBox("No Token has been found...", MsgBoxStyle.Exclamation) diff --git a/Crunchyroll Downloader/My Project/AssemblyInfo.vb b/Crunchyroll Downloader/My Project/AssemblyInfo.vb index ed602a7..7852867 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/bin/x64/Debug/Crunchyroll Downloader.exe b/Crunchyroll Downloader/bin/x64/Debug/Crunchyroll Downloader.exe index 106b80c..221731e 100644 Binary files a/Crunchyroll Downloader/bin/x64/Debug/Crunchyroll Downloader.exe and b/Crunchyroll Downloader/bin/x64/Debug/Crunchyroll Downloader.exe differ diff --git a/Crunchyroll Downloader/bin/x64/Debug/Crunchyroll Downloader.pdb b/Crunchyroll Downloader/bin/x64/Debug/Crunchyroll Downloader.pdb index 9f6cbf8..d0416db 100644 Binary files a/Crunchyroll Downloader/bin/x64/Debug/Crunchyroll Downloader.pdb and b/Crunchyroll Downloader/bin/x64/Debug/Crunchyroll Downloader.pdb differ diff --git a/Crunchyroll Downloader/bin/x64/Debug/WebInterface/error_Page.html b/Crunchyroll Downloader/bin/x64/Debug/WebInterface/error_Page.html index e1190c7..f56ffe1 100644 --- a/Crunchyroll Downloader/bin/x64/Debug/WebInterface/error_Page.html +++ b/Crunchyroll Downloader/bin/x64/Debug/WebInterface/error_Page.html @@ -43,7 +43,7 @@

Failed!

System.IndexOutOfRangeException: Der Index war außerhalb des Arraybereichs. - bei Crunchyroll_Downloader.Main.ProcessRequest(NetworkStream stream, String htmlReq) in D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0\Crunchyroll Downloader\Main.vb:Zeile 4697.

+ bei Crunchyroll_Downloader.Main.ProcessRequest(NetworkStream stream, String htmlReq) in D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0 - CefSharp\Crunchyroll Downloader\Main.vb:Zeile 4577.

\ No newline at end of file diff --git a/Crunchyroll Downloader/einstellungen.Designer.vb b/Crunchyroll Downloader/einstellungen.Designer.vb index 8184038..07b27c2 100644 --- a/Crunchyroll Downloader/einstellungen.Designer.vb +++ b/Crunchyroll Downloader/einstellungen.Designer.vb @@ -136,6 +136,7 @@ Partial Class Einstellungen Me.Label5 = New MetroFramework.Controls.MetroLabel() Me.BackgroundWorker1 = New System.ComponentModel.BackgroundWorker() Me.Btn_Save = New System.Windows.Forms.Button() + Me.LeadingZeroDD = New MetroFramework.Controls.MetroComboBox() CType(Me.pictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() Me.GroupBox14.SuspendLayout() Me.SoftSubs.SuspendLayout() @@ -400,7 +401,7 @@ Partial Class Einstellungen Me.GB_Filename_Pre.Controls.Add(Me.MetroLink1) Me.GB_Filename_Pre.Font = New System.Drawing.Font("Arial", 9.75!) Me.GB_Filename_Pre.ForeColor = System.Drawing.Color.Black - Me.GB_Filename_Pre.Location = New System.Drawing.Point(5, 182) + Me.GB_Filename_Pre.Location = New System.Drawing.Point(5, 220) Me.GB_Filename_Pre.Name = "GB_Filename_Pre" Me.GB_Filename_Pre.Size = New System.Drawing.Size(490, 59) Me.GB_Filename_Pre.TabIndex = 20 @@ -433,6 +434,7 @@ Partial Class Einstellungen 'GroupBox12 ' Me.GroupBox12.BackColor = System.Drawing.Color.Transparent + Me.GroupBox12.Controls.Add(Me.LeadingZeroDD) Me.GroupBox12.Controls.Add(Me.IgnoreS1) Me.GroupBox12.Controls.Add(Me.DD_Episode_Prefix) Me.GroupBox12.Controls.Add(Me.DD_Season_Prefix) @@ -441,7 +443,7 @@ Partial Class Einstellungen Me.GroupBox12.ForeColor = System.Drawing.Color.Black Me.GroupBox12.Location = New System.Drawing.Point(5, 11) Me.GroupBox12.Name = "GroupBox12" - Me.GroupBox12.Size = New System.Drawing.Size(490, 165) + Me.GroupBox12.Size = New System.Drawing.Size(490, 203) Me.GroupBox12.TabIndex = 10 Me.GroupBox12.TabStop = False Me.GroupBox12.Text = "Filename" @@ -450,7 +452,7 @@ Partial Class Einstellungen ' Me.IgnoreS1.AutoSize = True Me.IgnoreS1.FontSize = MetroFramework.MetroCheckBoxSize.Medium - Me.IgnoreS1.Location = New System.Drawing.Point(133, 135) + Me.IgnoreS1.Location = New System.Drawing.Point(248, 155) Me.IgnoreS1.Name = "IgnoreS1" Me.IgnoreS1.Size = New System.Drawing.Size(227, 19) Me.IgnoreS1.TabIndex = 19 @@ -508,7 +510,7 @@ Partial Class Einstellungen Me.GroupBox4.Controls.Add(Me.CB_Format) Me.GroupBox4.Font = New System.Drawing.Font("Arial", 9.75!) Me.GroupBox4.ForeColor = System.Drawing.Color.Black - Me.GroupBox4.Location = New System.Drawing.Point(5, 300) + Me.GroupBox4.Location = New System.Drawing.Point(5, 340) Me.GroupBox4.Name = "GroupBox4" Me.GroupBox4.Size = New System.Drawing.Size(490, 78) Me.GroupBox4.TabIndex = 40 @@ -545,7 +547,7 @@ Partial Class Einstellungen Me.GroupBox2.Controls.Add(Me.Panel1) Me.GroupBox2.Font = New System.Drawing.Font("Arial", 9.75!) Me.GroupBox2.ForeColor = System.Drawing.Color.Black - Me.GroupBox2.Location = New System.Drawing.Point(5, 380) + Me.GroupBox2.Location = New System.Drawing.Point(5, 420) Me.GroupBox2.Name = "GroupBox2" Me.GroupBox2.Size = New System.Drawing.Size(490, 63) Me.GroupBox2.TabIndex = 50 @@ -751,7 +753,7 @@ Partial Class Einstellungen Me.GB_Resolution.Controls.Add(Me.A1080p) Me.GB_Resolution.Font = New System.Drawing.Font("Arial", 9.75!) Me.GB_Resolution.ForeColor = System.Drawing.Color.Black - Me.GB_Resolution.Location = New System.Drawing.Point(5, 240) + Me.GB_Resolution.Location = New System.Drawing.Point(5, 280) Me.GB_Resolution.Name = "GB_Resolution" Me.GB_Resolution.Size = New System.Drawing.Size(490, 59) Me.GB_Resolution.TabIndex = 30 @@ -1103,7 +1105,7 @@ Partial Class Einstellungen Me.TabControl1.FontWeight = MetroFramework.MetroTabControlWeight.Regular Me.TabControl1.Location = New System.Drawing.Point(22, 60) Me.TabControl1.Name = "TabControl1" - Me.TabControl1.SelectedIndex = 0 + Me.TabControl1.SelectedIndex = 1 Me.TabControl1.Size = New System.Drawing.Size(509, 567) Me.TabControl1.TabIndex = 0 Me.TabControl1.UseSelectable = True @@ -1117,9 +1119,9 @@ Partial Class Einstellungen Me.MetroTabPage1.HorizontalScrollbarBarColor = True Me.MetroTabPage1.HorizontalScrollbarHighlightOnWheel = False Me.MetroTabPage1.HorizontalScrollbarSize = 10 - Me.MetroTabPage1.Location = New System.Drawing.Point(4, 44) + Me.MetroTabPage1.Location = New System.Drawing.Point(4, 35) Me.MetroTabPage1.Name = "MetroTabPage1" - Me.MetroTabPage1.Size = New System.Drawing.Size(501, 519) + Me.MetroTabPage1.Size = New System.Drawing.Size(501, 528) Me.MetroTabPage1.TabIndex = 7 Me.MetroTabPage1.Text = "Crunchyroll" Me.MetroTabPage1.VerticalScrollbarBarColor = True @@ -1165,10 +1167,10 @@ Partial Class Einstellungen Me.TabPage6.HorizontalScrollbarBarColor = True Me.TabPage6.HorizontalScrollbarHighlightOnWheel = False Me.TabPage6.HorizontalScrollbarSize = 10 - Me.TabPage6.Location = New System.Drawing.Point(4, 44) + Me.TabPage6.Location = New System.Drawing.Point(4, 35) Me.TabPage6.Name = "TabPage6" Me.TabPage6.Padding = New System.Windows.Forms.Padding(3) - Me.TabPage6.Size = New System.Drawing.Size(501, 519) + Me.TabPage6.Size = New System.Drawing.Size(501, 528) Me.TabPage6.TabIndex = 4 Me.TabPage6.Text = "Funimation" Me.TabPage6.VerticalScrollbarBarColor = True @@ -1360,9 +1362,9 @@ Partial Class Einstellungen Me.TabPage7.Controls.Add(Me.Label4) Me.TabPage7.Controls.Add(Me.Label6) Me.TabPage7.Controls.Add(Me.Label5) - Me.TabPage7.Location = New System.Drawing.Point(4, 44) + Me.TabPage7.Location = New System.Drawing.Point(4, 35) Me.TabPage7.Name = "TabPage7" - Me.TabPage7.Size = New System.Drawing.Size(501, 519) + Me.TabPage7.Size = New System.Drawing.Size(501, 528) Me.TabPage7.TabIndex = 5 Me.TabPage7.Text = "About " ' @@ -1494,6 +1496,20 @@ Partial Class Einstellungen Me.Btn_Save.TabIndex = 9 Me.Btn_Save.UseVisualStyleBackColor = False ' + 'LeadingZeroDD + ' + Me.LeadingZeroDD.DropDownHeight = 250 + Me.LeadingZeroDD.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.LeadingZeroDD.FormattingEnabled = True + Me.LeadingZeroDD.IntegralHeight = False + Me.LeadingZeroDD.ItemHeight = 23 + Me.LeadingZeroDD.Items.AddRange(New Object() {"1", "01", "001", "0001"}) + Me.LeadingZeroDD.Location = New System.Drawing.Point(6, 151) + Me.LeadingZeroDD.Name = "LeadingZeroDD" + Me.LeadingZeroDD.Size = New System.Drawing.Size(225, 29) + Me.LeadingZeroDD.TabIndex = 20 + Me.LeadingZeroDD.UseSelectable = True + ' 'Einstellungen ' Me.ApplyImageInvert = True @@ -1671,4 +1687,5 @@ Partial Class Einstellungen Friend WithEvents ListBit_4500 As ToolStripMenuItem Friend WithEvents ListBit_3500 As ToolStripMenuItem Friend WithEvents ListBit_2500 As ToolStripMenuItem + Friend WithEvents LeadingZeroDD As MetroFramework.Controls.MetroComboBox End Class diff --git a/Crunchyroll Downloader/einstellungen.vb b/Crunchyroll Downloader/einstellungen.vb index d03db20..51c4b4b 100644 --- a/Crunchyroll Downloader/einstellungen.vb +++ b/Crunchyroll Downloader/einstellungen.vb @@ -18,7 +18,7 @@ Public Class Einstellungen Private Sub Einstellungen_Load(sender As Object, e As EventArgs) Handles MyBase.Load - Label6.Text = "You have: v" + Application.ProductVersion.ToString + " Chromium-U10" + Label6.Text = "You have: v" + Application.ProductVersion.ToString + " Chromium-U10.1" BackgroundWorker1.RunWorkerAsync() @@ -32,7 +32,7 @@ Public Class Einstellungen ProfileTextBox.Text = Main.ProfileFolder - + LeadingZeroDD.SelectedIndex = Main.LeadingZero If Main.IgnoreS1 = True Then IgnoreS1.Checked = True End If @@ -327,6 +327,9 @@ Public Class Einstellungen Private Sub Btn_Save_Click(sender As Object, e As EventArgs) Handles Btn_Save.Click Dim rk As RegistryKey = Registry.CurrentUser.CreateSubKey("Software\CRDownloader") + Main.LeadingZero = LeadingZeroDD.SelectedIndex + rk.SetValue("LeadingZero", LeadingZeroDD.SelectedIndex, RegistryValueKind.String) + If http_support.Text = "add-on support disabled" Then rk.SetValue("ServerPort", 0, RegistryValueKind.String) Main.StartServer = CInt(False) diff --git a/Crunchyroll Downloader/obj/x64/Debug/Crunchyroll Downloader.exe b/Crunchyroll Downloader/obj/x64/Debug/Crunchyroll Downloader.exe index 106b80c..221731e 100644 Binary files a/Crunchyroll Downloader/obj/x64/Debug/Crunchyroll Downloader.exe and b/Crunchyroll Downloader/obj/x64/Debug/Crunchyroll Downloader.exe differ diff --git a/Crunchyroll Downloader/obj/x64/Debug/Crunchyroll Downloader.pdb b/Crunchyroll Downloader/obj/x64/Debug/Crunchyroll Downloader.pdb index 9f6cbf8..d0416db 100644 Binary files a/Crunchyroll Downloader/obj/x64/Debug/Crunchyroll Downloader.pdb and b/Crunchyroll Downloader/obj/x64/Debug/Crunchyroll Downloader.pdb differ diff --git a/Crunchyroll Downloader/obj/x64/Debug/Crunchyroll Downloader.vbproj.GenerateResource.cache b/Crunchyroll Downloader/obj/x64/Debug/Crunchyroll Downloader.vbproj.GenerateResource.cache index 005ba96..6b65391 100644 Binary files a/Crunchyroll Downloader/obj/x64/Debug/Crunchyroll Downloader.vbproj.GenerateResource.cache and b/Crunchyroll Downloader/obj/x64/Debug/Crunchyroll Downloader.vbproj.GenerateResource.cache differ