Compare commits

...

16 Commits

Author SHA1 Message Date
hama3254
1bf1e7d89e fix user agent, auto update finished
fix user agent #970
auto update finished #969
2024-05-29 22:57:59 +02:00
hama3254
1b8098057a auto updater
auto updater (test version)
2024-05-28 23:06:31 +02:00
hama3254
2c7d26fe51 removed WebView2
removed WebView2 and the browser window
2024-05-28 21:26:20 +02:00
hama3254
28d971b359 added error dialog
added error dialog #961
2024-05-26 14:34:45 +02:00
hama3254
e4345a9aab fix dub override
fix dub override #965
2024-05-26 13:29:11 +02:00
hama3254
476ee62251
Merge pull request #962 from stratuma/master
Changed every content url and login url to new endpoint
2024-05-25 11:45:03 +02:00
stratuma
c39c79dbef forgot one endpoint change 2024-05-25 04:19:51 +02:00
stratuma
397c06215a changed every content url and login url to endpoint 'https://beta-api.crunchyroll.com/' 2024-05-25 04:18:04 +02:00
hama3254
ca18ed8dbb hotfix curl output
hotfix curl output
2024-05-23 18:32:31 +02:00
hama3254
ad4d8690cc added token deletion
added token deletion #959
changed error messages
2024-05-23 18:20:36 +02:00
hama3254
5c5925ba35 hotfix switch User-Agent
hotfix switch User-Agent #959
added 'MetroFramework.dll' and 'MyProvider.dll'
2024-05-22 18:43:13 +02:00
hama3254
c9e85c5f30 added hidden queue
added hidden queue #948
2024-05-11 18:47:10 +02:00
hama3254
536c0b3dfd fix ffmpeg command
fix ffmpeg command for merged audio (whitelist) #950
2024-05-07 21:24:41 +02:00
hama3254
b94628dfc3 fix error handling hardsub
fix error handling hardsub #945
2024-05-04 13:24:54 +02:00
hama3254
afd5f06a17 minor fixes
fix hybrid mode 'keep cache' (keyfile false positive) #946
removed Browser dependency (browser no longer open in the background)
2024-05-02 17:43:12 +02:00
hama3254
3d0467ed8a fix locale url parameter
fix locale url parameter #944
2024-04-30 22:44:38 +02:00
32 changed files with 979 additions and 942 deletions

Binary file not shown.

View File

