fixes and improvements

fix UI #876
change language text #868
fix integer overflow v4 processing (maybe #872)
This commit is contained in:
hama3254 2024-01-11 22:02:32 +01:00
parent c66a8d21f7
commit 4ee9664b3a
10 changed files with 65 additions and 23 deletions

13
.editorconfig Normal file
View File

@ -0,0 +1,13 @@
[*.vb]
# IDE0059: Unnötige Zuweisung eines Werts.
dotnet_diagnostic.IDE0059.severity = none
# IDE0054: Verbundzuweisung verwenden
dotnet_diagnostic.IDE0054.severity = none
# IDE0017: Initialisierung von Objekten vereinfachen
dotnet_diagnostic.IDE0017.severity = none
# IDE0140: Objekterstellung kann vereinfacht werden
dotnet_diagnostic.IDE0140.severity = none

Binary file not shown.

View File

@ -1,10 +1,15 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15 # Visual Studio Version 17
VisualStudioVersion = 15.0.27703.2035 VisualStudioVersion = 17.6.33815.320
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Crunchyroll Downloader", "Crunchyroll Downloader\Crunchyroll Downloader.vbproj", "{9B604819-2DB7-4BE1-BA43-43BABEBB5EC3}" Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Crunchyroll Downloader", "Crunchyroll Downloader\Crunchyroll Downloader.vbproj", "{9B604819-2DB7-4BE1-BA43-43BABEBB5EC3}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BDF9FC54-2F89-41D3-A506-81319A019CDE}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64 Debug|x64 = Debug|x64

View File

@ -189,12 +189,13 @@ Public Class Anime_Add
Dim Reso As String = "NaN" Dim Reso As String = "NaN"
Dim HardSub As String = "maybe?" Dim HardSub As String = "maybe?"
Dim ThumbnialURL As String = "no" Dim ThumbnialURL As String = "no"
Dim URL_DL As String = textBox1.Text Dim URL_DL As String = "-i " + Chr(34) + textBox1.Text + Chr(34) + " " + Main.ffmpeg_command
Dim Pfad_DL As String = Path.Combine(Main.Pfad, Namep2) Dim Pfad_DL As String = Path.Combine(Main.Pfad, Namep2)
Dim Service As String = "other" Dim Service As String = "other"
MsgBox(URL_DL)
Main.ItemConstructor(NameKomplett, NameP1, NameP2, Reso, HardSub, ThumbnialURL, URL_DL, Pfad_DL, Service) Main.ItemConstructor(NameKomplett, Namep1, Namep2, Reso, HardSub, ThumbnialURL, URL_DL, Chr(34) + Pfad_DL + Chr(34), Service)
ElseIf CBool(InStr(textBox1.Text, "crunchyroll.com")) Or CBool(InStr(textBox1.Text, "funimation.com")) Then ElseIf CBool(InStr(textBox1.Text, "crunchyroll.com")) Or CBool(InStr(textBox1.Text, "funimation.com")) Then

View File

@ -702,7 +702,7 @@ Public Class CRD_List_Item
Dim Zeile2 As String = zeile.Replace("#EXT-X-BYTERANGE:", "") Dim Zeile2 As String = zeile.Replace("#EXT-X-BYTERANGE:", "")
Dim Zeile3() As String = Zeile2.Split(New String() {"@"}, System.StringSplitOptions.RemoveEmptyEntries) Dim Zeile3() As String = Zeile2.Split(New String() {"@"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim CurrentSize As Integer = Integer.Parse(Zeile3(1)) Dim CurrentSize As Long = Long.Parse(Zeile3(1))
Dim NewBytes As Integer = Integer.Parse(Zeile3(0)) Dim NewBytes As Integer = Integer.Parse(Zeile3(0))
Dim File As String = Folder + String.Format("{0:0000}", Count) Dim File As String = Folder + String.Format("{0:0000}", Count)
Dim Evaluator = New Thread(Sub() Me.DownloadTSv4(DownloadFile, File, CurrentSize, NewBytes)) Dim Evaluator = New Thread(Sub() Me.DownloadTSv4(DownloadFile, File, CurrentSize, NewBytes))
@ -743,7 +743,7 @@ Public Class CRD_List_Item
End Function End Function
Private Sub DownloadTSv4(ByVal DL_URL As String, ByVal DL_Pfad As String, ByVal CurrentSize As Integer, ByVal NewBytes As Integer) Private Sub DownloadTSv4(ByVal DL_URL As String, ByVal DL_Pfad As String, ByVal CurrentSize As Long, ByVal NewBytes As Integer)
Dim retryCount As Integer = 3 Dim retryCount As Integer = 3
HybrideLog = HybrideLog + vbNewLine + Date.Now.ToString + ": " + DL_Pfad + " - " + DL_URL + " - " + CurrentSize.ToString HybrideLog = HybrideLog + vbNewLine + Date.Now.ToString + ": " + DL_Pfad + " - " + DL_URL + " - " + CurrentSize.ToString
While CBool(retryCount > 0) While CBool(retryCount > 0)

View File

@ -24,27 +24,47 @@ Partial Class CheckBoxComboBox
Private Sub InitializeComponent() Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container() Me.components = New System.ComponentModel.Container()
Me.Animation = New System.Windows.Forms.Timer(Me.components) Me.Animation = New System.Windows.Forms.Timer(Me.components)
Me.BGP = New MetroFramework.Controls.MetroPanel()
Me.SuspendLayout() Me.SuspendLayout()
' '
'Animation 'Animation
' '
Me.Animation.Interval = 10 Me.Animation.Interval = 10
' '
'BGP
'
Me.BGP.AutoScroll = True
Me.BGP.Dock = System.Windows.Forms.DockStyle.Fill
Me.BGP.HorizontalScrollbar = True
Me.BGP.HorizontalScrollbarBarColor = True
Me.BGP.HorizontalScrollbarHighlightOnWheel = False
Me.BGP.HorizontalScrollbarSize = 10
Me.BGP.Location = New System.Drawing.Point(5, 5)
Me.BGP.Name = "BGP"
Me.BGP.Size = New System.Drawing.Size(310, 317)
Me.BGP.TabIndex = 0
Me.BGP.VerticalScrollbar = True
Me.BGP.VerticalScrollbarBarColor = True
Me.BGP.VerticalScrollbarHighlightOnWheel = False
Me.BGP.VerticalScrollbarSize = 10
'
'CheckBoxComboBox 'CheckBoxComboBox
' '
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None
Me.BorderStyle = MetroFramework.Forms.MetroFormBorderStyle.FixedSingle Me.BorderStyle = MetroFramework.Forms.MetroFormBorderStyle.FixedSingle
Me.ClientSize = New System.Drawing.Size(320, 327) Me.ClientSize = New System.Drawing.Size(320, 327)
Me.ControlBox = False Me.ControlBox = False
Me.Controls.Add(Me.BGP)
Me.DisplayHeader = False Me.DisplayHeader = False
Me.MaximizeBox = False Me.MaximizeBox = False
Me.MinimizeBox = False Me.MinimizeBox = False
Me.Name = "CheckBoxComboBox" Me.Name = "CheckBoxComboBox"
Me.Padding = New System.Windows.Forms.Padding(10, 30, 10, 10) Me.Padding = New System.Windows.Forms.Padding(5, 5, 5, 5)
Me.TextAlign = MetroFramework.Forms.MetroFormTextAlign.Center Me.TextAlign = MetroFramework.Forms.MetroFormTextAlign.Center
Me.ResumeLayout(False) Me.ResumeLayout(False)
End Sub End Sub
Friend WithEvents Animation As Timer Friend WithEvents Animation As Timer
Friend WithEvents BGP As MetroFramework.Controls.MetroPanel
End Class End Class

View File

@ -11,14 +11,15 @@ Public Class CheckBoxComboBox
Dim Manager As New MetroStyleManager Dim Manager As New MetroStyleManager
Dim Dubs As New List(Of MetroCheckBox) Dim Dubs As New List(Of MetroCheckBox)
Dim Subs As New List(Of MetroCheckBox) Dim Subs As New List(Of MetroCheckBox)
Dim MyHeight As Integer = 330 Dim MyHeight As Integer = 300
Private Sub Reso_Load(sender As Object, e As EventArgs) Handles MyBase.Load Private Sub Reso_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Manager.Owner = Me Manager.Owner = Me
Me.StyleManager = Manager Me.StyleManager = Manager
BGP.StyleManager = Manager
Me.Height = 15 Me.Height = 15
Animation.Enabled = True Animation.Enabled = True
BGP.StyleManager.Style = MetroColorStyle.Orange
Me.StyleManager.Style = MetroColorStyle.Orange Me.StyleManager.Style = MetroColorStyle.Orange
If Me.Text = "CR Dub selection" Then If Me.Text = "CR Dub selection" Then
@ -46,7 +47,7 @@ Public Class CheckBoxComboBox
Dubs.Add(Dub) Dubs.Add(Dub)
Me.Controls.Add(Dub) Me.Controls.Add(Dub)
Next Next
MyHeight = (Main.LangValueEnum.Count - 1) * 30 'MyHeight = (Main.LangValueEnum.Count - 1) * 30
ElseIf Me.Text = "CR Sub selection" Then ElseIf Me.Text = "CR Sub selection" Then
@ -57,11 +58,11 @@ Public Class CheckBoxComboBox
SubT.Name = Main.LangValueEnum(i).CR_Value SubT.Name = Main.LangValueEnum(i).CR_Value
SubT.FontSize = MetroCheckBoxSize.SomethingInBetween SubT.FontSize = MetroCheckBoxSize.SomethingInBetween
SubT.TextAlign = ContentAlignment.MiddleCenter SubT.TextAlign = ContentAlignment.MiddleCenter
SubT.SetBounds(2, 30 * Subs.Count + 1, 316, 25) SubT.SetBounds(2, 30 * Subs.Count + 1, 295, 25)
SubT.UseCustomBackColor = True SubT.UseCustomBackColor = True
SubT.UseCustomForeColor = True SubT.UseCustomForeColor = True
SubT.ForeColor = Color.Black SubT.ForeColor = Color.Black
SubT.StyleManager = Manager
AddHandler SubT.MouseEnter, AddressOf ItemMouseEnter AddHandler SubT.MouseEnter, AddressOf ItemMouseEnter
AddHandler SubT.MouseLeave, AddressOf ItemMouseLeave AddHandler SubT.MouseLeave, AddressOf ItemMouseLeave
AddHandler SubT.CheckedChanged, AddressOf ItemCheckedChanged AddHandler SubT.CheckedChanged, AddressOf ItemCheckedChanged
@ -71,10 +72,10 @@ Public Class CheckBoxComboBox
End If End If
Subs.Add(SubT) Subs.Add(SubT)
Me.Controls.Add(SubT) BGP.Controls.Add(SubT)
Next Next
MyHeight = (Main.LangValueEnum.Count - 2) * 30 'MyHeight = 300 '(Main.LangValueEnum.Count - 2) * 30
End If End If
@ -112,9 +113,9 @@ Public Class CheckBoxComboBox
Private Sub CheckBoxComboBox_LocationChanged(sender As Object, e As EventArgs) Handles Me.LocationChanged Private Sub CheckBoxComboBox_LocationChanged(sender As Object, e As EventArgs) Handles Me.LocationChanged
If Me.Text = "CR Dub selection" Then If Me.Text = "CR Dub selection" Then
Me.Location = New Point(Einstellungen.Location.X + 116, Einstellungen.Location.Y + 204) Me.Location = New Point(Einstellungen.Location.X + 116, Einstellungen.Location.Y + 200)
ElseIf Me.Text = "CR Sub selection" Then ElseIf Me.Text = "CR Sub selection" Then
Me.Location = New Point(Einstellungen.Location.X + 116, Einstellungen.Location.Y + 344) Me.Location = New Point(Einstellungen.Location.X + 116, Einstellungen.Location.Y + 340)
End If End If
@ -166,5 +167,4 @@ Public Class CheckBoxComboBox
End If End If
End Sub End Sub
End Class End Class

View File

@ -104,7 +104,7 @@
<WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors> <WarningsAsErrors>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</WarningsAsErrors>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a, processorArchitecture=x86"> <Reference Include="MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a, processorArchitecture=AMD64">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\metroframework-modern-ui\MetroFramework\bin\x64\Debug\MetroFramework.dll</HintPath> <HintPath>..\..\..\metroframework-modern-ui\MetroFramework\bin\x64\Debug\MetroFramework.dll</HintPath>
</Reference> </Reference>
@ -272,6 +272,9 @@
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="..\.editorconfig">
<Link>.editorconfig</Link>
</None>
<None Include="bin\x86\Debug\Lib\chrome_100_percent.pak" /> <None Include="bin\x86\Debug\Lib\chrome_100_percent.pak" />
<None Include="bin\x86\Debug\Lib\chrome_200_percent.pak" /> <None Include="bin\x86\Debug\Lib\chrome_200_percent.pak" />
<None Include="bin\x86\Debug\Lib\icudtl.dat" /> <None Include="bin\x86\Debug\Lib\icudtl.dat" />

View File

@ -4417,11 +4417,11 @@ Public Class Main
LangValueEnum.Add(New NameValuePair("English (India)", "eng", "en-IN", Nothing)) LangValueEnum.Add(New NameValuePair("English (India)", "eng", "en-IN", Nothing))
LangValueEnum.Add(New NameValuePair("తెలుగు", "tel", "te-IN", Nothing)) LangValueEnum.Add(New NameValuePair("తెలుగు (Telegu)", "tel", "te-IN", Nothing))
LangValueEnum.Add(New NameValuePair("हिंदी", "hin", "hi-IN", Nothing)) LangValueEnum.Add(New NameValuePair("हिंदी (Hindi)", "hin", "hi-IN", Nothing))
LangValueEnum.Add(New NameValuePair("தமிழ்", "tam", "ta-IN", Nothing)) LangValueEnum.Add(New NameValuePair("தமிழ் (Tamil)", "tam", "ta-IN", Nothing))
LangValueEnum.Add(New NameValuePair("中文 (中国)", "zho", "zh-CN", Nothing)) LangValueEnum.Add(New NameValuePair("中文 (中国)", "zho", "zh-CN", Nothing))

View File

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