diff --git a/.vs/Crunchyroll Downloader/v17/.suo b/.vs/Crunchyroll Downloader/v17/.suo index e4be901..bef02c1 100644 Binary files a/.vs/Crunchyroll Downloader/v17/.suo and b/.vs/Crunchyroll Downloader/v17/.suo differ diff --git a/Crunchyroll Downloader/CRD_List_Item.vb b/Crunchyroll Downloader/CRD_List_Item.vb index e3ad064..7bc8a4a 100644 --- a/Crunchyroll Downloader/CRD_List_Item.vb +++ b/Crunchyroll Downloader/CRD_List_Item.vb @@ -59,7 +59,7 @@ Public Class CRD_List_Item Dim PauseTime As Integer = 0 - Dim Threads As Integer = CInt(Environment.ProcessorCount / 2 - 1) + Dim Threads As Integer = Main.HybridThread 'CInt(Environment.ProcessorCount / 2 - 1) #Region "Remove from list" Public Sub DisposeItem(ByVal Dispose As Boolean) diff --git a/Crunchyroll Downloader/Crunchyroll Downloader.vbproj b/Crunchyroll Downloader/Crunchyroll Downloader.vbproj index be6e546..2c0be8d 100644 --- a/Crunchyroll Downloader/Crunchyroll Downloader.vbproj +++ b/Crunchyroll Downloader/Crunchyroll Downloader.vbproj @@ -150,6 +150,12 @@ + + Trackbar.vb + + + Form + True @@ -219,6 +225,9 @@ + + Trackbar.vb + network_scan.vb diff --git a/Crunchyroll Downloader/Main.designer.vb b/Crunchyroll Downloader/Main.designer.vb index e2246ad..b8295cb 100644 --- a/Crunchyroll Downloader/Main.designer.vb +++ b/Crunchyroll Downloader/Main.designer.vb @@ -49,6 +49,7 @@ Partial Class Main Me.CheckCRBetaTokenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.AddonHTMLToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.Timer3OffToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.ThreadCount = New System.Windows.Forms.ToolStripMenuItem() CType(Me.PictureBox5, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.PictureBox6, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.MetroStyleManager1, System.ComponentModel.ISupportInitialize).BeginInit() @@ -182,7 +183,7 @@ Partial Class Main ' 'ContextMenuStrip1 ' - Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToggleDebugModeToolStripMenuItem, Me.OpenSettingsToolStripMenuItem, Me.TestDownloadToolStripMenuItem, Me.CheckCRBetaTokenToolStripMenuItem, Me.AddonHTMLToolStripMenuItem, Me.Timer3OffToolStripMenuItem}) + Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToggleDebugModeToolStripMenuItem, Me.OpenSettingsToolStripMenuItem, Me.TestDownloadToolStripMenuItem, Me.CheckCRBetaTokenToolStripMenuItem, Me.AddonHTMLToolStripMenuItem, Me.Timer3OffToolStripMenuItem, Me.ThreadCount}) Me.ContextMenuStrip1.Name = "ContextMenuStrip1" resources.ApplyResources(Me.ContextMenuStrip1, "ContextMenuStrip1") ' @@ -216,6 +217,11 @@ Partial Class Main Me.Timer3OffToolStripMenuItem.Name = "Timer3OffToolStripMenuItem" resources.ApplyResources(Me.Timer3OffToolStripMenuItem, "Timer3OffToolStripMenuItem") ' + 'ThreadCount + ' + Me.ThreadCount.Name = "ThreadCount" + resources.ApplyResources(Me.ThreadCount, "ThreadCount") + ' 'Main ' Me.ApplyImageInvert = True @@ -270,4 +276,5 @@ Partial Class Main Friend WithEvents CheckCRBetaTokenToolStripMenuItem As ToolStripMenuItem Friend WithEvents AddonHTMLToolStripMenuItem As ToolStripMenuItem Friend WithEvents Timer3OffToolStripMenuItem As ToolStripMenuItem + Friend WithEvents ThreadCount As ToolStripMenuItem End Class diff --git a/Crunchyroll Downloader/Main.resx b/Crunchyroll Downloader/Main.resx index 1a875b0..76ab7bf 100644 --- a/Crunchyroll Downloader/Main.resx +++ b/Crunchyroll Downloader/Main.resx @@ -120,6 +120,13 @@ True + + Link + + + + 818 + Microsoft Sans Serif, 93pt @@ -137,7 +144,6 @@ 840, 546 - 57 @@ -153,12 +159,6 @@ 9 - - Link - - - 818 - True @@ -273,6 +273,24 @@ 842, 630 + + None + + + Flat + + + NoControl + + + 800, 1 + + + 40, 40 + + + 5 + Btn_Close @@ -285,6 +303,24 @@ 1 + + None + + + Flat + + + NoControl + + + 757, 1 + + + 40, 40 + + + 4 + Btn_min @@ -297,6 +333,24 @@ 2 + + Zoom + + + Flat + + + NoControl + + + 641, 18 + + + 80, 35 + + + 3 + Btn_Settings @@ -309,6 +363,21 @@ 3 + + Zoom + + + Flat + + + 124, 18 + + + 80, 35 + + + 2 + Btn_Browser @@ -321,6 +390,24 @@ 4 + + Zoom + + + Flat + + + NoControl + + + 11, 18 + + + 80, 35 + + + 1 + Btn_add @@ -435,6 +522,12 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ThreadCount + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + Main @@ -447,158 +540,53 @@ 877, 17 - - Zoom - - - Flat - - - NoControl - - - 11, 18 - - - 80, 35 - - - 1 - - - Btn_add - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 5 - - - Zoom - - - Flat - - - 124, 18 - - - 80, 35 - - - 2 - - - Btn_Browser - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 4 - - - Zoom - - - Flat - - - NoControl - - - 641, 18 - - - 80, 35 - - - 3 - - - Btn_Settings - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 3 - - - None - - - Flat - - - NoControl - - - 757, 1 - - - 40, 40 - - - 4 - - - Btn_min - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 2 - - - None - - - Flat - - - NoControl - - - 800, 1 - - - 40, 40 - - - 5 - - - Btn_Close - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 1 - 966, 17 + + 233, 22 + + + Toggle Debug Mode + + + 233, 22 + + + Open Settings + + + 233, 22 + + + Check Funimation Token + + + 233, 22 + + + Check CR Beta Token + + + 233, 22 + + + Add-on HTML + + + 233, 22 + + + Timer3 off + + + 233, 22 + + + set hybrid-mode thread count + - 206, 136 + 234, 180 ContextMenuStrip1 @@ -606,40 +594,4 @@ System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 205, 22 - - - Toggle Debug Mode - - - 205, 22 - - - Open Settings - - - 205, 22 - - - Check Funimation Token - - - 205, 22 - - - Check CR Beta Token - - - 205, 22 - - - Add-on HTML - - - 205, 22 - - - Timer3 off - \ No newline at end of file diff --git a/Crunchyroll Downloader/Main.vb b/Crunchyroll Downloader/Main.vb index ea15efb..507bf3c 100644 --- a/Crunchyroll Downloader/Main.vb +++ b/Crunchyroll Downloader/Main.vb @@ -101,6 +101,7 @@ Public Class Main Public SoftSubs As New List(Of String) Public IncludeLangName As Boolean = False Public LangNameType As Integer = 0 + Public HybridThread As Integer = CInt(Environment.ProcessorCount / 2 - 1) Public TempSoftSubs As New List(Of String) Public AbourtList As New List(Of String) Public watingList As New List(Of String) @@ -585,7 +586,11 @@ Public Class Main LangNameType = Integer.Parse(rkg.GetValue("LangNameType").ToString) Catch ex As Exception End Try - + Try + Dim rkg As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\CRDownloader") + HybridThread = Integer.Parse(rkg.GetValue("HybridThread").ToString) + Catch ex As Exception + End Try Try Dim rkg As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\CRDownloader") IgnoreSeason = Integer.Parse(rkg.GetValue("IgnoreS1").ToString) @@ -5322,6 +5327,10 @@ Public Class Main Timer3.Enabled = False End Sub + Private Sub ThreadCount_Click(sender As Object, e As EventArgs) Handles ThreadCount.Click + Trackbar.ShowDialog() + End Sub + #End Region diff --git a/Crunchyroll Downloader/Trackbar.Designer.vb b/Crunchyroll Downloader/Trackbar.Designer.vb new file mode 100644 index 0000000..53f6a2f --- /dev/null +++ b/Crunchyroll Downloader/Trackbar.Designer.vb @@ -0,0 +1,96 @@ + _ +Partial Class Trackbar + Inherits System.Windows.Forms.Form + + 'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen. + _ + 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. + _ + Private Sub InitializeComponent() + Me.Button1 = New System.Windows.Forms.Button() + Me.TrackBar1 = New System.Windows.Forms.TrackBar() + Me.Label1 = New System.Windows.Forms.Label() + Me.Button2 = New System.Windows.Forms.Button() + CType(Me.TrackBar1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SuspendLayout() + ' + 'Button1 + ' + Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Button1.Location = New System.Drawing.Point(260, 120) + Me.Button1.Name = "Button1" + Me.Button1.Size = New System.Drawing.Size(100, 41) + Me.Button1.TabIndex = 0 + Me.Button1.Text = "Applay" + Me.Button1.UseVisualStyleBackColor = True + ' + 'TrackBar1 + ' + Me.TrackBar1.Location = New System.Drawing.Point(12, 23) + Me.TrackBar1.Maximum = 64 + Me.TrackBar1.Minimum = 2 + Me.TrackBar1.Name = "TrackBar1" + Me.TrackBar1.Size = New System.Drawing.Size(431, 45) + Me.TrackBar1.TabIndex = 1 + Me.TrackBar1.Value = 2 + ' + 'Label1 + ' + Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Label1.Location = New System.Drawing.Point(12, 87) + Me.Label1.Name = "Label1" + Me.Label1.Size = New System.Drawing.Size(431, 20) + Me.Label1.TabIndex = 2 + Me.Label1.Text = "Label1" + Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + ' + 'Button2 + ' + Me.Button2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.Button2.Location = New System.Drawing.Point(109, 120) + Me.Button2.Name = "Button2" + Me.Button2.Size = New System.Drawing.Size(100, 41) + Me.Button2.TabIndex = 3 + Me.Button2.Text = "Save" + Me.Button2.UseVisualStyleBackColor = True + ' + 'Trackbar + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(459, 173) + Me.Controls.Add(Me.Button2) + Me.Controls.Add(Me.Label1) + Me.Controls.Add(Me.TrackBar1) + Me.Controls.Add(Me.Button1) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "Trackbar" + Me.Text = "Form1" + CType(Me.TrackBar1, System.ComponentModel.ISupportInitialize).EndInit() + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Friend WithEvents Button1 As Button + Friend WithEvents TrackBar1 As Windows.Forms.TrackBar + Friend WithEvents Label1 As Label + Friend WithEvents Button2 As Button +End Class diff --git a/Crunchyroll Downloader/Trackbar.resx b/Crunchyroll Downloader/Trackbar.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Crunchyroll Downloader/Trackbar.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Crunchyroll Downloader/Trackbar.vb b/Crunchyroll Downloader/Trackbar.vb new file mode 100644 index 0000000..a9de30a --- /dev/null +++ b/Crunchyroll Downloader/Trackbar.vb @@ -0,0 +1,31 @@ +Imports Microsoft.Win32 + +Public Class Trackbar + Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load + If Main.HybridThread > 64 Then + TrackBar1.Value = 64 + ElseIf Main.HybridThread < 2 Then + TrackBar1.Value = 2 + Else + TrackBar1.Value = Main.HybridThread + End If + Label1.Text = "Selecet thread count: " + TrackBar1.Value.ToString + End Sub + + Private Sub TrackBar1_Scroll(sender As Object, e As EventArgs) Handles TrackBar1.Scroll + Label1.Text = "Selecet thread count: " + TrackBar1.Value.ToString + End Sub + + Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click + Main.HybridThread = TrackBar1.Value + End Sub + + Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click + Dim rk As RegistryKey = Registry.CurrentUser.CreateSubKey("Software\CRDownloader") + + Main.HybridThread = TrackBar1.Value + rk.SetValue("HybridThread", TrackBar1.Value, RegistryValueKind.String) + + Me.Close() + End Sub +End Class \ No newline at end of file diff --git a/Crunchyroll Downloader/einstellungen.Designer.vb b/Crunchyroll Downloader/einstellungen.Designer.vb index 3618ae2..2df0c6a 100644 --- a/Crunchyroll Downloader/einstellungen.Designer.vb +++ b/Crunchyroll Downloader/einstellungen.Designer.vb @@ -110,6 +110,7 @@ Partial Class Einstellungen Me.LangNameType_DD = New MetroFramework.Controls.MetroComboBox() Me.CB_SoftSubSettings = New MetroFramework.Controls.MetroComboBox() Me.GB_Filename_Pre = New System.Windows.Forms.GroupBox() + Me.CB_Ignore = New MetroFramework.Controls.MetroComboBox() Me.KodiSupport = New MetroFramework.Controls.MetroToggle() Me.MetroLink1 = New MetroFramework.Controls.MetroLink() Me.GroupBox12 = New System.Windows.Forms.GroupBox() @@ -146,7 +147,8 @@ Partial Class Einstellungen Me.Label5 = New MetroFramework.Controls.MetroLabel() Me.BackgroundWorker1 = New System.ComponentModel.BackgroundWorker() Me.Btn_Save = New System.Windows.Forms.Button() - Me.CB_Ignore = New MetroFramework.Controls.MetroComboBox() + Me.ListC8 = New System.Windows.Forms.ToolStripMenuItem() + Me.ListC9 = New System.Windows.Forms.ToolStripMenuItem() CType(Me.pictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() Me.GroupBox14.SuspendLayout() Me.SoftSubs.SuspendLayout() @@ -580,7 +582,7 @@ Partial Class Einstellungen ' 'FFMPEG_CommandP1 ' - Me.FFMPEG_CommandP1.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ListC1, Me.ListC2, Me.ListC3, Me.ListC4, Me.ListC5, Me.ListC6, Me.ListC7}) + Me.FFMPEG_CommandP1.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ListC1, Me.ListC2, Me.ListC3, Me.ListC4, Me.ListC5, Me.ListC6, Me.ListC7, Me.ListC8, Me.ListC9}) Me.FFMPEG_CommandP1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.FFMPEG_CommandP1.Name = "FFMPEG_CommandP1" Me.FFMPEG_CommandP1.Size = New System.Drawing.Size(63, 20) @@ -1086,7 +1088,7 @@ Partial Class Einstellungen Me.TabControl1.FontWeight = MetroFramework.MetroTabControlWeight.Regular Me.TabControl1.Location = New System.Drawing.Point(22, 60) Me.TabControl1.Name = "TabControl1" - Me.TabControl1.SelectedIndex = 2 + Me.TabControl1.SelectedIndex = 1 Me.TabControl1.Size = New System.Drawing.Size(509, 567) Me.TabControl1.TabIndex = 0 Me.TabControl1.UseSelectable = True @@ -1193,6 +1195,20 @@ Partial Class Einstellungen Me.GB_Filename_Pre.TabStop = False Me.GB_Filename_Pre.Text = "Filename Extras" ' + 'CB_Ignore + ' + Me.CB_Ignore.DropDownHeight = 250 + Me.CB_Ignore.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.CB_Ignore.FormattingEnabled = True + Me.CB_Ignore.IntegralHeight = False + Me.CB_Ignore.ItemHeight = 23 + Me.CB_Ignore.Items.AddRange(New Object() {"[Default] use season numbers", "ignore Season 1", "ignore all season numbers"}) + Me.CB_Ignore.Location = New System.Drawing.Point(248, 21) + Me.CB_Ignore.Name = "CB_Ignore" + Me.CB_Ignore.Size = New System.Drawing.Size(225, 29) + Me.CB_Ignore.TabIndex = 40 + Me.CB_Ignore.UseSelectable = True + ' 'KodiSupport ' Me.KodiSupport.AutoSize = True @@ -1673,19 +1689,17 @@ Partial Class Einstellungen Me.Btn_Save.TabIndex = 9 Me.Btn_Save.UseVisualStyleBackColor = False ' - 'CB_Ignore + 'ListC8 ' - Me.CB_Ignore.DropDownHeight = 250 - Me.CB_Ignore.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.CB_Ignore.FormattingEnabled = True - Me.CB_Ignore.IntegralHeight = False - Me.CB_Ignore.ItemHeight = 23 - Me.CB_Ignore.Items.AddRange(New Object() {"[Default] use season numbers", "ignore Season 1", "ignore all season numbers"}) - Me.CB_Ignore.Location = New System.Drawing.Point(248, 21) - Me.CB_Ignore.Name = "CB_Ignore" - Me.CB_Ignore.Size = New System.Drawing.Size(225, 29) - Me.CB_Ignore.TabIndex = 40 - Me.CB_Ignore.UseSelectable = True + Me.ListC8.Name = "ListC8" + Me.ListC8.Size = New System.Drawing.Size(180, 22) + Me.ListC8.Text = "-c:v h264_qsv" + ' + 'ListC9 + ' + Me.ListC9.Name = "ListC9" + Me.ListC9.Size = New System.Drawing.Size(180, 22) + Me.ListC9.Text = "-c:v hevc_qsv" ' 'Einstellungen ' @@ -1881,4 +1895,6 @@ Partial Class Einstellungen Friend WithEvents MetroLabel3 As MetroFramework.Controls.MetroLabel Friend WithEvents TempTB As MetroFramework.Controls.MetroTextBox Friend WithEvents CB_Ignore As MetroFramework.Controls.MetroComboBox + Friend WithEvents ListC8 As ToolStripMenuItem + Friend WithEvents ListC9 As ToolStripMenuItem End Class diff --git a/Crunchyroll Downloader/einstellungen.resx b/Crunchyroll Downloader/einstellungen.resx index f49b9b4..e809bf5 100644 --- a/Crunchyroll Downloader/einstellungen.resx +++ b/Crunchyroll Downloader/einstellungen.resx @@ -126,9 +126,6 @@ 118, 20 - - 118, 20 - 332, 20