fallback CR 403 added

fallback CR 403 added
This commit is contained in:
hama3254 2022-12-05 18:16:07 +01:00
parent ce0d9f7054
commit e76ad3b416
6 changed files with 271 additions and 227 deletions

Binary file not shown.

View File

@ -19,7 +19,10 @@ Public Class Browser
Private Sub WebView2_CoreWebView2InitializationCompleted(sender As Object, e As CoreWebView2InitializationCompletedEventArgs) Handles WebView2.CoreWebView2InitializationCompleted 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.crunchyroll.com/*", CoreWebView2WebResourceContext.All)
WebView2.CoreWebView2.AddWebResourceRequestedFilter("https://www.funimation.com/*", CoreWebView2WebResourceContext.All) WebView2.CoreWebView2.AddWebResourceRequestedFilter("https://www.funimation.com/*", CoreWebView2WebResourceContext.All)
WebView2.CoreWebView2.AddWebResourceRequestedFilter("https://www.crunchyroll.com/*", CoreWebView2WebResourceContext.All)
'WebView2.CoreWebView2.AddWebResourceRequestedFilter("*", CoreWebView2WebResourceContext.All) 'WebView2.CoreWebView2.AddWebResourceRequestedFilter("*", CoreWebView2WebResourceContext.All)
AddHandler WebView2.CoreWebView2.WebResourceResponseReceived, AddressOf ObserveResponse
AddHandler WebView2.CoreWebView2.WebResourceRequested, AddressOf ObserveHttp AddHandler WebView2.CoreWebView2.WebResourceRequested, AddressOf ObserveHttp
WebView2.CoreWebView2.Settings.UserAgent = My.Resources.ffmpeg_user_agend.Replace(Chr(34), "").Replace("User-Agent: ", "") WebView2.CoreWebView2.Settings.UserAgent = My.Resources.ffmpeg_user_agend.Replace(Chr(34), "").Replace("User-Agent: ", "")
@ -69,7 +72,7 @@ Public Class Browser
End Sub End Sub
Private Sub GeckoFX_Load(sender As Object, e As EventArgs) Handles Me.Load Private Sub Browser_Load(sender As Object, e As EventArgs) Handles Me.Load
Main.waveOutSetVolume(0, 0) Main.waveOutSetVolume(0, 0)
If Me.Width > My.Computer.Screen.Bounds.Width Then If Me.Width > My.Computer.Screen.Bounds.Width Then
Me.Width = My.Computer.Screen.Bounds.Width Me.Width = My.Computer.Screen.Bounds.Width
@ -141,6 +144,90 @@ Public Class Browser
End Sub End Sub
Private Async Sub ObserveResponse(ByVal sender As Object, ByVal e As CoreWebView2WebResourceResponseReceivedEventArgs)
If CBool(InStr(Main.LoadingUrl, "crunchyroll.com")) Then
If CBool(InStr(e.Request.Uri, "crunchyroll.com/")) And CBool(InStr(e.Request.Uri, "streams?")) Then
Debug.WriteLine("Crunchyroll-Single: " + e.Request.Uri)
Dim Content As Stream = Await e.Response.GetContentAsync
Dim ContentString As String = Nothing
Dim reader As New StreamReader(Content)
ContentString = reader.ReadToEnd
Main.LoadedUrls.Add(e.Request.Uri)
Main.CR_VideoJson = New UrlJson(e.Request.Uri, ContentString)
Exit Sub
ElseIf CBool(InStr(e.Request.Uri, "crunchyroll.com/")) And CBool(InStr(e.Request.Uri, "/objects/")) And CBool(InStr(Main.LoadingUrl, "/watch/")) Then
Debug.WriteLine(e.Request.Uri)
Main.LoadedUrls.Add(e.Request.Uri)
Dim Content As Stream = Await e.Response.GetContentAsync
Dim ContentString As String = Nothing
Dim reader As New StreamReader(Content)
ContentString = reader.ReadToEnd
Main.CR_ObjectsJson = New UrlJson(e.Request.Uri, ContentString)
Exit Sub
ElseIf CBool(InStr(e.Request.Uri, "crunchyroll.com/")) And CBool(InStr(e.Request.Uri, "seasons?series_id=")) And CBool(InStr(Main.LoadingUrl, "/series/")) Then
Debug.WriteLine("Crunchyroll-Season: " + e.Request.Uri)
Main.LoadedUrls.Add(e.Request.Uri)
Main.LoadedUrls.Add(e.Request.Uri)
Dim Content As Stream = Await e.Response.GetContentAsync
Dim ContentString As String = Nothing
Dim reader As New StreamReader(Content)
ContentString = reader.ReadToEnd
Main.CR_SeasonJson = New UrlJson(e.Request.Uri, ContentString)
Exit Sub
End If
ElseIf CBool(InStr(Main.LoadingUrl, "funimation.com")) Then
If CBool(InStr(e.Request.Uri, "?deviceType=web")) Then
'Debug.WriteLine(e.Request.Uri)
Dim parms As String() = e.Request.Uri.Split(New String() {"?deviceType="}, System.StringSplitOptions.RemoveEmptyEntries)
Main.FunimationDeviceRegion = "?deviceType=" + parms(1)
End If
If CBool(InStr(e.Request.Uri, "https://title-api.prd.funimationsvc.com")) Then
Debug.WriteLine("Funimtaion: " + e.Request.Uri)
If (Me.InvokeRequired) Then
Me.Invoke(Sub() Main.LoadedUrls.Add(e.Request.Uri))
Exit Sub
Else
Main.LoadedUrls.Add(e.Request.Uri)
Exit Sub
End If
ElseIf CBool(InStr(e.Request.Uri, "/data/v2/shows/")) Then
Debug.WriteLine("Funimtaion: " + e.Request.Uri)
If (Me.InvokeRequired) Then
Me.Invoke(Sub() Main.LoadedUrls.Add(e.Request.Uri))
Exit Sub
Else
Main.LoadedUrls.Add(e.Request.Uri)
Exit Sub
End If
ElseIf CBool(InStr(e.Request.Uri, "/data/v1/episodes/")) Then
Debug.WriteLine("Funimtaion: " + e.Request.Uri)
If (Me.InvokeRequired) Then
Me.Invoke(Sub() Main.LoadedUrls.Add(e.Request.Uri))
Exit Sub
Else
Main.LoadedUrls.Add(e.Request.Uri)
Exit Sub
End If
End If
End If
End Sub
@ -149,6 +236,7 @@ Public Class Browser
Private Sub ObserveHttp(ByVal sender As Object, ByVal e As CoreWebView2WebResourceRequestedEventArgs) 'Handles RequestResource.GetUrl Private Sub ObserveHttp(ByVal sender As Object, ByVal e As CoreWebView2WebResourceRequestedEventArgs) 'Handles RequestResource.GetUrl
If CBool(InStr(e.Request.Uri, "crunchyroll.com")) = True And Main.CrBetaBasic = Nothing Then If CBool(InStr(e.Request.Uri, "crunchyroll.com")) = True And Main.CrBetaBasic = Nothing Then
Dim Headers As New List(Of KeyValuePair(Of String, String)) Dim Headers As New List(Of KeyValuePair(Of String, String))
Headers.AddRange(e.Request.Headers.ToList) Headers.AddRange(e.Request.Headers.ToList)
@ -160,37 +248,32 @@ Public Class Browser
Next Next
End If End If
Exit Sub
If CBool(InStr(Main.LoadingUrl, "crunchyroll.com")) Then If CBool(InStr(Main.LoadingUrl, "crunchyroll.com")) Then
If CBool(InStr(e.Request.Uri, "crunchyroll.com/")) And CBool(InStr(e.Request.Uri, "streams?")) Then If CBool(InStr(e.Request.Uri, "crunchyroll.com/")) And CBool(InStr(e.Request.Uri, "streams?")) Then
Debug.WriteLine("Crunchyroll-Single: " + e.Request.Uri) Debug.WriteLine("Crunchyroll-Single: " + e.Request.Uri)
If (Me.InvokeRequired) Then 'Dim ContentString As String = Nothing
Me.Invoke(Sub() Main.LoadedUrls.Add(e.Request.Uri)) 'Dim Content As New MemoryStream
Exit Sub 'e.Response.Content.CopyTo(Content)
Else 'Content.Position = 0
'ContentString = Encoding.UTF8.GetString(Content.ToArray())
'MsgBox(ContentString)
Main.LoadedUrls.Add(e.Request.Uri) Main.LoadedUrls.Add(e.Request.Uri)
'Main.CR_VideoJson = New UrlJson(e.Request.Uri, e.Request.Content.ToString)
Exit Sub Exit Sub
End If
ElseIf CBool(InStr(e.Request.Uri, "crunchyroll.com/")) And CBool(InStr(e.Request.Uri, "/objects/")) And CBool(InStr(e.Request.Uri, "/watch/")) Then ElseIf CBool(InStr(e.Request.Uri, "crunchyroll.com/")) And CBool(InStr(e.Request.Uri, "/objects/")) And CBool(InStr(e.Request.Uri, "/watch/")) Then
If (Me.InvokeRequired) Then
Me.Invoke(Sub() Main.LoadedUrls.Add(e.Request.Uri))
Exit Sub
Else
Main.LoadedUrls.Add(e.Request.Uri)
Exit Sub
End If
Debug.WriteLine(e.Request.Uri) Debug.WriteLine(e.Request.Uri)
Main.LoadedUrls.Add(e.Request.Uri)
'Main.CR_ObjectsJson = New UrlJson(e.Request.Uri, e.Request.Content.ToString)
Exit Sub
ElseIf CBool(InStr(e.Request.Uri, "crunchyroll.com/")) And CBool(InStr(e.Request.Uri, "seasons?series_id=")) Then ElseIf CBool(InStr(e.Request.Uri, "crunchyroll.com/")) And CBool(InStr(e.Request.Uri, "seasons?series_id=")) Then
Debug.WriteLine("Crunchyroll-Season: " + e.Request.Uri) Debug.WriteLine("Crunchyroll-Season: " + e.Request.Uri)
If (Me.InvokeRequired) Then
Me.Invoke(Sub() Main.LoadedUrls.Add(e.Request.Uri))
Exit Sub
Else
Main.LoadedUrls.Add(e.Request.Uri) Main.LoadedUrls.Add(e.Request.Uri)
'Main.CR_SeasonJson = New UrlJson(e.Request.Uri, e.Request.Content.ToString)
Exit Sub Exit Sub
End If End If
End If

View File

@ -48,7 +48,7 @@ Partial Class Main
Me.ThreadCount = New System.Windows.Forms.ToolStripMenuItem() Me.ThreadCount = New System.Windows.Forms.ToolStripMenuItem()
Me.MsgBoxToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.MsgBoxToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.CRCookieToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.CRCookieToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ClearAllSettingsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.UrlJsonsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ItemBoundsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ItemBoundsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.DummyItemToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.DummyItemToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.Panel1 = New System.Windows.Forms.Panel() Me.Panel1 = New System.Windows.Forms.Panel()
@ -161,7 +161,7 @@ Partial Class Main
' '
'ContextMenuStrip1 'ContextMenuStrip1
' '
Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToggleDebugModeToolStripMenuItem, Me.OpenSettingsToolStripMenuItem, Me.Funimation_Token, Me.CheckCRBetaTokenToolStripMenuItem, Me.AddonHTMLToolStripMenuItem, Me.Timer3OffToolStripMenuItem, Me.ThreadCount, Me.MsgBoxToolStripMenuItem, Me.CRCookieToolStripMenuItem, Me.ClearAllSettingsToolStripMenuItem, Me.ItemBoundsToolStripMenuItem, Me.DummyItemToolStripMenuItem}) Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToggleDebugModeToolStripMenuItem, Me.OpenSettingsToolStripMenuItem, Me.Funimation_Token, Me.CheckCRBetaTokenToolStripMenuItem, Me.AddonHTMLToolStripMenuItem, Me.Timer3OffToolStripMenuItem, Me.ThreadCount, Me.MsgBoxToolStripMenuItem, Me.CRCookieToolStripMenuItem, Me.UrlJsonsToolStripMenuItem, Me.ItemBoundsToolStripMenuItem, Me.DummyItemToolStripMenuItem})
Me.ContextMenuStrip1.Name = "ContextMenuStrip1" Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
resources.ApplyResources(Me.ContextMenuStrip1, "ContextMenuStrip1") resources.ApplyResources(Me.ContextMenuStrip1, "ContextMenuStrip1")
' '
@ -210,10 +210,10 @@ Partial Class Main
Me.CRCookieToolStripMenuItem.Name = "CRCookieToolStripMenuItem" Me.CRCookieToolStripMenuItem.Name = "CRCookieToolStripMenuItem"
resources.ApplyResources(Me.CRCookieToolStripMenuItem, "CRCookieToolStripMenuItem") resources.ApplyResources(Me.CRCookieToolStripMenuItem, "CRCookieToolStripMenuItem")
' '
'ClearAllSettingsToolStripMenuItem 'UrlJsonsToolStripMenuItem
' '
Me.ClearAllSettingsToolStripMenuItem.Name = "ClearAllSettingsToolStripMenuItem" Me.UrlJsonsToolStripMenuItem.Name = "UrlJsonsToolStripMenuItem"
resources.ApplyResources(Me.ClearAllSettingsToolStripMenuItem, "ClearAllSettingsToolStripMenuItem") resources.ApplyResources(Me.UrlJsonsToolStripMenuItem, "UrlJsonsToolStripMenuItem")
' '
'ItemBoundsToolStripMenuItem 'ItemBoundsToolStripMenuItem
' '
@ -287,7 +287,7 @@ Partial Class Main
Friend WithEvents ThreadCount As ToolStripMenuItem Friend WithEvents ThreadCount As ToolStripMenuItem
Friend WithEvents MsgBoxToolStripMenuItem As ToolStripMenuItem Friend WithEvents MsgBoxToolStripMenuItem As ToolStripMenuItem
Friend WithEvents CRCookieToolStripMenuItem As ToolStripMenuItem Friend WithEvents CRCookieToolStripMenuItem As ToolStripMenuItem
Friend WithEvents ClearAllSettingsToolStripMenuItem As ToolStripMenuItem Friend WithEvents UrlJsonsToolStripMenuItem As ToolStripMenuItem
Friend WithEvents ItemBoundsToolStripMenuItem As ToolStripMenuItem Friend WithEvents ItemBoundsToolStripMenuItem As ToolStripMenuItem
Friend WithEvents DummyItemToolStripMenuItem As ToolStripMenuItem Friend WithEvents DummyItemToolStripMenuItem As ToolStripMenuItem
Public WithEvents Panel1 As Panel Public WithEvents Panel1 As Panel

View File

@ -231,6 +231,21 @@
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing"> <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>842, 630</value> <value>842, 630</value>
</data> </data>
<data name="Panel1.AutoScroll" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="Panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>1, 71</value>
</data>
<data name="Panel1.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>798, 403</value>
</data>
<data name="Panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>840, 546</value>
</data>
<data name="Panel1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;Panel1.Name" xml:space="preserve"> <data name="&gt;&gt;Panel1.Name" xml:space="preserve">
<value>Panel1</value> <value>Panel1</value>
</data> </data>
@ -243,6 +258,24 @@
<data name="&gt;&gt;Panel1.ZOrder" xml:space="preserve"> <data name="&gt;&gt;Panel1.ZOrder" xml:space="preserve">
<value>1</value> <value>1</value>
</data> </data>
<data name="Btn_Close.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
</data>
<data name="Btn_Close.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="Btn_Close.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="Btn_Close.Location" type="System.Drawing.Point, System.Drawing">
<value>800, 1</value>
</data>
<data name="Btn_Close.Size" type="System.Drawing.Size, System.Drawing">
<value>40, 40</value>
</data>
<data name="Btn_Close.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;Btn_Close.Name" xml:space="preserve"> <data name="&gt;&gt;Btn_Close.Name" xml:space="preserve">
<value>Btn_Close</value> <value>Btn_Close</value>
</data> </data>
@ -255,6 +288,24 @@
<data name="&gt;&gt;Btn_Close.ZOrder" xml:space="preserve"> <data name="&gt;&gt;Btn_Close.ZOrder" xml:space="preserve">
<value>2</value> <value>2</value>
</data> </data>
<data name="Btn_min.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
</data>
<data name="Btn_min.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="Btn_min.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="Btn_min.Location" type="System.Drawing.Point, System.Drawing">
<value>757, 1</value>
</data>
<data name="Btn_min.Size" type="System.Drawing.Size, System.Drawing">
<value>40, 40</value>
</data>
<data name="Btn_min.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;Btn_min.Name" xml:space="preserve"> <data name="&gt;&gt;Btn_min.Name" xml:space="preserve">
<value>Btn_min</value> <value>Btn_min</value>
</data> </data>
@ -267,6 +318,24 @@
<data name="&gt;&gt;Btn_min.ZOrder" xml:space="preserve"> <data name="&gt;&gt;Btn_min.ZOrder" xml:space="preserve">
<value>3</value> <value>3</value>
</data> </data>
<data name="Btn_Settings.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="Btn_Settings.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="Btn_Settings.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="Btn_Settings.Location" type="System.Drawing.Point, System.Drawing">
<value>641, 18</value>
</data>
<data name="Btn_Settings.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 35</value>
</data>
<data name="Btn_Settings.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;Btn_Settings.Name" xml:space="preserve"> <data name="&gt;&gt;Btn_Settings.Name" xml:space="preserve">
<value>Btn_Settings</value> <value>Btn_Settings</value>
</data> </data>
@ -279,6 +348,21 @@
<data name="&gt;&gt;Btn_Settings.ZOrder" xml:space="preserve"> <data name="&gt;&gt;Btn_Settings.ZOrder" xml:space="preserve">
<value>4</value> <value>4</value>
</data> </data>
<data name="Btn_Browser.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="Btn_Browser.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="Btn_Browser.Location" type="System.Drawing.Point, System.Drawing">
<value>124, 18</value>
</data>
<data name="Btn_Browser.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 35</value>
</data>
<data name="Btn_Browser.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;Btn_Browser.Name" xml:space="preserve"> <data name="&gt;&gt;Btn_Browser.Name" xml:space="preserve">
<value>Btn_Browser</value> <value>Btn_Browser</value>
</data> </data>
@ -291,6 +375,24 @@
<data name="&gt;&gt;Btn_Browser.ZOrder" xml:space="preserve"> <data name="&gt;&gt;Btn_Browser.ZOrder" xml:space="preserve">
<value>5</value> <value>5</value>
</data> </data>
<data name="Btn_add.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="Btn_add.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="Btn_add.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="Btn_add.Location" type="System.Drawing.Point, System.Drawing">
<value>11, 18</value>
</data>
<data name="Btn_add.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 35</value>
</data>
<data name="Btn_add.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;Btn_add.Name" xml:space="preserve"> <data name="&gt;&gt;Btn_add.Name" xml:space="preserve">
<value>Btn_add</value> <value>Btn_add</value>
</data> </data>
@ -405,10 +507,10 @@
<data name="&gt;&gt;CRCookieToolStripMenuItem.Type" xml:space="preserve"> <data name="&gt;&gt;CRCookieToolStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;ClearAllSettingsToolStripMenuItem.Name" xml:space="preserve"> <data name="&gt;&gt;UrlJsonsToolStripMenuItem.Name" xml:space="preserve">
<value>ClearAllSettingsToolStripMenuItem</value> <value>UrlJsonsToolStripMenuItem</value>
</data> </data>
<data name="&gt;&gt;ClearAllSettingsToolStripMenuItem.Type" xml:space="preserve"> <data name="&gt;&gt;UrlJsonsToolStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;ItemBoundsToolStripMenuItem.Name" xml:space="preserve"> <data name="&gt;&gt;ItemBoundsToolStripMenuItem.Name" xml:space="preserve">
@ -438,165 +540,9 @@
<metadata name="Timer4.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="Timer4.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>276, 52</value> <value>276, 52</value>
</metadata> </metadata>
<data name="Btn_add.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="Btn_add.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="Btn_add.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="Btn_add.Location" type="System.Drawing.Point, System.Drawing">
<value>11, 18</value>
</data>
<data name="Btn_add.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 35</value>
</data>
<data name="Btn_add.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;Btn_add.Name" xml:space="preserve">
<value>Btn_add</value>
</data>
<data name="&gt;&gt;Btn_add.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;Btn_add.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;Btn_add.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="Btn_Browser.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="Btn_Browser.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="Btn_Browser.Location" type="System.Drawing.Point, System.Drawing">
<value>124, 18</value>
</data>
<data name="Btn_Browser.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 35</value>
</data>
<data name="Btn_Browser.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;Btn_Browser.Name" xml:space="preserve">
<value>Btn_Browser</value>
</data>
<data name="&gt;&gt;Btn_Browser.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;Btn_Browser.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;Btn_Browser.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="Btn_Settings.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="Btn_Settings.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="Btn_Settings.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="Btn_Settings.Location" type="System.Drawing.Point, System.Drawing">
<value>641, 18</value>
</data>
<data name="Btn_Settings.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 35</value>
</data>
<data name="Btn_Settings.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;Btn_Settings.Name" xml:space="preserve">
<value>Btn_Settings</value>
</data>
<data name="&gt;&gt;Btn_Settings.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;Btn_Settings.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;Btn_Settings.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="Btn_min.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
</data>
<data name="Btn_min.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="Btn_min.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="Btn_min.Location" type="System.Drawing.Point, System.Drawing">
<value>757, 1</value>
</data>
<data name="Btn_min.Size" type="System.Drawing.Size, System.Drawing">
<value>40, 40</value>
</data>
<data name="Btn_min.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;Btn_min.Name" xml:space="preserve">
<value>Btn_min</value>
</data>
<data name="&gt;&gt;Btn_min.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;Btn_min.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;Btn_min.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="Btn_Close.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
</data>
<data name="Btn_Close.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="Btn_Close.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="Btn_Close.Location" type="System.Drawing.Point, System.Drawing">
<value>800, 1</value>
</data>
<data name="Btn_Close.Size" type="System.Drawing.Size, System.Drawing">
<value>40, 40</value>
</data>
<data name="Btn_Close.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;Btn_Close.Name" xml:space="preserve">
<value>Btn_Close</value>
</data>
<data name="&gt;&gt;Btn_Close.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;Btn_Close.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;Btn_Close.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<metadata name="ContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="ContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>352, 49</value> <value>352, 49</value>
</metadata> </metadata>
<data name="ContextMenuStrip1.Size" type="System.Drawing.Size, System.Drawing">
<value>234, 268</value>
</data>
<data name="&gt;&gt;ContextMenuStrip1.Name" xml:space="preserve">
<value>ContextMenuStrip1</value>
</data>
<data name="&gt;&gt;ContextMenuStrip1.Type" xml:space="preserve">
<value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="ToggleDebugModeToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="ToggleDebugModeToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>233, 22</value> <value>233, 22</value>
</data> </data>
@ -651,11 +597,11 @@
<data name="CRCookieToolStripMenuItem.Text" xml:space="preserve"> <data name="CRCookieToolStripMenuItem.Text" xml:space="preserve">
<value>CR_Cookie</value> <value>CR_Cookie</value>
</data> </data>
<data name="ClearAllSettingsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="UrlJsonsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>233, 22</value> <value>233, 22</value>
</data> </data>
<data name="ClearAllSettingsToolStripMenuItem.Text" xml:space="preserve"> <data name="UrlJsonsToolStripMenuItem.Text" xml:space="preserve">
<value>Clear all settings</value> <value>UrlJsons</value>
</data> </data>
<data name="ItemBoundsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="ItemBoundsToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>233, 22</value> <value>233, 22</value>
@ -669,32 +615,14 @@
<data name="DummyItemToolStripMenuItem.Text" xml:space="preserve"> <data name="DummyItemToolStripMenuItem.Text" xml:space="preserve">
<value>Dummy_Item</value> <value>Dummy_Item</value>
</data> </data>
<data name="Panel1.AutoScroll" type="System.Boolean, mscorlib"> <data name="ContextMenuStrip1.Size" type="System.Drawing.Size, System.Drawing">
<value>True</value> <value>234, 290</value>
</data> </data>
<data name="Panel1.Location" type="System.Drawing.Point, System.Drawing"> <data name="&gt;&gt;ContextMenuStrip1.Name" xml:space="preserve">
<value>1, 71</value> <value>ContextMenuStrip1</value>
</data> </data>
<data name="Panel1.MinimumSize" type="System.Drawing.Size, System.Drawing"> <data name="&gt;&gt;ContextMenuStrip1.Type" xml:space="preserve">
<value>798, 403</value> <value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="Panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>840, 546</value>
</data>
<data name="Panel1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;Panel1.Name" xml:space="preserve">
<value>Panel1</value>
</data>
<data name="&gt;&gt;Panel1.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;Panel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;Panel1.ZOrder" xml:space="preserve">
<value>1</value>
</data> </data>
<metadata name="ScanTimeout.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="ScanTimeout.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>167, 10</value> <value>167, 10</value>

View File

@ -25,7 +25,11 @@ Public Class Main
Public CheckCRLogin As Boolean = True Public CheckCRLogin As Boolean = True
'Public LoadedUrl As String = Nothing
Public CR_SeasonJson As UrlJson = New UrlJson("", "")
Public CR_ObjectsJson As UrlJson = New UrlJson("", "")
Public CR_VideoJson As UrlJson = New UrlJson("", "")
Public CrBetaMass As String = Nothing Public CrBetaMass As String = Nothing
Public CrBetaMassEpisodes As String = Nothing Public CrBetaMassEpisodes As String = Nothing
Public CrBetaMassParameters As String = Nothing Public CrBetaMassParameters As String = Nothing
@ -1147,7 +1151,7 @@ Public Class Main
End If End If
If CBool(InStr(SeasonJson, "curl:")) = True Then If CBool(InStr(SeasonJson, "curl:")) = True Then
MsgBox("Error - Getting SeasonJson data" + vbNewLine + SeasonJson) MsgBox("Error - Getting SeasonJson data" + vbNewLine + SeasonJson + vbNewLine + vbNewLine + JsonUrl)
Exit Sub Exit Sub
End If End If
SeasonJson = CleanJSON(SeasonJson) SeasonJson = CleanJSON(SeasonJson)
@ -1223,6 +1227,9 @@ Public Class Main
Dim ObjectsURL As String = ObjectsURLBuilder(0) + "objects/" + ObjectsURLBuilder4(0) + ObjectsURLBuilder2(1) Dim ObjectsURL As String = ObjectsURLBuilder(0) + "objects/" + ObjectsURLBuilder4(0) + ObjectsURLBuilder2(1)
Debug.WriteLine(ObjectsURL) Debug.WriteLine(ObjectsURL)
ObjectJson = Curl(ObjectsURL) ObjectJson = Curl(ObjectsURL)
'MsgBox(ObjectJson) 'MsgBox(ObjectJson)
@ -1231,7 +1238,12 @@ Public Class Main
ObjectJson = Curl(ObjectsURL) ObjectJson = Curl(ObjectsURL)
End If End If
If CBool(InStr(ObjectJson, "curl:")) = True Then If CBool(InStr(ObjectJson, "curl:")) = True And CBool(InStr(CR_ObjectsJson.Url, ObjectsURLBuilder4(0))) Then
Debug.WriteLine("curl error, using UrlJson " + vbNewLine + ObjectJson)
ObjectJson = CR_ObjectsJson.Content
CR_ObjectsJson = New UrlJson("", "")
ElseIf CBool(InStr(ObjectJson, "curl:")) Then
MsgBox("Error - Getting ObjectJson data" + vbNewLine + ObjectJson) MsgBox("Error - Getting ObjectJson data" + vbNewLine + ObjectJson)
Exit Sub Exit Sub
End If End If
@ -1533,7 +1545,16 @@ Public Class Main
VideoJson = Curl(Streams) VideoJson = Curl(Streams)
End If End If
If CBool(InStr(VideoJson, "curl:")) = True Then Dim StreamsUrlBuilder() As String = ObjectJson.Split(New String() {"videos/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim StreamsUrlBuilder2() As String = StreamsUrlBuilder(1).Split(New String() {"/streams"}, System.StringSplitOptions.RemoveEmptyEntries)
If CBool(InStr(VideoJson, "curl:")) = True And CBool(InStr(CR_VideoJson.Url, StreamsUrlBuilder2(0))) Then
Debug.WriteLine("curl error, using UrlJson " + vbNewLine + VideoJson)
VideoJson = CR_VideoJson.Content
CR_VideoJson = New UrlJson("", "")
ElseIf CBool(InStr(VideoJson, "curl:")) = True Then
VideoJson = Nothing VideoJson = Nothing
MsgBox("Error - Getting VideoJson data" + vbNewLine + VideoJson) MsgBox("Error - Getting VideoJson data" + vbNewLine + VideoJson)
Exit Sub Exit Sub
@ -4224,13 +4245,11 @@ Public Class Main
'MsgBox(CR_Cookies) 'MsgBox(CR_Cookies)
End Sub End Sub
Private Sub ClearAllSettingsToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ClearAllSettingsToolStripMenuItem.Click Private Sub ClearAllSettingsToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles UrlJsonsToolStripMenuItem.Click
MsgBox("Season" + vbNewLine + CR_SeasonJson.Content.Count.ToString)
If MessageBox.Show("This will clear all settings and close the programm!", "confirm?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then MsgBox("Object" + vbNewLine + CR_ObjectsJson.Content.Count.ToString)
Registry.CurrentUser.DeleteSubKey("Software\CRDownloader") MsgBox("Streams" + vbNewLine + CR_VideoJson.Content.Count.ToString)
Me.Close()
End If
End Sub End Sub
@ -4375,6 +4394,20 @@ Public Class CR_Beta_Stream
End Function End Function
End Class End Class
Public Class UrlJson
Public Url As String
Public Content As String
Public Sub New(ByVal Url As String, ByVal Content As String)
Me.Url = Url
Me.Content = Content
End Sub
Public Overrides Function ToString() As String
Return String.Format("{0}, {1}", Me.Url, Me.Content)
End Function
End Class
Public Class ServerResponse Public Class ServerResponse
Public Type As String Public Type As String

View File

@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("3.10")> <Assembly: AssemblyVersion("3.10.1")>
<Assembly: AssemblyFileVersion("3.10")> <Assembly: AssemblyFileVersion("3.10.1")>
<Assembly: NeutralResourcesLanguage("en")> <Assembly: NeutralResourcesLanguage("en")>