@ -364,8 +364,8 @@ Partial Class Anime_Add
Me.Controls.Add(Me.btn_dl)
Me.Controls.Add(Me.Btn_min)
Me.Controls.Add(Me.Btn_Close)
Me.Controls.Add(Me.groupBox1)
Me.Controls.Add(Me.groupBox2)
Me.Controls.Add(Me.groupBox1)
Me.Font = New System.Drawing.Font("Arial", 24.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Name = "Anime_Add"
Me.Padding = New System.Windows.Forms.Padding(10, 60, 20, 20)

View File

@ -44,6 +44,10 @@ Public Class Anime_Add
Private Sub Anime_Add_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If My.Settings.HiddenQueue = True Then
Queue.Show()
End If
If Main.Mail = Nothing And My.Settings.Mail = "na" Then
'Dim Login As Form = LoginForm
'Login.StartPosition = 0
@ -164,6 +168,8 @@ Public Class Anime_Add
End Try
'Timer3.Enabled = True
btn_dl.Cursor = Cursors.Default
btn_dl.BackgroundImage = My.Resources.main_button_download_default
End Sub
@ -222,12 +228,19 @@ Public Class Anime_Add
' ' pictureBox4.Enabled = True
'Else
If Main.RunningQueue = True Then
If CBool(InStr(textBox1.Text, "series/")) Then
If CBool(InStr(textBox1.Text, "series/")) And My.Settings.HiddenQueue = False Then
Debug.WriteLine("Queue_Block_series")
'textBox1.Text = "URL"
StatusLabel.Text = "Status: Series add blocked, queue is running!"
Pause(5)
StatusLabel.Text = "Status: Idle"
ElseIf CBool(InStr(textBox1.Text, "series/")) And My.Settings.HiddenQueue = True Then
Debug.WriteLine("Queue_adding_series")
'textBox1.Text = "URL"
StatusLabel.Text = "Status: Series added to queue."
'Pause(5)
'StatusLabel.Text = "Status: Idle"
Main.LoadBrowser(textBox1.Text)
Else
Debug.WriteLine("Queue_Block")
Main.ListBoxList.Add(textBox1.Text)
@ -455,20 +468,23 @@ Public Class Anime_Add
' Dim JsonUrl As String = "https://www.crunchyroll.com/content/v2/cms/seasons/" + Main.CR_MassSeasons.Item(CB_Season.SelectedIndex).guid + "/episodes?preferred_audio_language=" + Main.DubSprache.CR_Value + "&locale=" + Main.locale
Dim JsonUrl As String = "https://www.crunchyroll.com/content/v2/cms/seasons/" + guid + "/episodes?preferred_audio_language=" + Main.DubSprache.CR_Value + "&locale=" + Main.locale
' Changed from https://www.crunchyroll.com/content/v2/cms/seasons/ to https://beta-api.crunchyroll.com/content/v2/cms/seasons/ to avoid cloudflare triggering
Dim JsonUrl As String = "https://beta-api.crunchyroll.com/content/v2/cms/seasons/" + guid + "/episodes?preferred_audio_language=" + Main.DubSprache.CR_Value + "&locale=" + Main.locale
Dim Loc_CR_Cookies = " -H " + Chr(34) + Main.CR_Cookies.Replace(Chr(34), "").Replace(" -H ", "") + Chr(34)
Dim Loc_CR_Cookies = "" 'No more cookies " -H " + Chr(34) + Main.CR_Cookies.Replace(Chr(34), "").Replace(" -H ", "") + Chr(34)
Dim EpisodeJson As String = Nothing 'CurlAuth(JsonUrl, Loc_CR_Cookies, Main.CR_MassSeasons.Item(ComboBox1.SelectedIndex).Auth) '
Debug.WriteLine("TEST")
Try
EpisodeJson = CurlAuthNew(JsonUrl, Loc_CR_Cookies, Main.CR_MassSeasons.Item(CB_Season.SelectedIndex).Auth) '
Catch ex As Exception
Debug.WriteLine("TEST Failed" + ex.ToString)
If CBool(InStr(ex.ToString, "Error - Getting")) Then
MsgBox("Error invalid CR respone")
Exit Sub

View File

@ -39,9 +39,6 @@
<setting name="TempFolder" serializeAs="String">
<value />
</setting>
<setting name="Startseite" serializeAs="String">
<value>https://www.crunchyroll.com/</value>
</setting>
<setting name="Prefix_S" serializeAs="String">
<value>[default season prefix]</value>
</setting>
@ -159,6 +156,15 @@
<setting name="PW" serializeAs="String">
<value>na</value>
</setting>
<setting name="HiddenQueue" serializeAs="String">
<value>False</value>
</setting>
<setting name="UpdateLog" serializeAs="String">
<value>0</value>
</setting>
<setting name="UpdateMode" serializeAs="String">
<value>0</value>
</setting>
</Crunchyroll_Downloader.My.MySettings>
</userSettings>
</configuration>

View File

@ -1,112 +0,0 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class Browser
Inherits System.Windows.Forms.Form
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()>
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.Button1 = New System.Windows.Forms.Button()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.WebView2 = New Microsoft.Web.WebView2.WinForms.WebView2()
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
Me.Timer2 = New System.Windows.Forms.Timer(Me.components)
Me.Panel1.SuspendLayout()
CType(Me.WebView2, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'TextBox1
'
Me.TextBox1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.TextBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.TextBox1.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.TextBox1.Location = New System.Drawing.Point(114, 1)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(1153, 26)
Me.TextBox1.TabIndex = 1
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(12, 1)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(96, 26)
Me.Button1.TabIndex = 2
Me.Button1.Text = "Copy URL"
Me.Button1.UseVisualStyleBackColor = True
'
'Panel1
'
Me.Panel1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Panel1.Controls.Add(Me.WebView2)
Me.Panel1.Location = New System.Drawing.Point(0, 30)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(1280, 720)
Me.Panel1.TabIndex = 4
'
'WebView2
'
Me.WebView2.AllowExternalDrop = True
Me.WebView2.CreationProperties = Nothing
Me.WebView2.DefaultBackgroundColor = System.Drawing.Color.White
Me.WebView2.Dock = System.Windows.Forms.DockStyle.Fill
Me.WebView2.Location = New System.Drawing.Point(0, 0)
Me.WebView2.Name = "WebView2"
Me.WebView2.Size = New System.Drawing.Size(1280, 720)
Me.WebView2.TabIndex = 0
Me.WebView2.ZoomFactor = 1.0R
'
'Timer1
'
Me.Timer1.Interval = 60000
'
'Timer2
'
Me.Timer2.Interval = 15000
'
'Browser
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(1279, 750)
Me.Controls.Add(Me.Panel1)
Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.TextBox1)
Me.MinimumSize = New System.Drawing.Size(480, 480)
Me.Name = "Browser"
Me.ShowIcon = False
Me.Text = "Browser"
Me.Panel1.ResumeLayout(False)
CType(Me.WebView2, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents TextBox1 As TextBox
Friend WithEvents Button1 As Button
Friend WithEvents Panel1 As Panel
Friend WithEvents Timer1 As Timer
Friend WithEvents Timer2 As Timer
Public WithEvents WebView2 As Microsoft.Web.WebView2.WinForms.WebView2
End Class

View File

@ -1,209 +0,0 @@
Option Strict On
Imports System.IO
Imports System.ComponentModel
Imports System.Threading
Imports System.Net
Imports System.Net.WebUtility
Imports System.IO.Compression
Imports System.Text
Imports System.Security.Policy
Imports Microsoft.Web.WebView2.Core
Imports MetroFramework.Drawing
Imports Newtonsoft.Json.Linq
Public Class Browser
Private Sub WebView2_CoreWebView2InitializationCompleted(sender As Object, e As CoreWebView2InitializationCompletedEventArgs) Handles WebView2.CoreWebView2InitializationCompleted
Try
WebView2.CoreWebView2.AddWebResourceRequestedFilter("https://www.crunchyroll.com/*", CoreWebView2WebResourceContext.All)
'AddHandler WebView2.CoreWebView2.WebResourceResponseReceived, AddressOf ObserveResponse
'AddHandler WebView2.CoreWebView2.WebResourceRequested, AddressOf ObserveHttp 'this is not the data we are looking for (anymore :( )
My.Settings.User_Agend = Chr(34) + "User-Agent: " + WebView2.CoreWebView2.Settings.UserAgent + Chr(34)
If WebView2.CoreWebView2.Source = "about:blank" Or WebView2.CoreWebView2.Source = Nothing Then
'TextBox1.Text = Main.Startseite
WebView2.CoreWebView2.Navigate(Main.Startseite)
End If
Catch ex As Exception
End Try
End Sub
Private Sub WebView2_SourceChanged(sender As Object, e As CoreWebView2SourceChangedEventArgs) Handles WebView2.SourceChanged
Try
TextBox1.Text = WebView2.CoreWebView2.Source
Catch ex As Exception
End Try
End Sub
Private Sub WebView2_NavigationCompleted(sender As Object, e As CoreWebView2NavigationCompletedEventArgs) Handles WebView2.NavigationCompleted
' Dim HTML As String = WebView2.CoreWebView2.
'TextBox1.Text = WebView2.CoreWebView2.Source
' Exit Sub
If e.HttpStatusCode = 200 Then
Dim DocumentTitle As String = WebView2.CoreWebView2.DocumentTitle
Debug.WriteLine("NavigationCompleted: " + Date.Now.ToString)
Main.WebbrowserURL = WebView2.CoreWebView2.Source
TextBox1.Text = Main.WebbrowserURL
Main.WebbrowserTitle = DocumentTitle
Main.ProcessHTML("", Main.WebbrowserURL, DocumentTitle)
GetCookies(Main.WebbrowserURL)
Main.BowserWasOpen = True
If Application.OpenForms().OfType(Of Anime_Add).Any = True Then
Anime_Add.btn_dl.Cursor = Cursors.Default
Anime_Add.btn_dl.BackgroundImage = My.Resources.main_button_download_default
End If
If Main.Startseite IsNot My.Settings.Startseite Then
Main.LoadBrowser(Main.Startseite, 1)
Main.Startseite = My.Settings.Startseite
End If
End If
End Sub
Public Async Sub GetCookies(ByVal Uri As String)
Try
Main.CookieList = Await WebView2.CoreWebView2.CookieManager.GetCookiesAsync(Uri)
Catch ex As Exception
End Try
End Sub
Private Sub Browser_Load(sender As Object, e As EventArgs) Handles Me.Load
Main.waveOutSetVolume(0, 0)
If Me.Width > My.Computer.Screen.Bounds.Width Then
Me.Width = My.Computer.Screen.Bounds.Width
Panel1.Width = Me.Size.Width - 15 ', Me.Size.Height - 69)
Panel1.Location = New Point(0, 30)
TextBox1.Width = My.Computer.Screen.Bounds.Width - 435
End If
If Me.Size.Height > My.Computer.Screen.Bounds.Height Then
Me.Height = My.Computer.Screen.Bounds.Height
Panel1.Height = Me.Size.Height - 69
Panel1.Location = New Point(0, 30)
End If
Try
Me.Icon = My.Resources.icon
Catch ex As Exception
End Try
If Main.UserBowser = False Then
Me.Location = New Point(-10000, 10000)
Timer1.Enabled = True
End If
WebView2.Source = New Uri(Main.Startseite)
End Sub
Private Sub Browser_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
Main.BowserWasOpen = False
'Main.UserBowser = False
'Me.Location = New Point(-10000, -10000)
'Main.LoadingUrl = ""
'Debug.WriteLine("Collecting")
'Dim Collector As New TaskCookieVisitor
'Dim CM As ICookieManager = WebBrowser1.GetCookieManager
'CM.VisitAllCookies(Collector)
'Main.CookieList = Collector.Task.Result()
'Debug.WriteLine("Collecting-end")
''e.Cancel = True
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Try
My.Computer.Clipboard.SetText(WebView2.CoreWebView2.Source)
MsgBox("copied: " + Chr(34) + WebView2.CoreWebView2.Source + Chr(34))
Catch ex As Exception
End Try
'My.Computer.Clipboard.SetText(WebBrowser1.Document.Body.InnerHtml)
End Sub
Private Sub TextBox1_KeyDown(sender As Object, e As KeyEventArgs) Handles TextBox1.KeyDown
Try
If e.KeyCode = Keys.Return Then
e.SuppressKeyPress = True
Debug.WriteLine("Start loading: " + Date.Now.ToString)
WebView2.CoreWebView2.Navigate(TextBox1.Text)
End If
Catch ex As Exception
MsgBox("Error in URL", MsgBoxStyle.Critical)
End Try
End Sub
Private Sub ObserveHttp(ByVal sender As Object, ByVal e As CoreWebView2WebResourceRequestedEventArgs) 'Handles RequestResource.GetUrl
' Debug.WriteLine(e.Request.Uri)
If CBool(InStr(e.Request.Uri, "crunchyroll.com")) = True And Main.CrBetaBasic = Nothing Then
Dim Headers As New List(Of KeyValuePair(Of String, String))
Headers.AddRange(e.Request.Headers.ToList)
For i As Integer = 0 To Headers.Count
If CBool(InStr(Headers.Item(i).Value, "Basic")) Then
Main.CrBetaBasic = Headers.Item(i).Value
Debug.WriteLine("Auth-Basic: " + Main.CrBetaBasic)
End If
Next
End If
End Sub
Public Function StringToStream(input As String, enc As Encoding) As Stream
Dim memoryStream = New MemoryStream()
Dim streamWriter = New StreamWriter(memoryStream, enc)
streamWriter.Write(input)
streamWriter.Flush()
memoryStream.Position = 0
Return memoryStream
End Function
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
'If Main.UserBowser = False Then
' WebView2.Reload()
'Else
' Timer1.Enabled = False
'End If
End Sub
Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick
Me.Close()
End Sub
End Class

View File

@ -6,6 +6,13 @@
SubsOnly = 2
AudioOnly = 3
End Enum
Public Enum UpdateScope
Skip = 0
Info = 1
InfoPre = 2
Auto = 3
Pre = 4
End Enum
Public Enum ConvertSubsEnum
DisplayText = 0

View File

@ -60,7 +60,7 @@ Public Class CRD_List_Item
Dim FailedSegments As New List(Of FailedSegemtsWithURL)
Dim LogText As New List(Of String)
Dim GlobalLogfile As String
'Dim GlobalLogfile As String
Private Event UpdateUI(ByVal Percent As Integer, ByVal di As DirectoryInfo, ByVal Idle As Integer)
@ -485,24 +485,6 @@ Public Class CRD_List_Item
HistoryDL_Pfad = DL_Pfad
HistoryFilename = Filename
GlobalLogfile = DL_Pfad.Replace(".mkv", ".txt").Replace(Chr(34), "")
'Debug.WriteLine(GlobalLogfile)
'If (Me.InvokeRequired) Then
' Me.Invoke(Sub()
' 'MsgBox(True.ToString)
' Label_percent.Text = "selected subtiles have been dowloaded"
' Canceld = True
' End Sub)
'Else
' ' MsgBox(False.ToString)
' Label_percent.Text = "selected subtiles have been dowloaded"
' Canceld = True
'End If
'Exit Sub
If CBool(InStr(DL_URL, "-i [Subtitles only]")) Then
Me.Invoke(New Action(Function() As Object
@ -516,12 +498,16 @@ Public Class CRD_List_Item
Return Nothing
End Function))
ElseIf DownloadHybridMode = True Then
DL_URL = DL_URL.Replace("-protocol_whitelist file,http,https,tcp,tls,crypto,data", "") 'remove whitelist for hybrid mode
HistoryDL_URL = DL_URL
Dim Evaluator = New Thread(Sub() DownloadHybrid(DL_URL, DL_Pfad, Filename))
Evaluator.Start()
HybridMode = True
HybridRunning = True
Else
DownloadFFMPEG("-protocol_whitelist file,http,https,tcp,tls,crypto,data " + DL_URL, DL_Pfad, Filename)
DownloadFFMPEG(DL_URL, DL_Pfad, Filename) 'DownloadFFMPEG("-protocol_whitelist file,http,https,tcp,tls,crypto,data " + DL_URL, DL_Pfad, Filename)
End If
End Sub
@ -991,54 +977,15 @@ Public Class CRD_List_Item
KeyLine = KeyFileUri(0) + "URI=" + Chr(34) + KeyFileCache + Chr(34)
End If
If KeepCacheFiles = True Then
'Dim Bytes() As Byte = File.ReadAllBytes(Application.StartupPath + "\" + KeyFile)
'File.WriteAllBytes(Folder + "\" + KeyFile, Bytes)
Dim Evaluator2 = New Thread(Sub() Me.TS_DownloadAsync(KeyFileUri3, Folder + "\" + KeyFile))
Evaluator2.Start()
End If
'If KeepCacheFiles = True Then
' 'Dim Bytes() As Byte = File.ReadAllBytes(Application.StartupPath + "\" + KeyFile)
' 'File.WriteAllBytes(Folder + "\" + KeyFile, Bytes)
' Dim Evaluator2 = New Thread(Sub() Me.TS_DownloadAsync(KeyFileUri3, Folder + "\" + KeyFile))
' Evaluator2.Start()
'End If
End If
m3u8FileContent = m3u8FileContent + KeyLine + vbLf
ElseIf CBool(InStr(textLenght(i2), "#EXT-X-ENDLIST")) Then
' ElseIf textLenght(i) = Then 'And my.Settings.FixCRStream = True Then
Try
Dim StringCount As String = Count.ToString
Dim StringCount_1 As String = (Count + 1).ToString
Debug.WriteLine("old: " + LastUrl)
Dim NewUrl As String = Nothing
Me.Invoke(New Action(Function() As Object
NewUrl = LastUrl.Replace("-" + StringCount + "-", "-" + StringCount_1 + "-")
Return Nothing
End Function))
Debug.WriteLine("new: " + NewUrl)
Dim File As String = Folder + String.Format("{0:00000}", Count) + ".ts"
Dim curi As String = GetFullUri(url, NewUrl)
WC_TS = New WebClient
WC_TS.DownloadFile(New Uri(curi), File)
HybrideLog = HybrideLog + vbNewLine + Date.Now.ToString + ": " + File + " - " + curi
m3u8FileContent = m3u8FileContent + "#EXTINF:4.048," + vbLf 'dummy line
m3u8FileContent = m3u8FileContent + File + vbLf
Dim FragmentsFinised = Count * 100 / FragmentsInt
'Dim Update = New Thread(Sub() Me.TS_StatusAsync(CInt(FragmentsFinised), di, PauseTime))
'Update.Start()
RaiseEvent UpdateUI(CInt(FragmentsFinised), di, PauseTime)
Count = Count + 1
m3u8FileContent = m3u8FileContent + textLenght(i) + vbLf
Catch ex As Exception
HybrideLog = HybrideLog + vbNewLine + Date.Now.ToString + ": CR fix failed to access unlisted file #882"
m3u8FileContent = m3u8FileContent + textLenght(i) + vbLf
End Try
Else
m3u8FileContent = m3u8FileContent + textLenght(i) + vbLf
End If

View File

@ -106,19 +106,11 @@
<ItemGroup>
<Reference Include="MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\metroframework-modern-ui\MetroFramework\bin\x64\Debug\MetroFramework.dll</HintPath>
<HintPath>Resources\CRD_metroframework_x64\MetroFramework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Web.WebView2.Core, Version=1.0.1418.22, Culture=neutral, PublicKeyToken=2a8ab48044d2601e, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Web.WebView2.1.0.1418.22\lib\net45\Microsoft.Web.WebView2.Core.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Web.WebView2.WinForms, Version=1.0.1418.22, Culture=neutral, PublicKeyToken=2a8ab48044d2601e, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Web.WebView2.1.0.1418.22\lib\net45\Microsoft.Web.WebView2.WinForms.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Web.WebView2.Wpf, Version=1.0.1418.22, Culture=neutral, PublicKeyToken=2a8ab48044d2601e, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Web.WebView2.1.0.1418.22\lib\net45\Microsoft.Web.WebView2.Wpf.dll</HintPath>
</Reference>
<Reference Include="MyProvider">
<HintPath>..\..\..\MyProvider\MyProvider\bin\x64\Debug\MyProvider.dll</HintPath>
<Reference Include="MyProvider, Version=1.0.0.0, Culture=neutral, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion>
<HintPath>Resources\CRD_SettingsProvider_x64\MyProvider.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
@ -151,6 +143,12 @@
</ItemGroup>
<ItemGroup>
<Compile Include="CRD-Classes.vb" />
<Compile Include="Error_msg.Designer.vb">
<DependentUpon>Error_msg.vb</DependentUpon>
</Compile>
<Compile Include="Error_msg.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="LoginForm.Designer.vb">
<DependentUpon>LoginForm.vb</DependentUpon>
</Compile>
@ -201,12 +199,6 @@
<Compile Include="einstellungen.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Browser.Designer.vb">
<DependentUpon>Browser.vb</DependentUpon>
</Compile>
<Compile Include="Browser.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="ProcessSleep.vb" />
<Compile Include="ErrorDialog.Designer.vb">
<DependentUpon>ErrorDialog.vb</DependentUpon>
@ -240,6 +232,10 @@
<Compile Include="Subfolder.vb" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Error_msg.resx">
<DependentUpon>Error_msg.vb</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="LoginForm.resx">
<DependentUpon>LoginForm.vb</DependentUpon>
</EmbeddedResource>
@ -261,9 +257,6 @@
<EmbeddedResource Include="einstellungen.resx">
<DependentUpon>einstellungen.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Browser.resx">
<DependentUpon>Browser.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="CRD_List_Item.resx">
<DependentUpon>CRD_List_Item.vb</DependentUpon>
</EmbeddedResource>
@ -391,6 +384,7 @@
<Content Include="bin\x86\Debug\Lib\swiftshader\libEGL.dll" />
<Content Include="bin\x86\Debug\Lib\swiftshader\libGLESv2.dll" />
<Content Include="icon.ico" />
<None Include="Resources\error_dis.png" />
<None Include="Resources\BG.png" />
<None Include="Resources\ffmpeg_OK_cL.png" />
<None Include="Resources\ffmpeg_OK_cL_hover.png" />
@ -442,11 +436,4 @@
<WCFMetadata Include="Connected Services\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<Import Project="..\packages\Microsoft.Web.WebView2.1.0.1418.22\build\Microsoft.Web.WebView2.targets" Condition="Exists('..\packages\Microsoft.Web.WebView2.1.0.1418.22\build\Microsoft.Web.WebView2.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Web.WebView2.1.0.1418.22\build\Microsoft.Web.WebView2.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Web.WebView2.1.0.1418.22\build\Microsoft.Web.WebView2.targets'))" />
</Target>
</Project>

View File

@ -40,22 +40,14 @@ Public Class ErrorDialog
Debug.WriteLine(Main.ResoNotFoundString)
Debug.WriteLine("ResoNotFoundString")
Dim lang_avalibe As String() = Main.ResoNotFoundString.Split(New String() {"hardsub_locale" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim lang_avalibe As String() = Main.ResoNotFoundString.Split(New String() {";"}, System.StringSplitOptions.RemoveEmptyEntries)
For i As Integer = 1 To lang_avalibe.Count - 1
If CBool(InStr(lang_avalibe(i), "https://")) Then
Else
Continue For
End If
If lang_avalibe(i).Substring(0, 1) = Chr(34) Then
ComboBox1.Items.Add("No Hardsubs")
Continue For 'Chr(34) +
End If
'MsgBox(lang_avalibe(i))
Dim langsplit As String() = lang_avalibe(i).Split(New String() {Chr(34) + ","}, System.StringSplitOptions.RemoveEmptyEntries)
ComboBox1.Items.Add(Main.ConvertSubValue(langsplit(0), ConvertSubsEnum.DisplayText))
For i As Integer = 0 To lang_avalibe.Count - 1
ComboBox1.Items.Add(Main.ConvertSubValue(lang_avalibe(i), ConvertSubsEnum.DisplayText))
Next
SurroundingSub()
ElseIf Main.DialogTaskString = "Resolution" Then
StatusLabel.Text = Main.LabelResoNotFoundText
Dim Reso_avaible1 As String() = Main.ResoNotFoundString.Split(New String() {"RESOLUTION="}, System.StringSplitOptions.RemoveEmptyEntries)

View File

@ -0,0 +1,183 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class Error_msg
Inherits MetroFramework.Forms.MetroForm
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()>
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.GroupBox3 = New System.Windows.Forms.GroupBox()
Me.btn_cl = New System.Windows.Forms.Button()
Me.btn_ign = New System.Windows.Forms.Button()
Me.btn_ok = New System.Windows.Forms.Button()
Me.ErrorLabel = New MetroFramework.Controls.MetroLabel()
Me.Delay = New System.Windows.Forms.Timer(Me.components)
Me.Btn_Close = New System.Windows.Forms.Button()
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.ErrorBox = New System.Windows.Forms.RichTextBox()
Me.GroupBox3.SuspendLayout()
Me.GroupBox1.SuspendLayout()
Me.SuspendLayout()
'
'GroupBox3
'
Me.GroupBox3.BackColor = System.Drawing.Color.Transparent
Me.GroupBox3.Controls.Add(Me.btn_cl)
Me.GroupBox3.Controls.Add(Me.btn_ign)
Me.GroupBox3.Controls.Add(Me.btn_ok)
Me.GroupBox3.Controls.Add(Me.ErrorLabel)
Me.GroupBox3.Location = New System.Drawing.Point(13, 60)
Me.GroupBox3.Name = "GroupBox3"
Me.GroupBox3.Size = New System.Drawing.Size(613, 203)
Me.GroupBox3.TabIndex = 38
Me.GroupBox3.TabStop = False
'
'btn_cl
'
Me.btn_cl.BackgroundImage = Global.Crunchyroll_Downloader.My.Resources.Resources.ffmpeg_OK_cL
Me.btn_cl.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
Me.btn_cl.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.btn_cl.FlatAppearance.BorderSize = 0
Me.btn_cl.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btn_cl.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_cl.ForeColor = System.Drawing.SystemColors.Control
Me.btn_cl.Location = New System.Drawing.Point(28, 121)
Me.btn_cl.Name = "btn_cl"
Me.btn_cl.Size = New System.Drawing.Size(150, 40)
Me.btn_cl.TabIndex = 77
Me.btn_cl.Text = "Details"
Me.btn_cl.UseVisualStyleBackColor = True
'
'btn_ign
'
Me.btn_ign.BackgroundImage = Global.Crunchyroll_Downloader.My.Resources.Resources.ffmpeg_OK_cL
Me.btn_ign.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
Me.btn_ign.FlatAppearance.BorderSize = 0
Me.btn_ign.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btn_ign.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_ign.ForeColor = System.Drawing.SystemColors.Control
Me.btn_ign.Location = New System.Drawing.Point(235, 121)
Me.btn_ign.Name = "btn_ign"
Me.btn_ign.Size = New System.Drawing.Size(150, 40)
Me.btn_ign.TabIndex = 78
Me.btn_ign.Text = "Ignore"
Me.btn_ign.UseVisualStyleBackColor = True
'
'btn_ok
'
Me.btn_ok.BackgroundImage = Global.Crunchyroll_Downloader.My.Resources.Resources.ffmpeg_OK_cL
Me.btn_ok.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
Me.btn_ok.FlatAppearance.BorderSize = 0
Me.btn_ok.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btn_ok.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btn_ok.ForeColor = System.Drawing.SystemColors.Control
Me.btn_ok.Location = New System.Drawing.Point(424, 121)
Me.btn_ok.Name = "btn_ok"
Me.btn_ok.Size = New System.Drawing.Size(150, 40)
Me.btn_ok.TabIndex = 78
Me.btn_ok.Text = "Ok"
Me.btn_ok.UseVisualStyleBackColor = True
'
'ErrorLabel
'
Me.ErrorLabel.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.ErrorLabel.BackColor = System.Drawing.Color.Transparent
Me.ErrorLabel.FontSize = MetroFramework.MetroLabelSize.Tall
Me.ErrorLabel.FontWeight = MetroFramework.MetroLabelWeight.Bold
Me.ErrorLabel.ForeColor = System.Drawing.Color.Black
Me.ErrorLabel.Location = New System.Drawing.Point(6, 16)
Me.ErrorLabel.Name = "ErrorLabel"
Me.ErrorLabel.Size = New System.Drawing.Size(601, 53)
Me.ErrorLabel.TabIndex = 34
Me.ErrorLabel.Text = "Status: idle"
Me.ErrorLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'Delay
'
Me.Delay.Interval = 2000
'
'Btn_Close
'
Me.Btn_Close.BackColor = System.Drawing.Color.Transparent
Me.Btn_Close.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None
Me.Btn_Close.Cursor = System.Windows.Forms.Cursors.Hand
Me.Btn_Close.FlatAppearance.BorderSize = 0
Me.Btn_Close.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent
Me.Btn_Close.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Btn_Close.ForeColor = System.Drawing.Color.Transparent
Me.Btn_Close.Image = Global.Crunchyroll_Downloader.My.Resources.Resources.main_close
Me.Btn_Close.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.Btn_Close.Location = New System.Drawing.Point(581, 8)
Me.Btn_Close.Name = "Btn_Close"
Me.Btn_Close.Size = New System.Drawing.Size(35, 35)
Me.Btn_Close.TabIndex = 39
Me.Btn_Close.UseVisualStyleBackColor = False
'
'GroupBox1
'
Me.GroupBox1.BackColor = System.Drawing.Color.Transparent
Me.GroupBox1.Controls.Add(Me.ErrorBox)
Me.GroupBox1.Location = New System.Drawing.Point(13, 286)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(613, 203)
Me.GroupBox1.TabIndex = 79
Me.GroupBox1.TabStop = False
'
'ErrorBox
'
Me.ErrorBox.BackColor = System.Drawing.SystemColors.ButtonHighlight
Me.ErrorBox.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.ErrorBox.Location = New System.Drawing.Point(10, 19)
Me.ErrorBox.Name = "ErrorBox"
Me.ErrorBox.ReadOnly = True
Me.ErrorBox.Size = New System.Drawing.Size(593, 170)
Me.ErrorBox.TabIndex = 0
Me.ErrorBox.Text = ""
'
'Error_msg
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(640, 275)
Me.Controls.Add(Me.GroupBox1)
Me.Controls.Add(Me.Btn_Close)
Me.Controls.Add(Me.GroupBox3)
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "Error_msg"
Me.Text = "CRD-Error"
Me.TextAlign = MetroFramework.Forms.MetroFormTextAlign.Center
Me.GroupBox3.ResumeLayout(False)
Me.GroupBox1.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
Private WithEvents GroupBox3 As GroupBox
Public WithEvents ErrorLabel As MetroFramework.Controls.MetroLabel
Friend WithEvents Delay As Timer
Friend WithEvents Btn_Close As Button
Friend WithEvents btn_cl As Button
Friend WithEvents btn_ok As Button
Private WithEvents GroupBox1 As GroupBox
Friend WithEvents ErrorBox As RichTextBox
Friend WithEvents btn_ign As Button
End Class

View File

@ -117,10 +117,7 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="Timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<metadata name="Delay.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="Timer2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>106, 17</value>
</metadata>
</root>

View File

@ -0,0 +1,98 @@
Option Strict On
Imports Crunchyroll_Downloader.CRD_Classes
Imports MetroFramework
Imports MetroFramework.Components
Public Class Error_msg
Dim Manager As MetroStyleManager = Main.Manager
Private Sub Btn_Close_MouseEnter(sender As Object, e As EventArgs) Handles Btn_Close.MouseEnter, Btn_Close.GotFocus
If Manager.Theme = MetroThemeStyle.Dark Then
Btn_Close.Image = My.Resources.main_close_dark_hover
Else
Btn_Close.Image = My.Resources.main_close_hover
End If
End Sub
Private Sub Btn_Close_MouseLeave(sender As Object, e As EventArgs) Handles Btn_Close.MouseLeave, Btn_Close.LostFocus
Btn_Close.Image = Main.CloseImg
End Sub
Private Sub Btn_Close_Click(sender As Object, e As EventArgs) Handles Btn_Close.Click
Me.Close()
End Sub
Private Sub Error_msg_Resize(sender As Object, e As EventArgs) Handles Me.Resize
Btn_Close.Location = New Point(Me.Width - 36, 1)
End Sub
Private Sub btn_cl_Click(sender As Object, e As EventArgs) Handles btn_cl.Click
If Me.Height = 500 Then
Me.Height = 275
Else
Me.Height = 500
End If
End Sub
Private Sub Reso_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.TopMost = True
Manager.Owner = Me
Me.StyleManager = Manager
Btn_Close.Image = Main.CloseImg
Try
Me.Icon = My.Resources.icon
Catch ex As Exception
End Try
Me.Location = New Point(CInt(Main.Location.X + Main.Width / 2 - Me.Width / 2), CInt(Main.Location.Y + Main.Height / 2 - Me.Height / 2))
End Sub
Public Sub ShowErrorDia(ByVal Details As String, ShortError As String, Optional ByVal IgnoreOption As Boolean = False)
Me.Show()
ErrorBox.Text = Details
ErrorLabel.Text = ShortError
If IgnoreOption = False Then
btn_ign.BackgroundImage = My.Resources.error_dis
btn_ign.Cursor = Cursors.No
btn_ign.Enabled = False
End If
End Sub
Private Sub btn_ok_Click(sender As Object, e As EventArgs) Handles btn_ok.Click
Me.Close()
End Sub
Private Sub Btn_ok_MouseEnter(sender As Object, e As EventArgs) Handles btn_ok.MouseEnter
btn_ok.BackgroundImage = My.Resources.ffmpeg_OK_cL_hover
End Sub
Private Sub Btn_ok_MouseLeave(sender As Object, e As EventArgs) Handles btn_ok.MouseLeave
btn_ok.BackgroundImage = My.Resources.ffmpeg_OK_cL
End Sub
Private Sub Btn_cl_MouseEnter(sender As Object, e As EventArgs) Handles btn_cl.MouseEnter
btn_cl.BackgroundImage = My.Resources.ffmpeg_OK_cL_hover
End Sub
Private Sub Btn_cl_MouseLeave(sender As Object, e As EventArgs) Handles btn_cl.MouseLeave
btn_cl.BackgroundImage = My.Resources.ffmpeg_OK_cL
End Sub
Private Sub Btn_ign_MouseEnter(sender As Object, e As EventArgs) Handles btn_ign.MouseEnter
btn_ign.BackgroundImage = My.Resources.ffmpeg_OK_cL_hover
End Sub
Private Sub Btn_ign_MouseLeave(sender As Object, e As EventArgs) Handles btn_ign.MouseLeave
btn_ign.BackgroundImage = My.Resources.ffmpeg_OK_cL
End Sub
Private Sub btn_ign_Click(sender As Object, e As EventArgs) Handles btn_ign.Click
Main.IgnoreErrorDia = True
Me.Close()
End Sub
End Class

View File

@ -81,7 +81,7 @@ Module GetData
If Main.Curl_insecure = True Then
cmd = "--insecure "
End If '-fsSLm
cmd = cmd + "--no-alpn -fsSLm 15 -A " + My.Settings.User_Agend.Replace("User-Agent: ", "") + Cookies + Auth + Post + " " + Chr(34) + Url + Chr(34)
cmd = cmd + "--no-alpn -sSLm 15 -w " + Chr(34) + "\nHTTP Status: %{http_code}\n" + Chr(34) + " -A " + My.Settings.User_Agend.Replace("User-Agent: ", "") + Cookies + Auth + Post + " " + Chr(34) + Url + Chr(34)
Dim Proc As New Process
'Debug.WriteLine("CurlPost: " + cmd)
Dim CurlOutput As String = Nothing
@ -114,31 +114,26 @@ Module GetData
Loop Until Proc.HasExited Or Microsoft.VisualBasic.DateAndTime.Timer < finish
If CBool(InStr(CurlOutput, "curl:")) = True And CBool(InStr(CurlOutput, "400")) = True Then
Return CurlOutput
ElseIf CBool(InStr(CurlError, "curl:")) = True And CBool(InStr(CurlError, "401")) = True Then
Return CurlError
ElseIf CBool(InStr(CurlOutput, "curl:")) = True And CBool(InStr(CurlOutput, "401")) = True Then
Return CurlOutput
ElseIf CBool(InStr(CurlError, "curl:")) = True And CBool(InStr(CurlError, "400")) = True Then
Return CurlError
ElseIf CBool(InStr(CurlError, "curl:")) Then
Debug.WriteLine(CurlError)
Throw New System.Exception("Error - Getting" + Sender + vbNewLine + CurlError)
Return Nothing
ElseIf CBool(InStr(CurlOutput, "curl:")) Then
Debug.WriteLine(CurlOutput)
If CurlOutput = Nothing And CurlError = Nothing Then
Throw New System.Exception("Error - Getting" + Sender + vbNewLine + CurlError)
Return Nothing
ElseIf CBool(InStr(CurlOutput, "HTTP Status: 4")) Then
Return CurlOutput
ElseIf CBool(InStr(CurlError, "HTTP Status: 4")) Then
Return CurlError
ElseIf CurlError = Nothing Then
Dim OutputBody() As String = CurlOutput.Split(New String() {"HTTP Status:"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim Output As String = OutputBody(0)
Return Output
Else
Return CurlOutput
Return CurlError
End If
End Function
Public Function CurlAuthNew(ByVal Url As String, ByVal Cookies As String, ByVal Auth As String, Optional ByVal Test As Boolean = False) As String
Public Function CurlAuthNew(ByVal Url As String, ByVal Cookies As String, ByVal Auth As String, Optional ByVal Test As Boolean = False, Optional ByVal UserAgent As String = Chr(34) + "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0" + Chr(34)) As String
If Test = True Then
Throw New System.Exception("Error - Getting" + vbNewLine + "Test")
@ -157,7 +152,78 @@ Module GetData
If Main.Curl_insecure = True Then
cmd = "--insecure "
End If
cmd = cmd + "--no-alpn -fsSLm 15 -A " + My.Settings.User_Agend.Replace("User-Agent: ", "") + Cookies + Auth + " " + Chr(34) + Url + Chr(34)
cmd = cmd + "--no-alpn -sSLm 15 -w " + Chr(34) + "\nHTTP Status: %{http_code}\n" + Chr(34) + " -A " + UserAgent + Cookies + Auth + " " + Chr(34) + Url + Chr(34)
Dim Proc As New Process
'MsgBox(cmd)
Dim CurlOutput As String = Nothing
Dim CurlError As String = Nothing
' all parameters required to run the process
startinfo.FileName = exepath
startinfo.Arguments = cmd
startinfo.UseShellExecute = False
startinfo.WindowStyle = ProcessWindowStyle.Normal
startinfo.RedirectStandardError = True
startinfo.RedirectStandardOutput = True
startinfo.CreateNoWindow = True
startinfo.StandardOutputEncoding = Encoding.UTF8
startinfo.StandardErrorEncoding = Encoding.UTF8
Proc.StartInfo = startinfo
Proc.Start() ' start the process
sr = Proc.StandardOutput 'standard error is used by ffmpeg
sr2 = Proc.StandardError
'sw = proc.StandardInput
Dim start, finish, pau As Double
start = CSng(Microsoft.VisualBasic.DateAndTime.Timer)
pau = 5
finish = start + pau
Do
CurlOutput = CurlOutput + sr.ReadToEnd
CurlError = CurlError + sr2.ReadToEnd
'ffmpegOutput2 = sr.ReadLine
'Debug.WriteLine(CurlOutput)
Loop Until Proc.HasExited Or Microsoft.VisualBasic.DateAndTime.Timer < finish
If CBool(InStr(CurlError, "HTTP Status: 420")) Then
Return CurlError
ElseIf CBool(InStr(CurlOutput, "HTTP Status: 420")) Then
Return CurlOutput
ElseIf CBool(InStr(CurlError, "HTTP Status: 4")) Then
Debug.WriteLine(CurlError)
Throw New System.Exception("Error - Getting" + vbNewLine + CurlError)
Return Nothing
ElseIf CBool(InStr(CurlOutput, "HTTP Status: 4")) Then
Debug.WriteLine(CurlOutput)
Throw New System.Exception("Error - Getting" + vbNewLine + CurlOutput)
Return Nothing
Else
Dim OutputBody() As String = CurlOutput.Split(New String() {"HTTP Status:"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim Output As String = OutputBody(0)
Return Output
End If
End Function
Public Function CurlDeleteNew(ByVal Url As String, ByVal Auth As String, Optional ByVal UserAgent As String = Chr(34) + "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0" + Chr(34)) As String
Dim exepath As String = Path.Combine(Application.StartupPath, "lib", "curl.exe")
Dim startinfo As New System.Diagnostics.ProcessStartInfo
Dim sr As StreamReader
Dim sr2 As StreamReader
Dim cmd As String = ""
If Main.Curl_insecure = True Then
cmd = "--insecure "
End If
cmd = cmd + "--no-alpn -sSLm 15 -w " + Chr(34) + "\nHTTP Status: %{http_code}\n" + Chr(34) + " -A " + UserAgent + Auth + " -X DELETE " + Chr(34) + Url + Chr(34)
Dim Proc As New Process
'MsgBox(cmd)
Dim CurlOutput As String = Nothing
@ -193,13 +259,13 @@ Module GetData
If CBool(InStr(CurlError, "curl:")) Then
If CBool(InStr(CurlError, "HTTP Status: 4")) Then
Debug.WriteLine(CurlError)
Throw New System.Exception("Error - Getting" + vbNewLine + CurlError)
Return Nothing
ElseIf CBool(InStr(CurlOutput, "curl:")) Then
ElseIf CBool(InStr(CurlOutput, "HTTP Status: 4")) Then
Debug.WriteLine(CurlOutput)
Throw New System.Exception("Error - Getting" + vbNewLine + CurlError)
Throw New System.Exception("Error - Getting" + vbNewLine + CurlOutput)
Return Nothing
Else
Return CurlOutput
@ -208,8 +274,6 @@ Module GetData
End Function
#End Region

View File

@ -34,7 +34,6 @@ Partial Class Main
Me.MetroStyleManager1 = New MetroFramework.Components.MetroStyleManager(Me.components)
Me.Timer4 = New System.Windows.Forms.Timer(Me.components)
Me.Btn_add = New System.Windows.Forms.Button()
Me.Btn_Browser = New System.Windows.Forms.Button()
Me.Btn_Settings = New System.Windows.Forms.Button()
Me.Btn_min = New System.Windows.Forms.Button()
Me.Btn_Close = New System.Windows.Forms.Button()
@ -50,8 +49,10 @@ Partial Class Main
Me.DummyItemToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.AudioOnlyQualityToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.LoginFormToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ErrorDiaTestToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.Btn_Queue = New System.Windows.Forms.Button()
Me.BGW_Update = New System.ComponentModel.BackgroundWorker()
CType(Me.PictureBox5, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.ConsoleBar, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.MetroStyleManager1, System.ComponentModel.ISupportInitialize).BeginInit()
@ -112,17 +113,6 @@ Partial Class Main
Me.Btn_add.Name = "Btn_add"
Me.Btn_add.UseVisualStyleBackColor = False
'
'Btn_Browser
'
Me.Btn_Browser.BackColor = System.Drawing.Color.Transparent
resources.ApplyResources(Me.Btn_Browser, "Btn_Browser")
Me.Btn_Browser.Cursor = System.Windows.Forms.Cursors.Hand
Me.Btn_Browser.FlatAppearance.BorderSize = 0
Me.Btn_Browser.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent
Me.Btn_Browser.Image = Global.Crunchyroll_Downloader.My.Resources.Resources.main_browser
Me.Btn_Browser.Name = "Btn_Browser"
Me.Btn_Browser.UseVisualStyleBackColor = False
'
'Btn_Settings
'
Me.Btn_Settings.BackColor = System.Drawing.Color.Transparent
@ -160,7 +150,7 @@ Partial Class Main
'
'ContextMenuStrip1
'
Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.QueueToolStripMenuItem, Me.SaveThumbnailAsImageToolStripMenuItem, Me.ToggleDebugModeToolStripMenuItem, Me.CheckCRBetaTokenToolStripMenuItem, Me.Timer3OffToolStripMenuItem, Me.ThreadCount, Me.CRCookieToolStripMenuItem, Me.UrlJsonsToolStripMenuItem, Me.DummyItemToolStripMenuItem, Me.AudioOnlyQualityToolStripMenuItem, Me.LoginFormToolStripMenuItem})
Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.QueueToolStripMenuItem, Me.SaveThumbnailAsImageToolStripMenuItem, Me.ToggleDebugModeToolStripMenuItem, Me.CheckCRBetaTokenToolStripMenuItem, Me.Timer3OffToolStripMenuItem, Me.ThreadCount, Me.CRCookieToolStripMenuItem, Me.UrlJsonsToolStripMenuItem, Me.DummyItemToolStripMenuItem, Me.AudioOnlyQualityToolStripMenuItem, Me.LoginFormToolStripMenuItem, Me.ErrorDiaTestToolStripMenuItem})
Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
resources.ApplyResources(Me.ContextMenuStrip1, "ContextMenuStrip1")
'
@ -219,6 +209,11 @@ Partial Class Main
Me.LoginFormToolStripMenuItem.Name = "LoginFormToolStripMenuItem"
resources.ApplyResources(Me.LoginFormToolStripMenuItem, "LoginFormToolStripMenuItem")
'
'ErrorDiaTestToolStripMenuItem
'
Me.ErrorDiaTestToolStripMenuItem.Name = "ErrorDiaTestToolStripMenuItem"
resources.ApplyResources(Me.ErrorDiaTestToolStripMenuItem, "ErrorDiaTestToolStripMenuItem")
'
'Panel1
'
resources.ApplyResources(Me.Panel1, "Panel1")
@ -235,6 +230,9 @@ Partial Class Main
Me.Btn_Queue.Name = "Btn_Queue"
Me.Btn_Queue.UseVisualStyleBackColor = False
'
'BGW_Update
'
'
'Main
'
Me.ApplyImageInvert = True
@ -246,7 +244,6 @@ Partial Class Main
Me.Controls.Add(Me.Btn_Close)
Me.Controls.Add(Me.Btn_min)
Me.Controls.Add(Me.Btn_Settings)
Me.Controls.Add(Me.Btn_Browser)
Me.Controls.Add(Me.Btn_add)
Me.Controls.Add(Me.TheTextBox)
Me.Controls.Add(Me.ConsoleBar)
@ -275,7 +272,6 @@ Partial Class Main
Friend WithEvents MetroStyleManager1 As MetroFramework.Components.MetroStyleManager
Friend WithEvents Timer4 As Timer
Friend WithEvents Btn_add As Button
Friend WithEvents Btn_Browser As Button
Friend WithEvents Btn_Settings As Button
Friend WithEvents Btn_min As Button
Friend WithEvents Btn_Close As Button
@ -293,4 +289,6 @@ Partial Class Main
Friend WithEvents SaveThumbnailAsImageToolStripMenuItem As ToolStripMenuItem
Friend WithEvents AudioOnlyQualityToolStripMenuItem As ToolStripMenuItem
Friend WithEvents LoginFormToolStripMenuItem As ToolStripMenuItem
Friend WithEvents ErrorDiaTestToolStripMenuItem As ToolStripMenuItem
Friend WithEvents BGW_Update As System.ComponentModel.BackgroundWorker
End Class

View File

@ -148,7 +148,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;PictureBox5.ZOrder" xml:space="preserve">
<value>10</value>
<value>9</value>
</data>
<metadata name="ToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>383, 18</value>
@ -187,7 +187,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;TheTextBox.ZOrder" xml:space="preserve">
<value>8</value>
<value>7</value>
</data>
<data name="ConsoleBar.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Stretch</value>
@ -214,7 +214,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;ConsoleBar.ZOrder" xml:space="preserve">
<value>9</value>
<value>8</value>
</data>
<metadata name="MetroStyleExtender1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
@ -241,7 +241,7 @@
<value>NoControl</value>
</data>
<data name="Btn_Queue.Location" type="System.Drawing.Point, System.Drawing">
<value>575, 18</value>
<value>150, 18</value>
</data>
<data name="Btn_Queue.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 35</value>
@ -378,33 +378,6 @@
<data name="&gt;&gt;Btn_Settings.ZOrder" xml:space="preserve">
<value>5</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>140, 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>6</value>
</data>
<data name="Btn_add.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Zoom</value>
</data>
@ -433,7 +406,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;Btn_add.ZOrder" xml:space="preserve">
<value>7</value>
<value>6</value>
</data>
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.25pt</value>
@ -549,6 +522,18 @@
<data name="&gt;&gt;LoginFormToolStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ErrorDiaTestToolStripMenuItem.Name" xml:space="preserve">
<value>ErrorDiaTestToolStripMenuItem</value>
</data>
<data name="&gt;&gt;ErrorDiaTestToolStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;BGW_Update.Name" xml:space="preserve">
<value>BGW_Update</value>
</data>
<data name="&gt;&gt;BGW_Update.Type" xml:space="preserve">
<value>System.ComponentModel.BackgroundWorker, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>Main</value>
</data>
@ -627,6 +612,12 @@
<data name="LoginFormToolStripMenuItem.Text" xml:space="preserve">
<value>Login Form</value>
</data>
<data name="ErrorDiaTestToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>233, 22</value>
</data>
<data name="ErrorDiaTestToolStripMenuItem.Text" xml:space="preserve">
<value>ErrorDiaTest</value>
</data>
<data name="ContextMenuStrip1.Size" type="System.Drawing.Size, System.Drawing">
<value>234, 268</value>
</data>
@ -636,4 +627,7 @@
<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>
<metadata name="BGW_Update.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>509, 49</value>
</metadata>
</root>

View File

@ -13,9 +13,9 @@ Imports System.ComponentModel
Imports Newtonsoft.Json.Linq
Imports System.Runtime.InteropServices
Imports MyProvider.MyProvider
Imports Microsoft.Web.WebView2.Core
Imports Crunchyroll_Downloader.CRD_Classes
Imports System.Runtime.CompilerServices
Imports System.Runtime.Remoting.Contexts
Imports System.Reflection
Public Class Main
Inherits MetroForm
@ -40,15 +40,12 @@ Public Class Main
Public Url_locale As String = Nothing
Public LoadingUrl As String = ""
Public LoadedUrls As New List(Of CoreWebView2WebResourceRequest)
Public Manager As New MetroStyleManager
Public DarkModeValue As Boolean = False
Public invalids As Char() = System.IO.Path.GetInvalidFileNameChars()
Dim ServerThread As Thread
Public KodiNaming As Boolean = False
Public ErrorTolerance As Integer = 0
Public CookieList As New List(Of CoreWebView2Cookie)
Public HTMLString As String = My.Resources.Startuphtml
Public ListBoxList As New List(Of String)
Public RunningDownloads As Integer = 0
@ -70,8 +67,11 @@ Public Class Main
Public MergeSubsFormat As String = "mov_text"
Public DlSoftSubsRDY As Boolean = True
Public DialogTaskString As String
Dim NewAPIString1 As String
Dim NewAPIString2 As String
Public IgnoreErrorDia As Boolean = False
'Dim NewAPIString1 As String
'Dim NewAPIString2 As String
Dim TTL As Integer = 0
'Public ErrorBrowserBackString As String
Public RunningQueue As Boolean = False
@ -109,7 +109,6 @@ Public Class Main
Public GeckoLogFile As String = Nothing
Dim SoftSubsString As String
Dim CR_Unlock_Error As String
Public Startseite As String = "https://www.crunchyroll.com/"
Dim SubSprache2 As String
'Dim URL_DL As String
'Dim Pfad_DL As String
@ -128,7 +127,9 @@ Public Class Main
Public WebbrowserText As String = Nothing
Public WebbrowserTitle As String = Nothing
Public WebbrowserCookie As String = Nothing
Public UserQueue As Boolean = False
Public UserBowser As Boolean = False
Public BowserWasOpen As Boolean = False
Public HybridMode As Boolean = False
@ -214,19 +215,6 @@ Public Class Main
Btn_add.Image = My.Resources.main_add
End Sub
Private Sub Btn_Browser_MouseEnter(sender As Object, e As EventArgs) Handles Btn_Browser.MouseEnter, Btn_Browser.GotFocus
If Manager.Theme = MetroThemeStyle.Dark Then
Btn_Browser.Image = My.Resources.main_browser_invert_dark
Else
Btn_Browser.Image = My.Resources.main_browser_invert
End If
End Sub
Private Sub Btn_Browser_MouseLeave(sender As Object, e As EventArgs) Handles Btn_Browser.MouseLeave, Btn_Browser.LostFocus
Btn_Browser.Image = My.Resources.main_browser
End Sub
Private Sub Btn_Settings_MouseEnter(sender As Object, e As EventArgs) Handles Btn_Settings.MouseEnter, Btn_Settings.GotFocus
If Manager.Theme = MetroThemeStyle.Dark Then
Btn_Settings.Image = My.Resources.main_setting_invert_dark
@ -313,8 +301,8 @@ Public Class Main
TheTextBox.Width = Me.Width - 2
Btn_Close.Location = New Point(Me.Width - 36, 1)
Btn_min.Location = New Point(Me.Width - 67, 1)
Btn_Settings.Location = New Point(Me.Width - 165, 17)
Btn_Queue.Location = New Point(Me.Width - 265, 17)
Btn_Settings.Location = New Point(Me.Width - 200, 17)
'Btn_Queue.Location = New Point(Me.Width - 265, 17)
Try
Panel1.AutoScrollPosition = New Point(0, 0)
@ -386,6 +374,10 @@ Public Class Main
Private Sub Main_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If CBool(InStr(Assembly.GetExecutingAssembly().CodeBase, "Auto_Updated.exe")) Then
Pause(3)
End If
FillArray()
#Region "settings path"
@ -463,9 +455,6 @@ Public Class Main
DefaultSubCR = My.Settings.DefaultSubCR
Startseite = My.Settings.Startseite
UseQueue = My.Settings.QueueMode
KodiNaming = My.Settings.KodiSupport
@ -586,7 +575,7 @@ Public Class Main
RetryWithCachedFiles()
'MsgBox(Curl_insecure.ToString)
BGW_Update.RunWorkerAsync()
End Sub
@ -735,7 +724,7 @@ Public Class Main
Catch ex As Exception
RunningDownloads = Panel1.Controls.Count
End Try
If RunningDownloads < MaxDL Then
If RunningDownloads < MaxDL Or My.Settings.HiddenQueue = True Then
Exit For
Else
'MsgBox(e)
@ -1008,7 +997,8 @@ Public Class Main
Dim ObjectsURL As String = "https://www.crunchyroll.com/content/v2/music/music_videos/" + page_guid_1(0) 'Streams.Replace("music/", "music/music_videos/").Replace("/streams", "")
' Changed from https://www.crunchyroll.com/content/v2/music/music_videos/ to https://beta-api.crunchyroll.com/content/v2/music/music_videos/ to avoid cloudflare triggering
Dim ObjectsURL As String = "https://beta-api.crunchyroll.com/content/v2/music/music_videos/" + page_guid_1(0) 'Streams.Replace("music/", "music/music_videos/").Replace("/streams", "")
page_guid = "music/" + page_guid_1(0)
@ -1027,7 +1017,8 @@ Public Class Main
Dim page_guid_0 As String() = WebsiteURL.Split(New String() {"watch/concert/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim page_guid_1 As String() = page_guid_0(1).Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim ObjectsURL As String = "https://www.crunchyroll.com/content/v2/music/concerts/" + page_guid_1(0) 'Streams.Replace("music/", "music/music_videos/").Replace("/streams", "")
' Changed from https://www.crunchyroll.com/content/v2/music/concerts/ to https://beta-api.crunchyroll.com/content/v2/music/concerts/ to avoid cloudflare triggering
Dim ObjectsURL As String = "https://beta-api.crunchyroll.com/content/v2/music/concerts/" + page_guid_1(0) 'Streams.Replace("music/", "music/music_videos/").Replace("/streams", "")
page_guid = "music/" + page_guid_1(0)
@ -1065,11 +1056,7 @@ Public Class Main
ObjectJson = CurlAuthNew(ObjectsURL, Loc_CR_Cookies, Loc_AuthToken)
'Filter JSON esqaped characters
'Debug.WriteLine(Date.Now.ToString + "before:" + ObjectJson)
'Debug.WriteLine("1750: " + ObjectJson)
ObjectJson = CleanJSON(ObjectJson)
'Debug.WriteLine(Date.Now.ToString + "after:" + ObjectJson)
Dim DubsAvalible As New List(Of CR_MediaVersion)
@ -1112,26 +1099,14 @@ Public Class Main
Case "audio_locale"
CR_audio_locale = SubEntry.Value.ToString.Replace(Chr(34), "").Replace("\", "").Replace("/", "").Replace(":", "")
Case "versions" 'each record is inside the entries array
For Each VersionEntry As JObject In item.Values
Dim VersionSubData As List(Of JToken) = SubItem.Value.Item("versions").Children().ToList
Dim VideoSubData As List(Of JToken) = VersionEntry.Children().ToList
Dim guid As String = Nothing
Dim audio_locale As String = Nothing
For Each Version As JToken In VersionSubData
Dim guid As String = Version("guid").Value(Of String)()
Dim audio_locale As String = Version("audio_locale").Value(Of String)()
For Each VideoSubItem As JProperty In VideoSubData
Select Case VideoSubItem.Name
Case "audio_locale"
audio_locale = VideoSubItem.Value.ToString
Case "guid"
guid = VideoSubItem.Value.ToString
'Debug.WriteLine(guid)
End Select
Next
If audio_locale = Nothing Or guid = Nothing Then
Else
DubsAvalible.Add(New CR_MediaVersion(audio_locale, guid))
End If
' Ausgabe der Werte
DubsAvalible.Add(New CR_MediaVersion(audio_locale, guid))
Next
End Select
Next '
@ -1144,13 +1119,18 @@ Public Class Main
#Region "m3u8 suche"
#Region "Check for dub override"
If My.Settings.OverrideDub = True And CR_audio_locale = DubSprache.CR_Value = False Then 'einstellung ein + kein musikvideo oder Konzert
'MsgBox("Trigger on!")
For i As Integer = 0 To DubsAvalible.Count - 1
If DubsAvalible(i).AudioLang = DubSprache.CR_Value Then
page_guid = DubsAvalible(i).guid
Dim ind As Integer = i
page_guid = DubsAvalible(ind).guid
Me.Invoke(New Action(Function() As Object
SetStatusLabel("Status: switch " + CR_audio_locale + "to " + DubsAvalible(ind).AudioLang)
Return Nothing
End Function))
End If
Next
@ -1161,10 +1141,48 @@ Public Class Main
Dim NewAPI As String = "https://cr-play-service.prd.crunchyrollsvc.com/v1/" + page_guid + "/console/switch/play"
Debug.WriteLine("NewAPI: " + NewAPI)
'MsgBox(Loc_AuthToken)
'Dim UserAgent As String = " -H " + Chr(34) + "User-Agent: Crunchyroll/1.8.0 Nintendo Switch/12.3.12.0 UE4/4.27" + Chr(34)
Dim UserAgent As String = Chr(34) + "Crunchyroll/1.8.0 Nintendo Switch/12.3.12.0 UE4/4.27" + Chr(34)
Dim NewAPIData As String = CurlAuthNew(NewAPI, "", Loc_AuthToken)
Dim NewAPIData As String = CurlAuthNew(NewAPI, "", Loc_AuthToken, False, UserAgent)
'Debug.WriteLine("NewAPIData: " + NewAPIData)
If CBool(InStr(NewAPIData, "HTTP Status: 420")) Then '
Me.Invoke(New Action(Function() As Object
SetStatusLabel("Stream limit reached - Bypassing")
Return Nothing
End Function))
'page_guid NewAPIData
Dim OldToCancel_0 As String() = NewAPIData.Split(New String() {Chr(34) + "token" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) '
Dim OldToCancel_1 As String() = OldToCancel_0(1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) '
Dim OldToCancel As String = OldToCancel_1(0)
Dim OldPage_0 As String() = NewAPIData.Split(New String() {Chr(34) + "contentId" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) '
Dim OldPage_1 As String() = OldPage_0(1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) '
Dim OldPage As String = OldPage_1(0)
CurlDeleteNew("https://cr-play-service.prd.crunchyrollsvc.com/v1/token/" + OldPage + "/" + OldToCancel, Loc_AuthToken)
Debug.WriteLine("Error 420 - delete old Token: " + OldToCancel + " for " + OldPage)
Pause(3)
NewAPIData = CurlAuthNew(NewAPI, "", Loc_AuthToken, False, UserAgent)
End If
If CBool(InStr(NewAPIData, "HTTP Status: 420")) Then
Me.Invoke(New Action(Function() As Object
SetStatusLabel("Bypassing failed")
Return Nothing
End Function))
Throw New System.Exception("Error - Getting" + vbNewLine + "Error 420")
End If
Dim VideoJSON_New As String = CleanJSON(NewAPIData)
@ -1230,12 +1248,18 @@ Public Class Main
CR_URI_Master.AddRange(RawStream)
ElseIf CR_URI_Master.Count = 0 Then
Dim ListOfStreams As String = ""
For i As Integer = 0 To CR_Streams.Count - 1 'fill back the streams to a string to use it for the error handling
ListOfStreams = ListOfStreams + CR_Streams(i).subLang + ";"
Next
Me.Invoke(New Action(Function() As Object
ResoNotFoundString = VideoJSON_New
ResoNotFoundString = ListOfStreams
DialogTaskString = "Language_CR_Beta"
ErrorDialog.ShowDialog()
Return Nothing
End Function))
If UserCloseDialog = True Then
Throw New System.Exception(Chr(34) + "UserAbort" + Chr(34))
Else
@ -1580,7 +1604,11 @@ Public Class Main
Else
Dim str As String = CurlAuthNew(CR_URI_Master(0), "", Loc_AuthToken)
Dim str0 As String = CurlAuthNew(CR_URI_Master(0), "", Loc_AuthToken)
Dim str1() As String = str0.Split(New String() {""}, System.StringSplitOptions.RemoveEmptyEntries)
Dim str As String = str1(0)
If CBool(InStr(str, "curl:")) = True Or str = Nothing Then
@ -1635,6 +1663,8 @@ Public Class Main
Dim localm3u8 As String = CurlAuthNew(ffmpeg_url_3.Trim(), "", Loc_AuthToken)
Dim localfile As String = Application.StartupPath + "\" + GeräteID2() + ".m3u8"
Dim utf8WithoutBom As New System.Text.UTF8Encoding(False)
@ -1642,7 +1672,7 @@ Public Class Main
sink.WriteLine(localm3u8)
End Using
ffmpegInput = "-allowed_extensions ALL " + "-i " + Chr(34) + localfile + Chr(34)
ffmpegInput = "-protocol_whitelist file,http,https,tcp,tls,crypto,data -allowed_extensions ALL " + "-i " + Chr(34) + localfile + Chr(34) 'add whitelist to the stream input directly #950
End If
@ -1654,6 +1684,19 @@ Public Class Main
#End Region
#Region "Cancel Token"
'page_guid NewAPIData
Dim ToCancel_0 As String() = NewAPIData.Split(New String() {Chr(34) + "token" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) '
Dim ToCancel_1 As String() = ToCancel_0(1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) '
Dim ToCancel As String = ToCancel_1(0)
CurlDeleteNew("https://cr-play-service.prd.crunchyrollsvc.com/v1/token/" + page_guid + "/" + ToCancel, Loc_AuthToken)
Debug.WriteLine("Delete Token: " + ToCancel + " for " + page_guid + " - " + CR_FilenName)
#End Region
#Region "GetSoftsubs"
Dim SoftSubsAvailable As New List(Of String)
'Dim CCAvailable As New List(Of String)
@ -1932,40 +1975,15 @@ Public Class Main
MsgBox(ex.ToString, MsgBoxStyle.Information)
ElseIf CBool(InStr(ex.ToString, "Error - Getting")) Then
MsgBox(ex.ToString)
'If RT_count = 0 Then
' If File.Exists("cookies.txt") = True Then
' MsgBox("Request refused, try a new cookies.txt", MsgBoxStyle.Exclamation)
' Exit Sub
' End If
' Me.Invoke(New Action(Function() As Object
' Anime_Add.StatusLabel.Text = "Browser reset..."
' Me.Text = "Browser reset..."
' ResoBackString = Nothing
' Me.Invalidate()
' Return Nothing
' End Function))
Dim OutputBody() As String = ex.ToString.Split(New String() {"HTTP Status:"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim Output As String = OutputBody(0)
Dim Status As String = OutputBody(1)
Error_msg.ShowErrorDia(Output, "CR returnd : HTTP Status - " + Status)
'MsgBox(ex.ToString)
' If Application.OpenForms().OfType(Of Browser).Any = True Then
' Browser.Close()
' Startseite = WebsiteURL
' Pause(5)
' UserBowser = False
' Browser.Show()
' 'Anime_Add.btn_dl.Cursor = Cursors.Default
' 'Anime_Add.btn_dl.BackgroundImage = My.Resources.main_button_download_default
' End If
' 'Navigate(WebsiteURL)
' 'Pause(5)
' 'LoadBrowser(WebsiteURL, 1)
' Exit Sub
'End If
' MsgBox(ex.ToString)
' b = False
' Navigate(WebsiteURL)
Else
MsgBox(ex.ToString, MsgBoxStyle.Information)
Error_msg.ShowErrorDia(ex.ToString, "Unknown Error - See details", False)
'MsgBox(ex.ToString, MsgBoxStyle.Information)
End If
End Try '
End Sub
@ -2122,13 +2140,13 @@ Public Class Main
Private Sub Btn_add_Click(sender As Object, e As EventArgs) Handles Btn_add.Click
If File.Exists("cookies.txt") = False Then
If Application.OpenForms().OfType(Of Browser).Any = True Then
Else
UserBowser = False
Browser.Show()
End If
End If
'If File.Exists("cookies.txt") = False Then
' If Application.OpenForms().OfType(Of Browser).Any = True Then
' Else
' UserBowser = False
' Browser.Show()
' End If
'End If
If Anime_Add.WindowState = System.Windows.Forms.FormWindowState.Minimized Then
Anime_Add.WindowState = System.Windows.Forms.FormWindowState.Normal
@ -2177,24 +2195,6 @@ Public Class Main
End If
End Sub
Private Sub Btn_Browser_Click(sender As Object, e As EventArgs) Handles Btn_Browser.Click
'Dim Teststring As String = TheTextBox.Text
'TheTextBox.Text = AddScaledBorderAndShadow(Teststring)
'Exit Sub
'Debug.WriteLine(Date.Now.ToString + "." + Date.Now.Millisecond.ToString)
UserBowser = True
If Application.OpenForms().OfType(Of Browser).Any = True Then
Browser.Location = Me.Location
Else
Browser.Location = Me.Location
Browser.Show()
End If
End Sub
Public Function RemoveExtraSpaces(input_text As String) As String
Dim rsRegEx As System.Text.RegularExpressions.Regex
rsRegEx = New System.Text.RegularExpressions.Regex("\s+")
@ -2262,65 +2262,12 @@ Public Class Main
#Region "process html"
Public Sub ProcessHTML(ByVal document As String, ByVal Address As String, ByVal DocumentTitle As String)
Dim localHTML As String = document
Debug.WriteLine(Date.Now.ToString + "." + Date.Now.Millisecond.ToString)
Debug.WriteLine(Address)
If b = True Then
LoadedUrls.Clear()
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
End If
'End If
End Sub
#End Region
Public Sub Navigate(ByVal Url As String)
If Application.OpenForms().OfType(Of Browser).Any = True Then
If InvokeRequired = True Then
Me.Invoke(New Action(Function() As Object
Browser.WebView2.CoreWebView2.Navigate(Url)
Return Nothing
End Function))
Else
Browser.WebView2.CoreWebView2.Navigate(Url)
End If
Else
If InvokeRequired = True Then
Me.Invoke(New Action(Function() As Object
Browser.Show()
Browser.WebView2.CoreWebView2.Navigate(Url)
Return Nothing
End Function))
Else
Browser.Show()
Browser.WebView2.CoreWebView2.Navigate(Url)
End If
End If
End Sub
#Region "server"
Dim ListOfThread As New List(Of Thread)
Sub ServerStart()
Dim server As TcpListener
server = Nothing
System.Threading.Thread.Sleep(5000)
Try
Dim Port As String = StartServer.ToString
Dim localAddr As IPAddress = IPAddress.Parse("127.0.0.1")
@ -2716,26 +2663,6 @@ Public Class Main
Trackbar.ShowDialog()
End Sub
Private Sub MsgBoxToolStripMenuItem_Click(sender As Object, e As EventArgs)
MsgBox(LoadedUrls.Count.ToString)
For i As Integer = 0 To LoadedUrls.Count - 1
MsgBox(LoadedUrls(i))
Next
End Sub
Private Sub CRCookieToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles CRCookieToolStripMenuItem.Click
'MsgBox(Curl(InputBox("test", "test")))
'For i As Integer = 0 To CookieList.Count - 1
'Next
MsgBox(CookieList.Count.ToString)
'MsgBox(CR_Cookies)
End Sub
Private Sub ItemBoundsToolStripMenuItem_Click(sender As Object, e As EventArgs)
Try
@ -2868,20 +2795,28 @@ Public Class Main
End Sub
Private Sub Btn_Queue_Click(sender As Object, e As EventArgs) Handles Btn_Queue.Click
If File.Exists("cookies.txt") = False Then
If Application.OpenForms().OfType(Of Browser).Any = True Then
Else
UserBowser = False
Browser.Show()
End If
End If
If Queue.WindowState = System.Windows.Forms.FormWindowState.Minimized Then
Queue.WindowState = System.Windows.Forms.FormWindowState.Normal
UserQueue = True
If Application.OpenForms().OfType(Of Queue).Any = True Then
Queue.Location = New Point(CInt(Me.Location.X + Me.Width / 2 - Queue.Width / 2), CInt(Me.Location.Y + Me.Height / 2 - Queue.Height / 2))
If Queue.WindowState = System.Windows.Forms.FormWindowState.Minimized Then
Queue.WindowState = System.Windows.Forms.FormWindowState.Normal
Queue.ShowInTaskbar = True
End If
Else
Queue.Location = New Point(CInt(Me.Location.X + Me.Width / 2 - Queue.Width / 2), CInt(Me.Location.Y + Me.Height / 2 - Queue.Height / 2))
Queue.Show()
End If
Try
Dim hwnd As IntPtr = FindWindow(Nothing, Queue.Text)
SetForegroundWindow(hwnd)
Catch ex As Exception
Debug.WriteLine("Queue foreground failure")
End Try
End Sub
@ -2895,9 +2830,8 @@ Public Class Main
LoadingUrl = Url
LoadedUrls.Clear()
Dim NoBrowser As Boolean = False
WebbrowserURL = Url
'CR_v1Token = "Get"
'Browser.WebView2.Source = New Uri(Url)
@ -2908,91 +2842,36 @@ Public Class Main
#Region "Get Cookies"
'CR_Cookies = "Cookie: "
''MsgBox("Cookies")
'If File.Exists("cookies.txt") = True Then
' CR_Cookies = GetCookiesFromFile("crunchyroll.com")
' NoBrowser = True
' CrBetaBasic = "Basic bm9haWhkZXZtXzZpeWcwYThsMHE6"
' 'MsgBox(True.ToString)
'Else
' Browser.GetCookies(Url)
' Debug.WriteLine(CookieList.Count.ToString)
' If CookieList.Count = 0 Then
' Browser.WebView2.CoreWebView2.Navigate(Url)
' SetStatusLabel("Status: loading in browser...")
' Me.Text = "Status: loading in browser..."
' Exit Sub
' End If
#Region "Get local"
If CBool(InStr(Url, "/series")) Then
Dim locale1() As String = Url.Split(New String() {"crunchyroll.com/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim locale2() As String = locale1(1).Split(New String() {"/series"}, System.StringSplitOptions.RemoveEmptyEntries)
locale = Convert_locale(locale2(0))
If locale = "en-US" Then
Url_locale = ""
Else
Url_locale = locale2(0)
End If
' For i As Integer = 0 To CookieList.Count - 1
ElseIf CBool(InStr(Url, "/watch")) Then
Dim locale1() As String = Url.Split(New String() {"crunchyroll.com/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim locale2() As String = locale1(1).Split(New String() {"/watch"}, System.StringSplitOptions.RemoveEmptyEntries)
'MsgBox(locale2(0))
' If CBool(InStr(CookieList.Item(i).Domain, ".crunchyroll.com")) And CBool(InStr(CookieList.Item(i).Name, "_evidon_suppress")) = False Then
' CR_Cookies = CR_Cookies + CookieList.Item(i).Name + "=" + CookieList.Item(i).Value + ";"
' End If
' Next
'End If
''MsgBox(Main.CR_Cookies)
'Dim DeviceRegion As String = Nothing
'If CBool(InStr(Url, "/series")) Then
' Dim locale1() As String = Url.Split(New String() {"crunchyroll.com/"}, System.StringSplitOptions.RemoveEmptyEntries)
' Dim locale2() As String = locale1(1).Split(New String() {"/series"}, System.StringSplitOptions.RemoveEmptyEntries)
' locale = Convert_locale(locale2(0))
' If locale = "en-US" Then
' Url_locale = ""
' Else
' Url_locale = locale2(0)
' End If
locale = Convert_locale(locale2(0))
'End If
If locale = "en-US" Then
Url_locale = ""
Else
Url_locale = locale2(0)
End If
'ElseIf CBool(InStr(Url, "/watch")) Then
' Dim locale1() As String = Url.Split(New String() {"crunchyroll.com/"}, System.StringSplitOptions.RemoveEmptyEntries)
' Dim locale2() As String = locale1(1).Split(New String() {"/watch"}, System.StringSplitOptions.RemoveEmptyEntries)
' 'MsgBox(locale2(0))
' locale = Convert_locale(locale2(0))
' 'End If
' If locale = "en-US" Then
' Url_locale = ""
' Else
' Url_locale = locale2(0)
' End If
' 'If CBool(InStr(Url, "musicvideo/")) Then
' ' SetStatusLabel("Status: musicvideo detected - partial support only")
' ' Browser.WebView2.CoreWebView2.Navigate(Url)
' ' Exit Sub
' 'Else
' 'If CBool(InStr(Url, "/concert/")) Then
' ' SetStatusLabel("Status: concert detected - partial support only")
' ' Browser.WebView2.CoreWebView2.Navigate(Url)
' ' Exit Sub
' ' End If
End If
'End If
''Debug.WriteLine("###" + CR_Cookies + "###")
'Dim Loc_CR_Cookies = " -H " + Chr(34) + CR_Cookies + Chr(34)
''CR_v1Token = "Get"
''Browser.WebView2.Source = New Uri(Url)
''Exit Sub
#End Region
@ -3026,17 +2905,18 @@ Public Class Main
Dim Auth2 As String = " -H " + Chr(34) + "Authorization: " + CRBetaBearer + CR_Token.access_token + Chr(34)
ProcessLoading(Url, Auth2, Loc_CR_Cookies, RT_count)
Else
Dim v1Token As String = CurlPost("https://www.crunchyroll.com/auth/v1/token", Loc_CR_Cookies, Auth, Post, "add_main_4494")
If CBool(InStr(v1Token, "curl:")) = True And CBool(InStr(v1Token, "401")) = True Then
MsgBox("CR reported error 401, this may mean incorrect login detail, please try again.", MsgBoxStyle.Exclamation, "CR-Error 401")
Dim v1Token As String = CurlPost("https://beta-api.crunchyroll.com/auth/v1/token", Loc_CR_Cookies, Auth, Post, "add_main_4494")
MsgBox(v1Token)
If CBool(InStr(v1Token, "HTTP Status: 401")) = True Then
MsgBox("CR reported :" + vbNewLine + v1Token, MsgBoxStyle.Exclamation, "CR-Error 401")
LoginForm.ShowDialog()
Exit Sub
End If
If CBool(InStr(v1Token, "curl:")) = True And CBool(InStr(v1Token, "400")) = True Then
MsgBox("CR reported error 400, idk why tbh", MsgBoxStyle.Exclamation, "CR-Error 400")
SetStatusLabel("Status: Unknown error. #3038")
If CBool(InStr(v1Token, "HTTP Status: 400")) = True Then
'MsgBox("CR reported error 400, idk why tbh", MsgBoxStyle.Exclamation, "CR-Error 400")
'SetStatusLabel("Status: Unknown error. #3038")
MsgBox("CR reported :" + vbNewLine + v1Token, MsgBoxStyle.Exclamation, "CR-Error 400")
Exit Sub
End If
@ -3084,8 +2964,8 @@ Public Class Main
Dim SeriesUrlBuilder() As String = url.Split(New String() {"series/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim SeriesUrlBuilder2() As String = SeriesUrlBuilder(1).Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim SeriesUrl As String = "https://www.crunchyroll.com/content/v2/cms/series/" + SeriesUrlBuilder2(0) + "/seasons?preferred_audio_language=" + DubSprache.CR_Value + "&locale=" + locale '+ "&Signature=" + signature2(0) + "&Policy=" + policy2(0) + "&Key-Pair-Id=" + key_pair_id2(0)
' Changed from https://www.crunchyroll.com/content/v2/cms/series/ to https://beta-api.crunchyroll.com/content/v2/cms/series/ to avoid cloudflare triggering
Dim SeriesUrl As String = "https://beta-api.crunchyroll.com/content/v2/cms/series/" + SeriesUrlBuilder2(0) + "/seasons?preferred_audio_language=" + DubSprache.CR_Value + "&locale=" + locale '+ "&Signature=" + signature2(0) + "&Policy=" + policy2(0) + "&Key-Pair-Id=" + key_pair_id2(0)
Debug.WriteLine(SeriesUrl)
'MsgBox(SeriesUrl)
GetBetaSeasons(url, SeriesUrl, Auth2)
@ -3103,8 +2983,8 @@ Public Class Main
Dim ObjectsURLBuilder4() As String = ObjectsURLBuilder3(1).Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
ObjectsUrl = "https://www.crunchyroll.com/content/v2/cms/objects/" + ObjectsURLBuilder4(0) + "?preferred_audio_language=" + DubSprache.CR_Value + "&locale=" + locale
' Changed from https://www.crunchyroll.com/content/v2/cms/objects/ to https://beta-api.crunchyroll.com/content/v2/cms/objects/ to avoid cloudflare triggering
ObjectsUrl = "https://beta-api.crunchyroll.com/content/v2/cms/objects/" + ObjectsURLBuilder4(0) + "?preferred_audio_language=" + DubSprache.CR_Value + "&locale=" + locale
'End Using
'MsgBox(ObjectsUrl)
@ -3121,28 +3001,26 @@ Public Class Main
ObjectJson = CurlAuthNew(ObjectsUrl, Loc_CR_Cookies, Auth2)
Catch ex As Exception
Error_msg.ShowErrorDia(ex.ToString, "Status: Error getting ObjectJson", True)
If CBool(InStr(ex.ToString, "Error - Getting")) Then
MsgBox("Error invalid CR respone")
Exit Sub
Else
MsgBox("Error processing data")
Exit Sub
End If
'MsgBox(ex.ToString)
Exit Sub
End Try
If CBool(InStr(ObjectJson, "videos/")) = False Then
'MsgBox(ObjectJson)
If CBool(InStr(ObjectJson, "curl:")) = True Then
Browser.WebView2.CoreWebView2.Navigate(url)
Exit Sub
ElseIf CBool(InStr(ObjectJson, "videos/")) = False Then
Error_msg.ShowErrorDia(ObjectJson, "Status: Failed - no video, check CR login", True)
SetStatusLabel("Status: Failed - no video, check CR login")
Me.Text = "Status: Failed - no video, check CR login"
Debug.WriteLine("Status: Failed - no video, check CR login")
'Debug.WriteLine("Status: Failed - no video, check CR login")
If IgnoreErrorDia = True Then
IgnoreErrorDia = False
Else
Exit Sub
End If
Exit Sub
End If
Try
@ -3158,7 +3036,7 @@ Public Class Main
' Debug.WriteLine(StreamsUrl)
Catch ex As Exception
Browser.WebView2.CoreWebView2.Navigate(url)
Error_msg.ShowErrorDia(ex.ToString, "Status: Processing Error", True)
Exit Sub
End Try
@ -3174,8 +3052,8 @@ Public Class Main
Dim ObjectsURLBuilder4() As String = ObjectsURLBuilder3(1).Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
ObjectsUrl = "https://www.crunchyroll.com/content/v2/music/music_videos/" + ObjectsURLBuilder4(0) + "?locale=" + locale
' Changed from https://www.crunchyroll.com/content/v2/music/music_videos/ to https://beta-api.crunchyroll.com/content/v2/music/music_videos/ to avoid cloudflare triggering
ObjectsUrl = "https://beta-api.crunchyroll.com/content/v2/music/music_videos/" + ObjectsURLBuilder4(0) + "?locale=" + locale
Debug.WriteLine("ObjectsUrl: " + ObjectsUrl)
@ -3212,8 +3090,8 @@ Public Class Main
Dim StreamsUrlBuilder() As String = ObjectJson.Split(New String() {"/content/v2/music/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim StreamsUrlBuilder2() As String = StreamsUrlBuilder(1).Split(New String() {"/streams"}, System.StringSplitOptions.RemoveEmptyEntries)
StreamsUrl = "https://www.crunchyroll.com/content/v2/music/" + StreamsUrlBuilder2(0) + "/streams?locale=" + locale
' Changed from https://www.crunchyroll.com/content/v2/music/ to https://beta-api.crunchyroll.com/content/v2/music/ to avoid cloudflare triggering
StreamsUrl = "https://beta-api.crunchyroll.com/content/v2/music/" + StreamsUrlBuilder2(0) + "/streams?locale=" + locale
GetCRVideoProxy(StreamsUrl, Auth2, url, RT_Count)
@ -3228,8 +3106,8 @@ Public Class Main
Dim ObjectsURLBuilder4() As String = ObjectsURLBuilder3(1).Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
ObjectsUrl = "https://www.crunchyroll.com/content/v2/music/concerts/" + ObjectsURLBuilder4(0) + "?locale=" + locale
' Changed from https://www.crunchyroll.com/content/v2/music/concerts/ to https://beta-api.crunchyroll.com/content/v2/music/concerts/ to avoid cloudflare triggering
ObjectsUrl = "https://beta-api.crunchyroll.com/content/v2/music/concerts/" + ObjectsURLBuilder4(0) + "?locale=" + locale
Debug.WriteLine("ObjectsUrl: " + ObjectsUrl)
@ -3266,8 +3144,8 @@ Public Class Main
Dim StreamsUrlBuilder() As String = ObjectJson.Split(New String() {"/content/v2/music/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim StreamsUrlBuilder2() As String = StreamsUrlBuilder(1).Split(New String() {"/streams"}, System.StringSplitOptions.RemoveEmptyEntries)
StreamsUrl = "https://www.crunchyroll.com/content/v2/music/" + StreamsUrlBuilder2(0) + "/streams?locale=" + locale
' Changed from https://www.crunchyroll.com/content/v2/music/ to https://beta-api.crunchyroll.com/content/v2/music/ to avoid cloudflare triggering
StreamsUrl = "https://beta-api.crunchyroll.com/content/v2/music/" + StreamsUrlBuilder2(0) + "/streams?locale=" + locale
GetCRVideoProxy(StreamsUrl, Auth2, url, RT_Count)
@ -3395,6 +3273,173 @@ Public Class Main
LoginForm.ShowDialog()
End Sub
Private Sub ErrorDiaTestToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ErrorDiaTestToolStripMenuItem.Click
Error_msg.ShowErrorDia("Error-Error", "CR returnd : HTTP Status - " + "400")
End Sub
Private Sub BGW_Update_DoWork(sender As Object, e As DoWorkEventArgs) Handles BGW_Update.DoWork
Try
If My.Settings.UpdateMode = UpdateScope.Skip Then
Exit Sub
End If
Dim client0 As New WebClient
client0.Encoding = Encoding.UTF8
client0.Headers.Add(My.Settings.User_Agend.Replace(Chr(34), ""))
Dim str0 As String = client0.DownloadString("https://api.github.com/repos/hama3254/Crunchyroll-Downloader-v3.0/releases")
Dim GitHubLastIsPre() As String = str0.Split(New String() {Chr(34) + "prerelease" + Chr(34) + ": "}, System.StringSplitOptions.RemoveEmptyEntries)
Dim LastRelase As Integer = 0
Dim PreRelease As Boolean = False
For i As Integer = 1 To GitHubLastIsPre.Count - 1
Dim GitHubLastIsPre1() As String = GitHubLastIsPre(i).Split(New String() {","}, System.StringSplitOptions.RemoveEmptyEntries)
If GitHubLastIsPre1(0) = "false" Or My.Settings.UpdateMode = UpdateScope.Pre Or My.Settings.UpdateMode = UpdateScope.InfoPre Then
If GitHubLastIsPre1(0) = "true" Then
PreRelease = True
End If
LastRelase = i
Exit For
End If
Next
Dim GitHubLastTag() As String = str0.Split(New String() {Chr(34) + "tag_name" + Chr(34) + ": " + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim GitHubLastTag1() As String = GitHubLastTag(LastRelase).Split(New String() {Chr(34) + ","}, System.StringSplitOptions.RemoveEmptyEntries)
'LastVersionString = GitHubLastTag1(0)
'MsgBox(GitHubLastTag1(0))
Dim OnlineVersionNumber As String = GitHubLastTag1(0).Replace("v", "")
'Debug.WriteLine("OnlineVersionNumber: " + OnlineVersionNumber)
Dim OnlineSplitVersion() As String = OnlineVersionNumber.Split(New String() {"."}, System.StringSplitOptions.RemoveEmptyEntries)
Dim LocalSplitVersion() As String = Application.ProductVersion.Split(New String() {"."}, System.StringSplitOptions.RemoveEmptyEntries)
Dim TestLenght As Integer = OnlineSplitVersion.Length
Dim UpdateAv As Boolean = False
If OnlineSplitVersion.Length > LocalSplitVersion.Length Then
TestLenght = LocalSplitVersion.Length
End If
'Debug.WriteLine("TestLenght: " + TestLenght.ToString)
'Debug.WriteLine("OnlineSplitVersion: " + OnlineSplitVersion.ToString)
'Debug.WriteLine("LocalSplitVersion: " + LocalSplitVersion.ToString)
For i As Integer = 0 To TestLenght - 1
If CInt(OnlineSplitVersion(i)) > CInt(LocalSplitVersion(i)) Then
'to update
UpdateAv = True
Exit For
End If
Next
If UpdateAv = False Then 'no update needed
Debug.WriteLine("Update check passed")
Exit Sub
ElseIf UpdateAv = True Then
If My.Settings.UpdateMode = UpdateScope.Info Or My.Settings.UpdateMode = UpdateScope.InfoPre Then 'Infos only
Dim DisplayTest As String = "Update available: v"
If PreRelease = True Then
DisplayTest = "PreRelease available: v"
End If
Me.Invoke(New Action(Function() As Object
Me.Text = DisplayTest + OnlineVersionNumber
Me.Invalidate()
Return Nothing
End Function))
Exit Sub
End If
End If
Debug.WriteLine("Update check failed")
'Check for updated file
If File.Exists(Application.StartupPath + "\Auto_Updated.exe") And CBool(InStr(Assembly.GetExecutingAssembly().CodeBase, "Auto_Updated.exe")) = False Then
'there is an updated file but we are not it
Dim exepath As String = Application.StartupPath + "\" + "Auto_Updated.exe"
Dim startinfo As New System.Diagnostics.ProcessStartInfo
'all parameters required to run the process
startinfo.FileName = exepath
'startinfo.Arguments = cmd
startinfo.UseShellExecute = False
startinfo.WindowStyle = ProcessWindowStyle.Normal
startinfo.RedirectStandardError = True
startinfo.RedirectStandardInput = True
startinfo.RedirectStandardOutput = True
startinfo.CreateNoWindow = True
Dim proc As Process = New Process
proc.StartInfo = startinfo
proc.Start() ' start the process
Me.Invoke(New Action(Function() As Object
Me.Close()
Return Nothing
End Function))
Exit Sub 'do we need that?
ElseIf File.Exists(Application.StartupPath + "\Auto_Updated.exe") And CBool(InStr(Assembly.GetExecutingAssembly().CodeBase, "Auto_Updated.exe")) = True Then
'we are the update and failed the version check?
'if the online exe is tagged different/lower than the release tag we will get a loop (not good)
If My.Settings.UpdateLog = Date.Now.Day.ToString + Date.Now.Month.ToString Then ' is day + month enough ?
Exit Sub
End If
My.Settings.UpdateLog = Date.Now.Day.ToString + Date.Now.Month.ToString
My.Computer.FileSystem.RenameFile(Application.StartupPath + "\Auto_Updated.exe", GeräteID() + ".exe") 'getting rid of the old version like its a temp file
End If
If CBool(InStr(str0, "Auto_Update_" + GitHubLastTag1(0) + ".exe")) Then ' check if i even upoaded the autoupdate
Debug.WriteLine(True.ToString)
Dim UpdateUrl() As String = str0.Split(New String() {"Auto_Update_" + GitHubLastTag1(0) + ".exe"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim UpdateUrl2() As String = UpdateUrl(1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim FinalUrl As String = UpdateUrl2(UpdateUrl2.Length - 1) + "Auto_Update_" + GitHubLastTag1(0) + ".exe"
Debug.WriteLine("Auto-Update: " + FinalUrl)
Debug.WriteLine("Auto-Update: " + Application.StartupPath + "\" + "Auto_Updated.exe")
client0.DownloadFile(FinalUrl, Application.StartupPath + "\" + "Auto_Updated.exe")
Dim exepath As String = Application.StartupPath + "\" + "Auto_Updated.exe"
Dim startinfo As New System.Diagnostics.ProcessStartInfo
'all parameters required to run the process
startinfo.FileName = exepath
'startinfo.Arguments = cmd
startinfo.UseShellExecute = False
startinfo.WindowStyle = ProcessWindowStyle.Normal
startinfo.RedirectStandardError = True
startinfo.RedirectStandardInput = True
startinfo.RedirectStandardOutput = True
startinfo.CreateNoWindow = True
Dim proc As Process = New Process
proc.StartInfo = startinfo
proc.Start() ' start the process
Me.Invoke(New Action(Function() As Object
Me.Close()
Return Nothing
End Function))
Else
Me.Invoke(New Action(Function() As Object
Me.Text = "No Auto-Update possible"
Me.Invalidate()
Return Nothing
End Function))
End If
Catch ex As Exception
Debug.WriteLine(ex.ToString)
End Try
End Sub
#End Region

View File

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

View File

@ -210,6 +210,16 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
'''</summary>
Friend ReadOnly Property error_dis() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("error_dis", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die ;FFMETADATA1
'''

View File

@ -490,4 +490,7 @@ title=Ending</value>
<data name="ffmpeg_OK_cL_hover" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ffmpeg_OK_cL_hover.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="error_dis" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\error_dis.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@ -126,18 +126,6 @@ Namespace My
End Set
End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("https://www.crunchyroll.com/")> _
Public Property Startseite() As String
Get
Return CType(Me("Startseite"),String)
End Get
Set
Me("Startseite") = value
End Set
End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("[default season prefix]")> _
@ -606,6 +594,42 @@ Namespace My
Me("PW") = value
End Set
End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("False")> _
Public Property HiddenQueue() As Boolean
Get
Return CType(Me("HiddenQueue"),Boolean)
End Get
Set
Me("HiddenQueue") = value
End Set
End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("0")> _
Public Property UpdateLog() As String
Get
Return CType(Me("UpdateLog"),String)
End Get
Set
Me("UpdateLog") = value
End Set
End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("0")> _
Public Property UpdateMode() As Integer
Get
Return CType(Me("UpdateMode"),Integer)
End Get
Set
Me("UpdateMode") = value
End Set
End Property
End Class
End Namespace

View File

@ -20,9 +20,6 @@
<Setting Name="TempFolder" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="Startseite" Type="System.String" Scope="User">
<Value Profile="(Default)">https://www.crunchyroll.com/</Value>
</Setting>
<Setting Name="Prefix_S" Type="System.String" Scope="User">
<Value Profile="(Default)">[default season prefix]</Value>
</Setting>
@ -140,5 +137,14 @@
<Setting Name="PW" Type="System.String" Scope="User">
<Value Profile="(Default)">na</Value>
</Setting>
<Setting Name="HiddenQueue" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="UpdateLog" Type="System.String" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="UpdateMode" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@ -0,0 +1,5 @@
[{000214A0-0000-0000-C000-000000000046}]
Prop3=19,11
[InternetShortcut]
IDList=
URL=https://www.vb-paradise.de/index.php/Thread/101710-UserSettingsProvider-Persistieren-von-UserSettings/?pageNo=1&s=21f5b5753290312d4aa7fe7e470f638c5fe2e4aa

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@ -38,6 +38,7 @@ Partial Class Einstellungen
Me.TabPage2 = New MetroFramework.Controls.MetroTabPage()
Me.GroupBox23 = New System.Windows.Forms.GroupBox()
Me.GroupBox18 = New System.Windows.Forms.GroupBox()
Me.CB_HideQueue = New MetroFramework.Controls.MetroCheckBox()
Me.ListViewAdd_True = New MetroFramework.Controls.MetroCheckBox()
Me.GroupBox16 = New System.Windows.Forms.GroupBox()
Me.MetroLabel3 = New MetroFramework.Controls.MetroLabel()
@ -100,9 +101,6 @@ Partial Class Einstellungen
Me.Chb_Ign_tls = New MetroFramework.Controls.MetroCheckBox()
Me.http_support = New MetroFramework.Controls.MetroComboBox()
Me.DarkMode = New MetroFramework.Controls.MetroCheckBox()
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.Label1 = New MetroFramework.Controls.MetroLabel()
Me.TextBox1 = New MetroFramework.Controls.MetroTextBox()
Me.DL_Count_simultaneous = New System.Windows.Forms.GroupBox()
Me.NumericUpDown1 = New System.Windows.Forms.NumericUpDown()
Me.TabControl1 = New MetroFramework.Controls.MetroTabControl()
@ -144,6 +142,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.DD_Update = New MetroFramework.Controls.MetroComboBox()
CType(Me.pictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.GroupBox14.SuspendLayout()
Me.SoftSubs.SuspendLayout()
@ -162,7 +161,6 @@ Partial Class Einstellungen
Me.GroupBox6.SuspendLayout()
CType(Me.NumericUpDown2, System.ComponentModel.ISupportInitialize).BeginInit()
Me.GroupBox5.SuspendLayout()
Me.GroupBox1.SuspendLayout()
Me.DL_Count_simultaneous.SuspendLayout()
CType(Me.NumericUpDown1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.TabControl1.SuspendLayout()
@ -334,10 +332,10 @@ Partial Class Einstellungen
Me.TabPage2.HorizontalScrollbarBarColor = True
Me.TabPage2.HorizontalScrollbarHighlightOnWheel = False
Me.TabPage2.HorizontalScrollbarSize = 10
Me.TabPage2.Location = New System.Drawing.Point(4, 44)
Me.TabPage2.Location = New System.Drawing.Point(4, 54)
Me.TabPage2.Name = "TabPage2"
Me.TabPage2.Padding = New System.Windows.Forms.Padding(3)
Me.TabPage2.Size = New System.Drawing.Size(501, 519)
Me.TabPage2.Size = New System.Drawing.Size(501, 509)
Me.TabPage2.TabIndex = 1
Me.TabPage2.Text = " Output "
Me.TabPage2.VerticalScrollbarBarColor = True
@ -362,6 +360,7 @@ Partial Class Einstellungen
'GroupBox18
'
Me.GroupBox18.BackColor = System.Drawing.Color.Transparent
Me.GroupBox18.Controls.Add(Me.CB_HideQueue)
Me.GroupBox18.Controls.Add(Me.ListViewAdd_True)
Me.GroupBox18.Font = New System.Drawing.Font("Arial", 9.75!)
Me.GroupBox18.ForeColor = System.Drawing.Color.Black
@ -372,11 +371,22 @@ Partial Class Einstellungen
Me.GroupBox18.TabStop = False
Me.GroupBox18.Text = "Multi-Download"
'
'CB_HideQueue
'
Me.CB_HideQueue.AutoSize = True
Me.CB_HideQueue.FontSize = MetroFramework.MetroCheckBoxSize.Medium
Me.CB_HideQueue.Location = New System.Drawing.Point(328, 21)
Me.CB_HideQueue.Name = "CB_HideQueue"
Me.CB_HideQueue.Size = New System.Drawing.Size(112, 19)
Me.CB_HideQueue.TabIndex = 6
Me.CB_HideQueue.Text = "hidden Queue"
Me.CB_HideQueue.UseSelectable = True
'
'ListViewAdd_True
'
Me.ListViewAdd_True.AutoSize = True
Me.ListViewAdd_True.FontSize = MetroFramework.MetroCheckBoxSize.Medium
Me.ListViewAdd_True.Location = New System.Drawing.Point(119, 25)
Me.ListViewAdd_True.Location = New System.Drawing.Point(40, 21)
Me.ListViewAdd_True.Name = "ListViewAdd_True"
Me.ListViewAdd_True.Size = New System.Drawing.Size(255, 19)
Me.ListViewAdd_True.TabIndex = 5
@ -837,17 +847,16 @@ Partial Class Einstellungen
Me.TabPage1.Controls.Add(Me.GroupBox21)
Me.TabPage1.Controls.Add(Me.GroupBox6)
Me.TabPage1.Controls.Add(Me.GroupBox5)
Me.TabPage1.Controls.Add(Me.GroupBox1)
Me.TabPage1.Controls.Add(Me.DL_Count_simultaneous)
Me.TabPage1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.TabPage1.HorizontalScrollbar = True
Me.TabPage1.HorizontalScrollbarBarColor = True
Me.TabPage1.HorizontalScrollbarHighlightOnWheel = False
Me.TabPage1.HorizontalScrollbarSize = 10
Me.TabPage1.Location = New System.Drawing.Point(4, 44)
Me.TabPage1.Location = New System.Drawing.Point(4, 54)
Me.TabPage1.Name = "TabPage1"
Me.TabPage1.Padding = New System.Windows.Forms.Padding(3)
Me.TabPage1.Size = New System.Drawing.Size(501, 519)
Me.TabPage1.Size = New System.Drawing.Size(501, 509)
Me.TabPage1.TabIndex = 0
Me.TabPage1.Text = " Main "
Me.TabPage1.VerticalScrollbar = True
@ -861,7 +870,7 @@ Partial Class Einstellungen
Me.GroupBox21.Controls.Add(Me.CB_HideSF)
Me.GroupBox21.Font = New System.Drawing.Font("Arial", 9.75!)
Me.GroupBox21.ForeColor = System.Drawing.Color.Black
Me.GroupBox21.Location = New System.Drawing.Point(5, 417)
Me.GroupBox21.Location = New System.Drawing.Point(5, 349)
Me.GroupBox21.Name = "GroupBox21"
Me.GroupBox21.Size = New System.Drawing.Size(490, 67)
Me.GroupBox21.TabIndex = 81
@ -891,7 +900,7 @@ Partial Class Einstellungen
Me.GroupBox6.Controls.Add(Me.NumericUpDown2)
Me.GroupBox6.Font = New System.Drawing.Font("Arial", 9.75!)
Me.GroupBox6.ForeColor = System.Drawing.Color.Black
Me.GroupBox6.Location = New System.Drawing.Point(5, 299)
Me.GroupBox6.Location = New System.Drawing.Point(5, 231)
Me.GroupBox6.Name = "GroupBox6"
Me.GroupBox6.Size = New System.Drawing.Size(490, 112)
Me.GroupBox6.TabIndex = 80
@ -940,14 +949,15 @@ Partial Class Einstellungen
'GroupBox5
'
Me.GroupBox5.BackColor = System.Drawing.Color.Transparent
Me.GroupBox5.Controls.Add(Me.DD_Update)
Me.GroupBox5.Controls.Add(Me.Chb_Ign_tls)
Me.GroupBox5.Controls.Add(Me.http_support)
Me.GroupBox5.Controls.Add(Me.DarkMode)
Me.GroupBox5.Font = New System.Drawing.Font("Arial", 9.75!)
Me.GroupBox5.ForeColor = System.Drawing.Color.Black
Me.GroupBox5.Location = New System.Drawing.Point(5, 179)
Me.GroupBox5.Location = New System.Drawing.Point(5, 85)
Me.GroupBox5.Name = "GroupBox5"
Me.GroupBox5.Size = New System.Drawing.Size(490, 114)
Me.GroupBox5.Size = New System.Drawing.Size(490, 140)
Me.GroupBox5.TabIndex = 70
Me.GroupBox5.TabStop = False
Me.GroupBox5.Text = "Other"
@ -956,7 +966,7 @@ Partial Class Einstellungen
'
Me.Chb_Ign_tls.AutoSize = True
Me.Chb_Ign_tls.FontSize = MetroFramework.MetroCheckBoxSize.Medium
Me.Chb_Ign_tls.Location = New System.Drawing.Point(135, 80)
Me.Chb_Ign_tls.Location = New System.Drawing.Point(242, 43)
Me.Chb_Ign_tls.Name = "Chb_Ign_tls"
Me.Chb_Ign_tls.Size = New System.Drawing.Size(223, 19)
Me.Chb_Ign_tls.TabIndex = 46
@ -972,9 +982,9 @@ Partial Class Einstellungen
Me.http_support.IntegralHeight = False
Me.http_support.ItemHeight = 23
Me.http_support.Items.AddRange(New Object() {"add-on support disabled", "80", "8080"})
Me.http_support.Location = New System.Drawing.Point(214, 25)
Me.http_support.Location = New System.Drawing.Point(242, 90)
Me.http_support.Name = "http_support"
Me.http_support.Size = New System.Drawing.Size(237, 29)
Me.http_support.Size = New System.Drawing.Size(223, 29)
Me.http_support.TabIndex = 45
Me.http_support.UseSelectable = True
'
@ -982,70 +992,13 @@ Partial Class Einstellungen
'
Me.DarkMode.AutoSize = True
Me.DarkMode.FontSize = MetroFramework.MetroCheckBoxSize.Medium
Me.DarkMode.Location = New System.Drawing.Point(41, 30)
Me.DarkMode.Location = New System.Drawing.Point(39, 43)
Me.DarkMode.Name = "DarkMode"
Me.DarkMode.Size = New System.Drawing.Size(135, 19)
Me.DarkMode.TabIndex = 5
Me.DarkMode.Text = "enable dark mode"
Me.DarkMode.UseSelectable = True
'
'GroupBox1
'
Me.GroupBox1.BackColor = System.Drawing.Color.Transparent
Me.GroupBox1.Controls.Add(Me.Label1)
Me.GroupBox1.Controls.Add(Me.TextBox1)
Me.GroupBox1.Font = New System.Drawing.Font("Arial", 9.75!)
Me.GroupBox1.ForeColor = System.Drawing.Color.Black
Me.GroupBox1.Location = New System.Drawing.Point(5, 85)
Me.GroupBox1.Name = "GroupBox1"
Me.GroupBox1.Size = New System.Drawing.Size(490, 88)
Me.GroupBox1.TabIndex = 60
Me.GroupBox1.TabStop = False
Me.GroupBox1.Text = "Browser Settings"
'
'Label1
'
Me.Label1.FontWeight = MetroFramework.MetroLabelWeight.Regular
Me.Label1.Location = New System.Drawing.Point(6, 20)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(469, 22)
Me.Label1.TabIndex = 2
Me.Label1.Text = "Default Website"
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'TextBox1
'
'
'
'
Me.TextBox1.CustomButton.Image = Nothing
Me.TextBox1.CustomButton.Location = New System.Drawing.Point(445, 1)
Me.TextBox1.CustomButton.Name = ""
Me.TextBox1.CustomButton.Size = New System.Drawing.Size(23, 23)
Me.TextBox1.CustomButton.Style = MetroFramework.MetroColorStyle.Blue
Me.TextBox1.CustomButton.TabIndex = 1
Me.TextBox1.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light
Me.TextBox1.CustomButton.UseSelectable = True
Me.TextBox1.CustomButton.Visible = False
Me.TextBox1.FontSize = MetroFramework.MetroTextBoxSize.Medium
Me.TextBox1.Lines = New String() {"https://www.crunchyroll.com/"}
Me.TextBox1.Location = New System.Drawing.Point(6, 45)
Me.TextBox1.MaxLength = 32767
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.PasswordChar = Global.Microsoft.VisualBasic.ChrW(0)
Me.TextBox1.ScrollBars = System.Windows.Forms.ScrollBars.None
Me.TextBox1.SelectedText = ""
Me.TextBox1.SelectionLength = 0
Me.TextBox1.SelectionStart = 0
Me.TextBox1.ShortcutsEnabled = True
Me.TextBox1.Size = New System.Drawing.Size(469, 25)
Me.TextBox1.TabIndex = 2
Me.TextBox1.Text = "https://www.crunchyroll.com/"
Me.TextBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
Me.TextBox1.UseSelectable = True
Me.TextBox1.WaterMarkColor = System.Drawing.Color.FromArgb(CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer))
Me.TextBox1.WaterMarkFont = New System.Drawing.Font("Segoe UI", 12.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel)
'
'DL_Count_simultaneous
'
Me.DL_Count_simultaneous.BackColor = System.Drawing.Color.Transparent
@ -1081,7 +1034,7 @@ Partial Class Einstellungen
Me.TabControl1.ItemSize = New System.Drawing.Size(86, 50)
Me.TabControl1.Location = New System.Drawing.Point(22, 60)
Me.TabControl1.Name = "TabControl1"
Me.TabControl1.SelectedIndex = 4
Me.TabControl1.SelectedIndex = 0
Me.TabControl1.Size = New System.Drawing.Size(509, 567)
Me.TabControl1.TabIndex = 0
Me.TabControl1.UseSelectable = True
@ -1095,9 +1048,9 @@ Partial Class Einstellungen
Me.MetroTabPage2.HorizontalScrollbarBarColor = True
Me.MetroTabPage2.HorizontalScrollbarHighlightOnWheel = False
Me.MetroTabPage2.HorizontalScrollbarSize = 10
Me.MetroTabPage2.Location = New System.Drawing.Point(4, 44)
Me.MetroTabPage2.Location = New System.Drawing.Point(4, 54)
Me.MetroTabPage2.Name = "MetroTabPage2"
Me.MetroTabPage2.Size = New System.Drawing.Size(501, 519)
Me.MetroTabPage2.Size = New System.Drawing.Size(501, 509)
Me.MetroTabPage2.TabIndex = 8
Me.MetroTabPage2.Text = " Naming "
Me.MetroTabPage2.VerticalScrollbarBarColor = True
@ -1401,9 +1354,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, 54)
Me.MetroTabPage1.Name = "MetroTabPage1"
Me.MetroTabPage1.Size = New System.Drawing.Size(501, 519)
Me.MetroTabPage1.Size = New System.Drawing.Size(501, 509)
Me.MetroTabPage1.TabIndex = 7
Me.MetroTabPage1.Text = " Crunchyroll "
Me.MetroTabPage1.VerticalScrollbarBarColor = True
@ -1644,6 +1597,20 @@ Partial Class Einstellungen
Me.Btn_Save.TabIndex = 9
Me.Btn_Save.UseVisualStyleBackColor = False
'
'DD_Update
'
Me.DD_Update.DropDownHeight = 275
Me.DD_Update.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.DD_Update.FormattingEnabled = True
Me.DD_Update.IntegralHeight = False
Me.DD_Update.ItemHeight = 23
Me.DD_Update.Items.AddRange(New Object() {"Skip Updates", "Notify Only", "Notify Only (Beta Versions)", "Automatic Updates", "Automatic Updates (Beta Versions)"})
Me.DD_Update.Location = New System.Drawing.Point(21, 90)
Me.DD_Update.Name = "DD_Update"
Me.DD_Update.Size = New System.Drawing.Size(215, 29)
Me.DD_Update.TabIndex = 47
Me.DD_Update.UseSelectable = True
'
'Einstellungen
'
Me.ApplyImageInvert = True
@ -1687,7 +1654,6 @@ Partial Class Einstellungen
CType(Me.NumericUpDown2, System.ComponentModel.ISupportInitialize).EndInit()
Me.GroupBox5.ResumeLayout(False)
Me.GroupBox5.PerformLayout()
Me.GroupBox1.ResumeLayout(False)
Me.DL_Count_simultaneous.ResumeLayout(False)
CType(Me.NumericUpDown1, System.ComponentModel.ISupportInitialize).EndInit()
Me.TabControl1.ResumeLayout(False)
@ -1735,7 +1701,6 @@ Partial Class Einstellungen
Friend WithEvents FFMPEG_CommandP4 As ToolStripMenuItem
Friend WithEvents GB_Resolution As GroupBox
Friend WithEvents GroupBox5 As GroupBox
Friend WithEvents GroupBox1 As GroupBox
Friend WithEvents DL_Count_simultaneous As GroupBox
Friend WithEvents NumericUpDown1 As NumericUpDown
Friend WithEvents SoftSubs As GroupBox
@ -1749,7 +1714,6 @@ Partial Class Einstellungen
Friend WithEvents TabPage7 As TabPage
Friend WithEvents PictureBox7 As PictureBox
Friend WithEvents Button1 As Button
Friend WithEvents Label1 As MetroFramework.Controls.MetroLabel
Friend WithEvents Label2 As MetroFramework.Controls.MetroLabel
Public WithEvents Label4 As MetroFramework.Controls.MetroLabel
Public WithEvents Label6 As MetroFramework.Controls.MetroLabel
@ -1766,7 +1730,6 @@ Partial Class Einstellungen
Public WithEvents Label3 As MetroFramework.Controls.MetroLabel
Friend WithEvents MetroLabel1 As MetroFramework.Controls.MetroLabel
Friend WithEvents DarkMode As MetroFramework.Controls.MetroCheckBox
Friend WithEvents TextBox1 As MetroFramework.Controls.MetroTextBox
Friend WithEvents CB_CR_Harsubs As MetroFramework.Controls.MetroComboBox
Public WithEvents LastVersion As MetroFramework.Controls.MetroLabel
Friend WithEvents BackgroundWorker1 As System.ComponentModel.BackgroundWorker
@ -1831,4 +1794,6 @@ Partial Class Einstellungen
Friend WithEvents CB_Mod1 As MetroFramework.Controls.MetroCheckBox
Friend WithEvents CB_vttStyle As MetroFramework.Controls.MetroCheckBox
Friend WithEvents AMD_AV1 As ToolStripMenuItem
Friend WithEvents CB_HideQueue As MetroFramework.Controls.MetroCheckBox
Friend WithEvents DD_Update As MetroFramework.Controls.MetroComboBox
End Class

View File

@ -19,13 +19,14 @@ Public Class Einstellungen
Public CR_SoftSubsTemp As New List(Of String)
Dim TempCheckSubMod1 As Boolean = False
Dim TempVTTStyle As Boolean = False
Dim TempMultiDL As Boolean = False
Private Sub Einstellungen_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Label6.Text = "You have: v" + Application.ProductVersion.ToString '+ " WebView2_Test"
BackgroundWorker1.RunWorkerAsync()
DD_Update.SelectedIndex = My.Settings.UpdateMode
'CR_Anime_Folge = CR_Name_Staffel0_Folge1(1)
'If GitHubLastTag1(0)
@ -34,6 +35,8 @@ Public Class Einstellungen
Manager.Owner = Me
Me.StyleManager = Manager
CB_HideQueue.Checked = My.Settings.HiddenQueue
CB_OverrideDub.Checked = My.Settings.OverrideDub
CB_Cap.Checked = My.Settings.Captions
@ -187,7 +190,7 @@ Public Class Einstellungen
NumericUpDown2.Value = Main.ErrorTolerance
NumericUpDown1.Value = Main.MaxDL
TextBox1.Text = Main.Startseite
Try
@ -295,6 +298,7 @@ Public Class Einstellungen
My.Settings.LeadingZero = LeadingZeroDD.SelectedIndex
My.Settings.OverrideDub = CB_OverrideDub.Checked
My.Settings.Captions = CB_Cap.Checked
My.Settings.UpdateMode = DD_Update.SelectedIndex
If http_support.Text = "add-on support disabled" Then
My.Settings.ServerPort = 0
@ -364,15 +368,9 @@ Public Class Einstellungen
End If
' MsgBox(Name_season.Text)
If CBool(InStr(TextBox1.Text, "https://")) Then
Main.Startseite = TextBox1.Text
My.Settings.Startseite = Main.Startseite
ElseIf TextBox1.Text = Nothing Then
Main.Startseite = "https://www.crunchyroll.com/"
My.Settings.Startseite = Main.Startseite
Else
End If
If DD_Season_Prefix.Text IsNot "[default season prefix]" Then
Main.Season_Prefix = DD_Season_Prefix.Text
My.Settings.Prefix_S = Main.Season_Prefix
@ -545,14 +543,10 @@ Public Class Einstellungen
Main.ErrorTolerance = CInt(NumericUpDown2.Value)
My.Settings.ErrorTolerance = Main.ErrorTolerance
If ListViewAdd_True.Checked = True Then
Main.UseQueue = True
My.Settings.QueueMode = Main.UseQueue
ElseIf ListViewAdd_True.Checked = False Then
Main.UseQueue = False
My.Settings.QueueMode = Main.UseQueue
End If
Main.UseQueue = ListViewAdd_True.Checked
My.Settings.QueueMode = Main.UseQueue
My.Settings.HiddenQueue = CB_HideQueue.Checked
Main.SoftSubs.Clear()
Main.SoftSubs.AddRange(CR_SoftSubsTemp)
@ -697,7 +691,6 @@ Public Class Einstellungen
DL_Count_simultaneous.ForeColor = color
GB_Resolution.ForeColor = color
GB_Filename_Pre.ForeColor = color
GroupBox1.ForeColor = color
GroupBox2.ForeColor = color
GroupBox3.ForeColor = color
GroupBox4.ForeColor = color
@ -967,6 +960,18 @@ Public Class Einstellungen
End If
End Sub
Private Sub CB_HideQueue_CheckedChanged(sender As Object, e As EventArgs) Handles CB_HideQueue.CheckedChanged
If CB_HideQueue.Checked = True Then
TempMultiDL = ListViewAdd_True.Checked
ListViewAdd_True.Checked = True
ListViewAdd_True.Enabled = False
Else
ListViewAdd_True.Checked = TempMultiDL
ListViewAdd_True.Enabled = True
End If
End Sub

View File

@ -1,5 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Web.WebView2" version="1.0.1418.22" targetFramework="net48" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net452" />
</packages>

View File

@ -16,14 +16,22 @@ Public Class Queue
ListBox1.ForeColor = Main.ForeColorValue
bs.DataSource = Main.ListBoxList
ListBox1.DataSource = bs
Me.Icon = My.Resources.icon
Btn_min.Image = Main.MinImg
Btn_Close.Image = Main.CloseImg
Me.StartPosition = 0
If Main.UserQueue = False Then
Me.Location = New Point(-10000, -10000)
'Me.ShowInTaskbar = False
'Me.WindowState = System.Windows.Forms.FormWindowState.Minimized
RunQueue.Checked = True
End If
End Sub
Private Sub Btn_Close_Click(sender As Object, e As EventArgs) Handles Btn_Close.Click
Main.UserQueue = False
Me.Close()
End Sub
@ -44,7 +52,6 @@ Public Class Queue
If Main.ListBoxList.Count <> ListBox1.Items.Count Then
bs.ResetBindings(False)
End If
End Sub
Private Sub Queue_Resize(sender As Object, e As EventArgs) Handles Me.Resize