From a7b5c312fdbb5ee0c8f292d82820e12d01f57ce4 Mon Sep 17 00:00:00 2001 From: hama3254 <52826614+hama3254@users.noreply.github.com> Date: Fri, 15 Mar 2024 18:04:55 +0100 Subject: [PATCH] added url guessing added url guessin/merging (new api) #911 --- .vs/Crunchyroll Downloader/v17/.suo | Bin 215552 -> 215040 bytes Crunchyroll Downloader/Browser.vb | 3 +- Crunchyroll Downloader/GetData.vb | 4 +- Crunchyroll Downloader/Main.designer.vb | 20 +- Crunchyroll Downloader/Main.resx | 335 +++++++----------- Crunchyroll Downloader/Main.vb | 168 ++++----- .../My Project/AssemblyInfo.vb | 4 +- 7 files changed, 207 insertions(+), 327 deletions(-) diff --git a/.vs/Crunchyroll Downloader/v17/.suo b/.vs/Crunchyroll Downloader/v17/.suo index c3137fb0ff18e12da8a0a06ad0f7681f2981b590..e56981f987cd4162cf5871f26a80f43f65a7d3c8 100644 GIT binary patch delta 8302 zcmeHM3s{v^y8gfK-@pbDx2VWCTS7!c1lu4YaJ-=6B`>Mz7!@&~VBShZG&4)YE{>Wh zOId1#xX0O0E$xG$!yld}GgHJg%bvnA4Ma}avRI3i$0;B=6#GvFMCE1x&z_a}F%Hzei z^K0k{bX2@47V<(mCC>A;#Yv=TAEl!esRwWclv*ZFv?=P#k+%oTz}-L`FbJ3nsPR3K z_Xk=7eF4Q)8=xQ18}I-UfyF>~pfeD!h9;m848#DV07Wbe`EcMapcmi|CVz`u_02)v zRukJyofbcY;!q$Em;?j?{=iMZe*vw4RA4mF5x5iR0}KYNKpxOukp`kr?h1IL{2=lq zpjj6-l*a(w(ANREVgt$Vni?<>4HM8YL5%lqH)auP1A#EKEJ2Gu`!L$gix)XxA?Sh2y|{Kux?K`5l0U1=OU4D0-qCiTq(83up(d1eD>^ z|GVJF4X+5PG!~PTOv>o0-qP@@u2M_GD`&Wo;ni4Wc$NQv;S;pqp)(k0HoWqx8yQ}C zks_p$c)=9-qo!8_n@v9wlm8XdtGP-GCd_MT`f$`;-lyH?5C(++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KZG z(ci-{O#2k?QW>9(Ytt_>K^kr3Z}m@}j)iTv8;DyylK5Bo6LA=PQKEKoMNNq8XE;G3 zcH$-${2EtydEU|eTLfWPL-~Fe@1Y2N&zR3;a51*a-IwqUa`#(Yr1Bw_kQzzee2lg9 z!yK&m0(nG~KwJ;sc#FTJvYO>OWt+g-ufq(tfqH0ckjcK3ZqMLh$ACeiT__9}FK{=0P z!+KsBFt~!($icnH+rg(f#Mt#R2jRl;D|2nN+Ar(|#F+m-QU32FN}=q1t9I|J*+-Jp zk+i)gyT{B^**(xei=}R2htKwtE0r8V-t**$_k;msnl!$MWw1BN6h(Brc5R2Dr;*yY z+sn{mj=)PY);`WWwcY+amGN;n(rPyvTb+f5{~*ZjDlD9GrL;xU{`fF44gXv3h<~1? cV|}TQ_&05;0aIK2c(!$=zin(yF%32S9l@(2bpQYW diff --git a/Crunchyroll Downloader/Browser.vb b/Crunchyroll Downloader/Browser.vb index a1d49cc..c853a30 100644 --- a/Crunchyroll Downloader/Browser.vb +++ b/Crunchyroll Downloader/Browser.vb @@ -21,8 +21,9 @@ Public Class Browser Try WebView2.CoreWebView2.AddWebResourceRequestedFilter("https://www.crunchyroll.com/*", CoreWebView2WebResourceContext.All) WebView2.CoreWebView2.AddWebResourceRequestedFilter("https://www.funimation.com/*", CoreWebView2WebResourceContext.All) + 'WebView2.CoreWebView2.AddWebResourceRequestedFilter("https://cr-play-service.prd.crunchyrollsvc.com/*", CoreWebView2WebResourceContext.All) ' WebView2.CoreWebView2.AddWebResourceRequestedFilter("*", CoreWebView2WebResourceContext.All) - + 'cr-play-service.prd.crunchyrollsvc.com 'WebView2.CoreWebView2.AddWebResourceRequestedFilter("*", CoreWebView2WebResourceContext.All) AddHandler WebView2.CoreWebView2.WebResourceResponseReceived, AddressOf ObserveResponse AddHandler WebView2.CoreWebView2.WebResourceRequested, AddressOf ObserveHttp diff --git a/Crunchyroll Downloader/GetData.vb b/Crunchyroll Downloader/GetData.vb index d134ec4..5ffd717 100644 --- a/Crunchyroll Downloader/GetData.vb +++ b/Crunchyroll Downloader/GetData.vb @@ -53,11 +53,11 @@ Module GetData If CBool(InStr(CurlError, "curl:")) Then - Debug.WriteLine(CurlError) + Debug.WriteLine("CurlError: " + CurlError) Throw New System.Exception("Error - Getting" + vbNewLine + CurlError) Return Nothing ElseIf CBool(InStr(CurlOutput, "curl:")) Then - Debug.WriteLine(CurlOutput) + Debug.WriteLine("CurlOutput: " + CurlOutput) Throw New System.Exception("Error - Getting" + vbNewLine + CurlError) Return Nothing Else diff --git a/Crunchyroll Downloader/Main.designer.vb b/Crunchyroll Downloader/Main.designer.vb index ae7a283..45f241e 100644 --- a/Crunchyroll Downloader/Main.designer.vb +++ b/Crunchyroll Downloader/Main.designer.vb @@ -50,10 +50,9 @@ Partial Class Main Me.CRCookieToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.UrlJsonsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.DummyItemToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.Panel1 = New System.Windows.Forms.Panel() - Me.ScanTimeout = New System.Windows.Forms.Timer(Me.components) - Me.Btn_Queue = New System.Windows.Forms.Button() Me.AudioOnlyQualityToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.Panel1 = New System.Windows.Forms.Panel() + Me.Btn_Queue = New System.Windows.Forms.Button() CType(Me.PictureBox5, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.ConsoleBar, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.MetroStyleManager1, System.ComponentModel.ISupportInitialize).BeginInit() @@ -221,15 +220,16 @@ Partial Class Main Me.DummyItemToolStripMenuItem.Name = "DummyItemToolStripMenuItem" resources.ApplyResources(Me.DummyItemToolStripMenuItem, "DummyItemToolStripMenuItem") ' + 'AudioOnlyQualityToolStripMenuItem + ' + Me.AudioOnlyQualityToolStripMenuItem.Name = "AudioOnlyQualityToolStripMenuItem" + resources.ApplyResources(Me.AudioOnlyQualityToolStripMenuItem, "AudioOnlyQualityToolStripMenuItem") + ' 'Panel1 ' resources.ApplyResources(Me.Panel1, "Panel1") Me.Panel1.Name = "Panel1" ' - 'ScanTimeout - ' - Me.ScanTimeout.Interval = 1000 - ' 'Btn_Queue ' Me.Btn_Queue.BackColor = System.Drawing.Color.Transparent @@ -241,11 +241,6 @@ Partial Class Main Me.Btn_Queue.Name = "Btn_Queue" Me.Btn_Queue.UseVisualStyleBackColor = False ' - 'AudioOnlyQualityToolStripMenuItem - ' - Me.AudioOnlyQualityToolStripMenuItem.Name = "AudioOnlyQualityToolStripMenuItem" - resources.ApplyResources(Me.AudioOnlyQualityToolStripMenuItem, "AudioOnlyQualityToolStripMenuItem") - ' 'Main ' Me.ApplyImageInvert = True @@ -300,7 +295,6 @@ Partial Class Main Friend WithEvents UrlJsonsToolStripMenuItem As ToolStripMenuItem Friend WithEvents DummyItemToolStripMenuItem As ToolStripMenuItem Public WithEvents Panel1 As Panel - Friend WithEvents ScanTimeout As Timer Friend WithEvents QueueToolStripMenuItem As ToolStripMenuItem Friend WithEvents Btn_Queue As Button Friend WithEvents SaveThumbnailAsImageToolStripMenuItem As ToolStripMenuItem diff --git a/Crunchyroll Downloader/Main.resx b/Crunchyroll Downloader/Main.resx index 660e4a9..2d65959 100644 --- a/Crunchyroll Downloader/Main.resx +++ b/Crunchyroll Downloader/Main.resx @@ -231,6 +231,24 @@ 900, 630 + + Zoom + + + Flat + + + NoControl + + + 575, 18 + + + 80, 35 + + + 70 + Btn_Queue @@ -243,6 +261,21 @@ 1 + + True + + + 1, 71 + + + 898, 403 + + + 898, 546 + + + 0 + Panel1 @@ -255,6 +288,24 @@ 2 + + None + + + Flat + + + NoControl + + + 800, 1 + + + 35, 35 + + + 5 + Btn_Close @@ -267,6 +318,24 @@ 3 + + None + + + Flat + + + NoControl + + + 757, 1 + + + 30, 30 + + + 4 + Btn_min @@ -279,6 +348,24 @@ 4 + + Zoom + + + Flat + + + NoControl + + + 665, 18 + + + 80, 35 + + + 3 + Btn_Settings @@ -291,6 +378,21 @@ 5 + + Zoom + + + Flat + + + 140, 18 + + + 80, 35 + + + 2 + Btn_Browser @@ -303,6 +405,24 @@ 6 + + Zoom + + + Flat + + + NoControl + + + 20, 18 + + + 80, 35 + + + 1 + Btn_add @@ -429,12 +549,6 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ScanTimeout - - - System.Windows.Forms.Timer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - AudioOnlyQualityToolStripMenuItem @@ -450,153 +564,6 @@ 276, 52 - - Zoom - - - Flat - - - NoControl - - - 20, 18 - - - 80, 35 - - - 1 - - - Btn_add - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 7 - - - Zoom - - - Flat - - - 140, 18 - - - 80, 35 - - - 2 - - - Btn_Browser - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 6 - - - Zoom - - - Flat - - - NoControl - - - 665, 18 - - - 80, 35 - - - 3 - - - Btn_Settings - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 5 - - - None - - - Flat - - - NoControl - - - 757, 1 - - - 30, 30 - - - 4 - - - Btn_min - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 4 - - - None - - - Flat - - - NoControl - - - 800, 1 - - - 35, 35 - - - 5 - - - Btn_Close - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 3 - 352, 49 @@ -673,7 +640,7 @@ audio only Quality - 234, 290 + 234, 268 ContextMenuStrip1 @@ -681,64 +648,4 @@ System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True - - - 1, 71 - - - 898, 403 - - - 898, 546 - - - 0 - - - Panel1 - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 2 - - - 167, 10 - - - Zoom - - - Flat - - - NoControl - - - 575, 18 - - - 80, 35 - - - 70 - - - Btn_Queue - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 1 - \ No newline at end of file diff --git a/Crunchyroll Downloader/Main.vb b/Crunchyroll Downloader/Main.vb index 55fd7fc..baf3224 100644 --- a/Crunchyroll Downloader/Main.vb +++ b/Crunchyroll Downloader/Main.vb @@ -49,7 +49,6 @@ Public Class Main Public CrBetaBasic As String = Nothing Public locale As String = Nothing Public Url_locale As String = Nothing - Dim ProcessCounting As Integer = 30 'Public CrBetaObjects As String = Nothing 'Public CrBetaStreams As String = Nothing 'Public CrBetaStreamsUrl As String = Nothing @@ -100,8 +99,9 @@ Public Class Main 'Public NonCR_URL As String = Nothing Public DlSoftSubsRDY As Boolean = True Public DialogTaskString As String - 'Public ErrorBrowserString As String - 'Public ErrorBrowserUrl As String + Dim NewAPIString1 As String + Dim NewAPIString2 As String + Dim TTL As Integer = 0 'Public ErrorBrowserBackString As String Public RunningQueue As Boolean = False Public UserCloseDialog As Boolean = False @@ -1195,8 +1195,10 @@ Public Class Main 'Debug.WriteLine("1457: " + i.ToString + "/" + CR_Streams.Count.ToString + " " + CR_Streams.Item(i).subLang + " " + CR_Streams.Item(i).Format) If CR_Streams.Item(i).subLang = CR_HardSubLang Then CR_URI_Master.Add(CR_Streams.Item(i).Url) + 'Debug.WriteLine("CR_HardSubLang-" + CR_HardSubLang + "--" + CR_Streams.Item(i).Url) ElseIf CR_Streams.Item(i).subLang = "" And CR_HardSubLang = "null" Then CR_URI_Master.Add(CR_Streams.Item(i).Url) + 'Debug.WriteLine("CR_HardSubLang-null" + CR_HardSubLang + "--" + CR_Streams.Item(i).Url) ElseIf CR_Streams.Item(i).subLang = "" And CR_audio_locale IsNot "ja-JP" And DubMode = True Then 'nothing/raw RawStream.Add(CR_Streams.Item(i).Url) End If @@ -1326,6 +1328,7 @@ Public Class Main For i As Integer = 0 To CR_URI_Master.Count - 1 + 'MsgBox(CR_URI_Master(i)) Dim Count As String = (i + 1).ToString Try str = Curl(CR_URI_Master(i)) @@ -1925,7 +1928,7 @@ Public Class Main For Each Entry As JProperty In item.Values Dim JsonEntryFormat As String = Entry.Name - If CBool(InStr(Entry.Name, "drm")) Or CBool(InStr(Entry.Name, "dash")) Or CBool(InStr(Entry.Name, "download")) Then + If CBool(InStr(Entry.Name, "drm")) Or CBool(InStr(Entry.Name, "dash")) Or CBool(InStr(Entry.Name, "urls")) Then Continue For End If @@ -1971,9 +1974,13 @@ Public Class Main End Select Next + If download_hls IsNot Nothing Then + CR_Streams.Add(download_hls) + End If Dim CR_URI_Master As New List(Of String) + ' Dim CR_URI_Master2 As New List(Of CR_Beta_Stream) Dim RawStream As New List(Of String) @@ -1981,17 +1988,17 @@ Public Class Main For c As Integer = 0 To CR_Streams.Count - 1 Dim i As Integer = c - 'Debug.WriteLine("1457: " + i.ToString + "/" + CR_Streams.Count.ToString + " " + CR_Streams.Item(i).subLang + " " + CR_Streams.Item(i).Format) - 'https://www.crunchyroll.com/watch/GN7UD2K8N/dragon-ball-super-super-hero - Debug.WriteLine("Streams-1254: " + CR_Streams.Item(i).subLang) + + Debug.WriteLine(c.ToString + " Streams-1988: " + CR_Streams.Item(i).subLang + " " + CR_Streams.Item(i).Format + " " + CR_Streams.Item(i).Url) + If CR_Streams.Item(i).subLang = CR_HardSubLang Then CR_URI_Master.Add(CR_Streams.Item(i).Url) - 'MsgBox(CR_Streams.Item(i).Format + CR_Streams.Item(i).Url) ElseIf CR_Streams.Item(i).subLang = "" And CR_audio_locale IsNot "ja-JP" And DubMode = True Then 'nothing/raw ohne subs RawStream.Add(CR_Streams.Item(i).Url) ElseIf CR_Streams.Item(i).subLang = "null" And CR_audio_locale IsNot "ja-JP" And DubMode = True Then 'nothing/raw mit 'null' tagged RawStream.Add(CR_Streams.Item(i).Url) End If + Next 'MsgBox(CR_URI_Master.Count.ToString) If CR_URI_Master.Count = 0 And RawStream.Count > 0 Then @@ -2364,28 +2371,67 @@ Public Class Main Dim str As String = Nothing + Dim NewMaster2 As String = Nothing + + If NewAPIString1 = Nothing And NewAPIString2 = Nothing Or TTL < 1 Then - For i As Integer = 0 To CR_URI_Master.Count - 1 - Dim Count As String = (i + 1).ToString - Try - str = Curl(CR_URI_Master(i)) - If CBool(InStr(str, "curl:")) = False Then - Exit For - End If - Catch ex As Exception + Dim NewAPI_0 As String() = WebsiteURL.Split(New String() {"watch/"}, System.StringSplitOptions.RemoveEmptyEntries) + Dim NewAPI_1 As String() = NewAPI_0(1).Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries) - Me.Invoke(New Action(Function() As Object - Anime_Add.StatusLabel.Text = "failed accessing master.m3u8 " + Count + "/" + CR_URI_Master.Count.ToString - Me.Text = "failed accessing master.m3u8 " + Count + "/" + CR_URI_Master.Count.ToString - Me.Invalidate() - Return Nothing - End Function)) - Debug.WriteLine("Error accessing master #" + i.ToString + " -- " + CR_URI_Master(i)) - Pause(5) - End Try - Next + Dim NewAPI As String = "https://cr-play-service.prd.crunchyrollsvc.com/v1/" + NewAPI_1(0) + "/web/edge/play" + + Dim NewAPIData As String = CurlAuthNew(NewAPI, Loc_CR_Cookies, Loc_AuthToken) + + 'MsgBox(NewAPIData) + + Dim bif_1 As String() = NewAPIData.Split(New String() {".bif?"}, System.StringSplitOptions.RemoveEmptyEntries) 'get the policy and beyond + Dim bif_2 As String() = bif_1(1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) 'but we don't need beyond | Index 0 is enough + ' + Dim bif_0 As String() = bif_1(0).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) 'again we don't need beyond the url + Dim bif_3 As String() = bif_0(bif_0.Count - 1).Split(New String() {"assets/"}, System.StringSplitOptions.RemoveEmptyEntries) 'we even don't need the asset itself + + Dim NewMaster0 As String() = CR_URI_Master(0).Split(New String() {"assets/"}, System.StringSplitOptions.RemoveEmptyEntries) + + Dim NewMaster1 As String() = NewMaster0(1).Split(New String() {"?Policy"}, System.StringSplitOptions.RemoveEmptyEntries) + + NewMaster2 = bif_3(0) + "assets/" + NewMaster1(0) + "?" + bif_2(0) + NewAPIString1 = bif_3(0) + NewAPIString2 = bif_2(0) + TTL = 5 + Else + + Dim NewMaster0 As String() = CR_URI_Master(0).Split(New String() {"assets/"}, System.StringSplitOptions.RemoveEmptyEntries) + Dim NewMaster1 As String() = NewMaster0(1).Split(New String() {"?Policy"}, System.StringSplitOptions.RemoveEmptyEntries) + NewMaster2 = NewAPIString1 + "assets/" + NewMaster1(0) + "?" + NewAPIString2 + TTL = TTL - 1 + End If + + + 'MsgBox(NewMaster2) + + str = Curl(NewMaster2) + + 'For i As Integer = 0 To CR_URI_Master.Count - 1 + ' Dim Count As String = (i + 1).ToString + ' Try + ' str = Curl(CR_URI_Master(i)) + ' If CBool(InStr(str, "curl:")) = False Then + ' Exit For + ' End If + ' Catch ex As Exception + + ' Me.Invoke(New Action(Function() As Object + ' Anime_Add.StatusLabel.Text = "failed accessing master.m3u8 " + Count + "/" + CR_URI_Master.Count.ToString + ' Me.Text = "failed accessing master.m3u8 " + Count + "/" + CR_URI_Master.Count.ToString + ' Me.Invalidate() + ' Return Nothing + ' End Function)) + ' Debug.WriteLine("Error accessing master #" + i.ToString + " -- " + CR_URI_Master(i)) + ' Pause(5) + ' End Try + 'Next @@ -4161,7 +4207,7 @@ Public Class Main If CBool(InStr(Address, "crunchyroll.com")) Or CBool(InStr(Address, "funimation.com")) Then WebbrowserURL = Address - ScanTimeout.Start() + ' ScanTimeout.Start() 'ElseIf CBool(InStr(Address, "funimation.com")) Then @@ -4209,75 +4255,7 @@ Public Class Main #End Region - Private Sub Process(sender As Object, e As EventArgs) Handles ScanTimeout.Tick - 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....") - ProcessCounting = 30 - ScanTimeout.Enabled = False - Exit Sub - End If - If LoadedUrls.Count = 0 And ProcessCounting > 0 Then - - If Application.OpenForms().OfType(Of Anime_Add).Any = True Then - Anime_Add.StatusLabel.Text = "Status: Processing Url " + ProcessCounting.ToString - End If - Me.Text = "Status: Processing Url " + ProcessCounting.ToString - - ProcessCounting = ProcessCounting - 1 - Exit Sub - ElseIf LoadedUrls.Count = 1 And ProcessCounting > 0 Then - - If CBool(InStr(LoadedUrls.Item(0).Uri, "/objects/")) Then - If Application.OpenForms().OfType(Of Anime_Add).Any = True Then - Anime_Add.StatusLabel.Text = "Status: Processing Url " + ProcessCounting.ToString - End If - Me.Text = "Status: Processing Url " + ProcessCounting.ToString - - ProcessCounting = ProcessCounting - 1 - Exit Sub - End If - - ElseIf LoadedUrls.Count = 0 And ProcessCounting = 0 Then - If Application.OpenForms().OfType(Of Anime_Add).Any = True Then - Anime_Add.StatusLabel.Text = "Status: nothing found" - End If - Me.Text = "Status: nothing found" - 'ProcessUrls() - b = True - Debug.WriteLine("3508: nothing found") - Grapp_RDY = True - ProcessCounting = 30 - ScanTimeout.Enabled = False - Exit Sub - End If - - - Debug.WriteLine("LoadedUrls: " + LoadedUrls.Count.ToString) - 'For i As Integer = 0 To LoadedUrls.Count - 1 - ' Debug.WriteLine("LoadedUrls: " + 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... " - Debug.WriteLine("ProcessUrls") - ProcessCounting = 30 - ScanTimeout.Enabled = False - ProcessUrls() - - Exit Sub - - - - End Sub Public Sub ProcessUrls() Debug.WriteLine(LoadedUrls.Count.ToString) Debug.WriteLine(Date.Now.ToString + " Thread Name: " + Thread.CurrentThread.Name) diff --git a/Crunchyroll Downloader/My Project/AssemblyInfo.vb b/Crunchyroll Downloader/My Project/AssemblyInfo.vb index 6fdacce..9bff870 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: ' - - + +