add Dub selection (series download)

simplified season selection by adding a Dub dropdown
added notification for dub override while selecting another dub
added 'en-IN' language
fix ' not found' string to crash ffmpeg due to spaces
This commit is contained in:
hama3254 2024-01-06 14:35:22 +01:00
parent e2444a26b4
commit d2797b4b2e
7 changed files with 508 additions and 378 deletions

Binary file not shown.

View File

@ -23,279 +23,33 @@ Partial Class Anime_Add
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Anime_Add))
Me.groupBox1 = New System.Windows.Forms.GroupBox()
Me.DownloadScope = New MetroFramework.Controls.MetroComboBox()
Me.StatusLabel = New MetroFramework.Controls.MetroLabel()
Me.ComboBox2 = New MetroFramework.Controls.MetroComboBox()
Me.TextBox4 = New MetroFramework.Controls.MetroTextBox()
Me.textBox1 = New MetroFramework.Controls.MetroTextBox()
Me.TextBox2 = New MetroFramework.Controls.MetroTextBox()
Me.groupBox2 = New System.Windows.Forms.GroupBox()
Me.bt_Cancel_mass = New System.Windows.Forms.Button()
Me.comboBox4 = New MetroFramework.Controls.MetroComboBox()
Me.ComboBox1 = New MetroFramework.Controls.MetroComboBox()
Me.comboBox3 = New MetroFramework.Controls.MetroComboBox()
Me.Add_Display = New MetroFramework.Controls.MetroLabel()
Me.Btn_min = New System.Windows.Forms.PictureBox()
Me.Btn_Close = New System.Windows.Forms.PictureBox()
Me.btn_dl = New System.Windows.Forms.Button()
Me.BackgroundWorker1 = New System.ComponentModel.BackgroundWorker()
Me.groupBox1.SuspendLayout()
Me.groupBox2.SuspendLayout()
Me.Add_Display = New MetroFramework.Controls.MetroLabel()
Me.CB_EP0 = New MetroFramework.Controls.MetroComboBox()
Me.CB_Season = New MetroFramework.Controls.MetroComboBox()
Me.CB_EP1 = New MetroFramework.Controls.MetroComboBox()
Me.bt_Cancel_mass = New System.Windows.Forms.Button()
Me.groupBox2 = New System.Windows.Forms.GroupBox()
Me.CB_Dub = New MetroFramework.Controls.MetroComboBox()
Me.TextBox2 = New MetroFramework.Controls.MetroTextBox()
Me.textBox1 = New MetroFramework.Controls.MetroTextBox()
Me.TextBox4 = New MetroFramework.Controls.MetroTextBox()
Me.ComboBox2 = New MetroFramework.Controls.MetroComboBox()
Me.StatusLabel = New MetroFramework.Controls.MetroLabel()
Me.DownloadScope = New MetroFramework.Controls.MetroComboBox()
Me.groupBox1 = New System.Windows.Forms.GroupBox()
Me.TT_Dub = New System.Windows.Forms.ToolTip(Me.components)
CType(Me.Btn_min, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Btn_Close, System.ComponentModel.ISupportInitialize).BeginInit()
Me.groupBox2.SuspendLayout()
Me.groupBox1.SuspendLayout()
Me.SuspendLayout()
'
'groupBox1
'
Me.groupBox1.BackColor = System.Drawing.Color.Transparent
Me.groupBox1.Controls.Add(Me.DownloadScope)
Me.groupBox1.Controls.Add(Me.StatusLabel)
Me.groupBox1.Controls.Add(Me.ComboBox2)
Me.groupBox1.Controls.Add(Me.TextBox4)
Me.groupBox1.Controls.Add(Me.textBox1)
Me.groupBox1.Controls.Add(Me.TextBox2)
Me.groupBox1.Location = New System.Drawing.Point(15, 70)
Me.groupBox1.Name = "groupBox1"
Me.groupBox1.Size = New System.Drawing.Size(720, 280)
Me.groupBox1.TabIndex = 33
Me.groupBox1.TabStop = False
'
'DownloadScope
'
Me.DownloadScope.BackColor = System.Drawing.Color.White
Me.DownloadScope.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.DownloadScope.ForeColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
Me.DownloadScope.FormattingEnabled = True
Me.DownloadScope.ItemHeight = 23
Me.DownloadScope.Items.AddRange(New Object() {"[Default]", "[Merge Audio with existing files]", "[Subtitles only]", "[Audio only (AAC)]"})
Me.DownloadScope.Location = New System.Drawing.Point(18, 190)
Me.DownloadScope.Name = "DownloadScope"
Me.DownloadScope.Size = New System.Drawing.Size(693, 29)
Me.DownloadScope.TabIndex = 39
Me.DownloadScope.UseSelectable = True
'
'StatusLabel
'
Me.StatusLabel.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.StatusLabel.BackColor = System.Drawing.Color.Transparent
Me.StatusLabel.FontSize = MetroFramework.MetroLabelSize.Tall
Me.StatusLabel.FontWeight = MetroFramework.MetroLabelWeight.Regular
Me.StatusLabel.ForeColor = System.Drawing.SystemColors.InactiveCaptionText
Me.StatusLabel.Location = New System.Drawing.Point(18, 228)
Me.StatusLabel.Name = "StatusLabel"
Me.StatusLabel.Size = New System.Drawing.Size(693, 46)
Me.StatusLabel.TabIndex = 38
Me.StatusLabel.Text = "Status: idle"
Me.StatusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'ComboBox2
'
Me.ComboBox2.BackColor = System.Drawing.Color.White
Me.ComboBox2.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.ComboBox2.ForeColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
Me.ComboBox2.FormattingEnabled = True
Me.ComboBox2.ItemHeight = 23
Me.ComboBox2.Location = New System.Drawing.Point(18, 148)
Me.ComboBox2.Name = "ComboBox2"
Me.ComboBox2.Size = New System.Drawing.Size(693, 29)
Me.ComboBox2.Sorted = True
Me.ComboBox2.TabIndex = 37
Me.ComboBox2.UseSelectable = True
'
'TextBox4
'
Me.TextBox4.BackColor = System.Drawing.Color.White
Me.TextBox4.Cursor = System.Windows.Forms.Cursors.Hand
'
'
'
Me.TextBox4.CustomButton.Image = Nothing
Me.TextBox4.CustomButton.Location = New System.Drawing.Point(665, 1)
Me.TextBox4.CustomButton.Name = ""
Me.TextBox4.CustomButton.Size = New System.Drawing.Size(27, 27)
Me.TextBox4.CustomButton.Style = MetroFramework.MetroColorStyle.Blue
Me.TextBox4.CustomButton.TabIndex = 1
Me.TextBox4.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light
Me.TextBox4.CustomButton.UseSelectable = True
Me.TextBox4.CustomButton.Visible = False
Me.TextBox4.FontSize = MetroFramework.MetroTextBoxSize.Medium
Me.TextBox4.ForeColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
Me.TextBox4.Lines = New String() {"Main Directory"}
Me.TextBox4.Location = New System.Drawing.Point(18, 106)
Me.TextBox4.MaxLength = 32767
Me.TextBox4.Name = "TextBox4"
Me.TextBox4.PasswordChar = Global.Microsoft.VisualBasic.ChrW(0)
Me.TextBox4.ReadOnly = True
Me.TextBox4.ScrollBars = System.Windows.Forms.ScrollBars.None
Me.TextBox4.SelectedText = ""
Me.TextBox4.SelectionLength = 0
Me.TextBox4.SelectionStart = 0
Me.TextBox4.ShortcutsEnabled = True
Me.TextBox4.Size = New System.Drawing.Size(693, 29)
Me.TextBox4.TabIndex = 36
Me.TextBox4.TabStop = False
Me.TextBox4.Text = "Main Directory"
Me.TextBox4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
Me.TextBox4.UseSelectable = True
Me.TextBox4.WaterMarkColor = System.Drawing.Color.FromArgb(CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer))
Me.TextBox4.WaterMarkFont = New System.Drawing.Font("Segoe UI", 12.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel)
'
'textBox1
'
Me.textBox1.BackColor = System.Drawing.Color.White
Me.textBox1.Cursor = System.Windows.Forms.Cursors.Hand
'
'
'
Me.textBox1.CustomButton.Image = Nothing
Me.textBox1.CustomButton.Location = New System.Drawing.Point(665, 1)
Me.textBox1.CustomButton.Name = ""
Me.textBox1.CustomButton.Size = New System.Drawing.Size(27, 27)
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.ForeColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
Me.textBox1.Lines = New String() {"URL"}
Me.textBox1.Location = New System.Drawing.Point(18, 22)
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(693, 29)
Me.textBox1.TabIndex = 4
Me.textBox1.TabStop = False
Me.textBox1.Text = "URL"
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)
'
'TextBox2
'
Me.TextBox2.BackColor = System.Drawing.Color.White
Me.TextBox2.Cursor = System.Windows.Forms.Cursors.Hand
'
'
'
Me.TextBox2.CustomButton.Image = Nothing
Me.TextBox2.CustomButton.Location = New System.Drawing.Point(665, 1)
Me.TextBox2.CustomButton.Name = ""
Me.TextBox2.CustomButton.Size = New System.Drawing.Size(27, 27)
Me.TextBox2.CustomButton.Style = MetroFramework.MetroColorStyle.Blue
Me.TextBox2.CustomButton.TabIndex = 1
Me.TextBox2.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light
Me.TextBox2.CustomButton.UseSelectable = True
Me.TextBox2.CustomButton.Visible = False
Me.TextBox2.FontSize = MetroFramework.MetroTextBoxSize.Medium
Me.TextBox2.ForeColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
Me.TextBox2.Lines = New String() {"Use Custom Name"}
Me.TextBox2.Location = New System.Drawing.Point(18, 64)
Me.TextBox2.MaxLength = 32767
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.PasswordChar = Global.Microsoft.VisualBasic.ChrW(0)
Me.TextBox2.ScrollBars = System.Windows.Forms.ScrollBars.None
Me.TextBox2.SelectedText = ""
Me.TextBox2.SelectionLength = 0
Me.TextBox2.SelectionStart = 0
Me.TextBox2.ShortcutsEnabled = True
Me.TextBox2.Size = New System.Drawing.Size(693, 29)
Me.TextBox2.TabIndex = 5
Me.TextBox2.TabStop = False
Me.TextBox2.Text = "Use Custom Name"
Me.TextBox2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
Me.TextBox2.UseSelectable = True
Me.TextBox2.WaterMarkColor = System.Drawing.Color.FromArgb(CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer))
Me.TextBox2.WaterMarkFont = New System.Drawing.Font("Segoe UI", 12.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel)
'
'groupBox2
'
Me.groupBox2.BackColor = System.Drawing.Color.Transparent
Me.groupBox2.Controls.Add(Me.bt_Cancel_mass)
Me.groupBox2.Controls.Add(Me.comboBox4)
Me.groupBox2.Controls.Add(Me.ComboBox1)
Me.groupBox2.Controls.Add(Me.comboBox3)
Me.groupBox2.Controls.Add(Me.Add_Display)
Me.groupBox2.Location = New System.Drawing.Point(15, 70)
Me.groupBox2.Name = "groupBox2"
Me.groupBox2.Size = New System.Drawing.Size(720, 280)
Me.groupBox2.TabIndex = 44
Me.groupBox2.TabStop = False
Me.groupBox2.Visible = False
'
'bt_Cancel_mass
'
Me.bt_Cancel_mass.BackgroundImage = Global.Crunchyroll_Downloader.My.Resources.Resources.add_mass_cancel
Me.bt_Cancel_mass.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
Me.bt_Cancel_mass.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.bt_Cancel_mass.Font = New System.Drawing.Font("Microsoft Sans Serif", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.bt_Cancel_mass.ForeColor = System.Drawing.SystemColors.Control
Me.bt_Cancel_mass.Location = New System.Drawing.Point(159, 231)
Me.bt_Cancel_mass.Name = "bt_Cancel_mass"
Me.bt_Cancel_mass.Size = New System.Drawing.Size(403, 36)
Me.bt_Cancel_mass.TabIndex = 37
Me.bt_Cancel_mass.Text = "Cancel"
Me.bt_Cancel_mass.UseVisualStyleBackColor = True
'
'comboBox4
'
Me.comboBox4.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.comboBox4.FormattingEnabled = True
Me.comboBox4.ItemHeight = 23
Me.comboBox4.Location = New System.Drawing.Point(13, 154)
Me.comboBox4.Name = "comboBox4"
Me.comboBox4.Size = New System.Drawing.Size(693, 29)
Me.comboBox4.TabIndex = 2
Me.comboBox4.UseSelectable = True
'
'ComboBox1
'
Me.ComboBox1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.ComboBox1.FormattingEnabled = True
Me.ComboBox1.ItemHeight = 23
Me.ComboBox1.Location = New System.Drawing.Point(13, 50)
Me.ComboBox1.Name = "ComboBox1"
Me.ComboBox1.Size = New System.Drawing.Size(693, 29)
Me.ComboBox1.TabIndex = 1
Me.ComboBox1.UseSelectable = True
'
'comboBox3
'
Me.comboBox3.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.comboBox3.FormattingEnabled = True
Me.comboBox3.ItemHeight = 23
Me.comboBox3.Location = New System.Drawing.Point(13, 102)
Me.comboBox3.Name = "comboBox3"
Me.comboBox3.Size = New System.Drawing.Size(693, 29)
Me.comboBox3.TabIndex = 1
Me.comboBox3.UseSelectable = True
'
'Add_Display
'
Me.Add_Display.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.Add_Display.BackColor = System.Drawing.Color.Transparent
Me.Add_Display.FontSize = MetroFramework.MetroLabelSize.Tall
Me.Add_Display.FontWeight = MetroFramework.MetroLabelWeight.Regular
Me.Add_Display.ForeColor = System.Drawing.Color.Black
Me.Add_Display.Location = New System.Drawing.Point(20, 228)
Me.Add_Display.Name = "Add_Display"
Me.Add_Display.Size = New System.Drawing.Size(691, 42)
Me.Add_Display.TabIndex = 36
Me.Add_Display.Text = "..."
Me.Add_Display.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'Btn_min
'
Me.Btn_min.BackColor = System.Drawing.Color.Transparent
@ -340,6 +94,267 @@ Partial Class Anime_Add
Me.btn_dl.Text = "Download"
Me.btn_dl.UseVisualStyleBackColor = True
'
'Add_Display
'
Me.Add_Display.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.Add_Display.BackColor = System.Drawing.Color.Transparent
Me.Add_Display.FontSize = MetroFramework.MetroLabelSize.Tall
Me.Add_Display.FontWeight = MetroFramework.MetroLabelWeight.Regular
Me.Add_Display.ForeColor = System.Drawing.Color.Black
Me.Add_Display.Location = New System.Drawing.Point(20, 228)
Me.Add_Display.Name = "Add_Display"
Me.Add_Display.Size = New System.Drawing.Size(691, 52)
Me.Add_Display.TabIndex = 36
Me.Add_Display.Text = "..."
Me.Add_Display.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'CB_EP0
'
Me.CB_EP0.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.CB_EP0.FormattingEnabled = True
Me.CB_EP0.ItemHeight = 23
Me.CB_EP0.Location = New System.Drawing.Point(13, 135)
Me.CB_EP0.Name = "CB_EP0"
Me.CB_EP0.Size = New System.Drawing.Size(693, 29)
Me.CB_EP0.TabIndex = 1
Me.CB_EP0.UseSelectable = True
'
'CB_Season
'
Me.CB_Season.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.CB_Season.FormattingEnabled = True
Me.CB_Season.ItemHeight = 23
Me.CB_Season.Location = New System.Drawing.Point(13, 86)
Me.CB_Season.Name = "CB_Season"
Me.CB_Season.Size = New System.Drawing.Size(693, 29)
Me.CB_Season.TabIndex = 1
Me.CB_Season.UseSelectable = True
'
'CB_EP1
'
Me.CB_EP1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.CB_EP1.FormattingEnabled = True
Me.CB_EP1.ItemHeight = 23
Me.CB_EP1.Location = New System.Drawing.Point(13, 184)
Me.CB_EP1.Name = "CB_EP1"
Me.CB_EP1.Size = New System.Drawing.Size(693, 29)
Me.CB_EP1.TabIndex = 2
Me.CB_EP1.UseSelectable = True
'
'bt_Cancel_mass
'
Me.bt_Cancel_mass.BackgroundImage = Global.Crunchyroll_Downloader.My.Resources.Resources.add_mass_cancel
Me.bt_Cancel_mass.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
Me.bt_Cancel_mass.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.bt_Cancel_mass.Font = New System.Drawing.Font("Microsoft Sans Serif", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.bt_Cancel_mass.ForeColor = System.Drawing.SystemColors.Control
Me.bt_Cancel_mass.Location = New System.Drawing.Point(159, 231)
Me.bt_Cancel_mass.Name = "bt_Cancel_mass"
Me.bt_Cancel_mass.Size = New System.Drawing.Size(403, 36)
Me.bt_Cancel_mass.TabIndex = 37
Me.bt_Cancel_mass.Text = "Cancel"
Me.bt_Cancel_mass.UseVisualStyleBackColor = True
'
'groupBox2
'
Me.groupBox2.BackColor = System.Drawing.Color.Transparent
Me.groupBox2.Controls.Add(Me.CB_Dub)
Me.groupBox2.Controls.Add(Me.bt_Cancel_mass)
Me.groupBox2.Controls.Add(Me.CB_EP1)
Me.groupBox2.Controls.Add(Me.CB_Season)
Me.groupBox2.Controls.Add(Me.CB_EP0)
Me.groupBox2.Controls.Add(Me.Add_Display)
Me.groupBox2.Location = New System.Drawing.Point(15, 60)
Me.groupBox2.Name = "groupBox2"
Me.groupBox2.Size = New System.Drawing.Size(720, 290)
Me.groupBox2.TabIndex = 44
Me.groupBox2.TabStop = False
Me.groupBox2.Visible = False
'
'CB_Dub
'
Me.CB_Dub.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.CB_Dub.FormattingEnabled = True
Me.CB_Dub.ItemHeight = 23
Me.CB_Dub.Location = New System.Drawing.Point(13, 37)
Me.CB_Dub.Name = "CB_Dub"
Me.CB_Dub.Size = New System.Drawing.Size(693, 29)
Me.CB_Dub.TabIndex = 38
Me.CB_Dub.UseSelectable = True
'
'TextBox2
'
Me.TextBox2.BackColor = System.Drawing.Color.White
Me.TextBox2.Cursor = System.Windows.Forms.Cursors.Hand
'
'
'
Me.TextBox2.CustomButton.Image = Nothing
Me.TextBox2.CustomButton.Location = New System.Drawing.Point(665, 1)
Me.TextBox2.CustomButton.Name = ""
Me.TextBox2.CustomButton.Size = New System.Drawing.Size(27, 27)
Me.TextBox2.CustomButton.Style = MetroFramework.MetroColorStyle.Blue
Me.TextBox2.CustomButton.TabIndex = 1
Me.TextBox2.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light
Me.TextBox2.CustomButton.UseSelectable = True
Me.TextBox2.CustomButton.Visible = False
Me.TextBox2.FontSize = MetroFramework.MetroTextBoxSize.Medium
Me.TextBox2.ForeColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
Me.TextBox2.Lines = New String() {"Use Custom Name"}
Me.TextBox2.Location = New System.Drawing.Point(18, 78)
Me.TextBox2.MaxLength = 32767
Me.TextBox2.Name = "TextBox2"
Me.TextBox2.PasswordChar = Global.Microsoft.VisualBasic.ChrW(0)
Me.TextBox2.ScrollBars = System.Windows.Forms.ScrollBars.None
Me.TextBox2.SelectedText = ""
Me.TextBox2.SelectionLength = 0
Me.TextBox2.SelectionStart = 0
Me.TextBox2.ShortcutsEnabled = True
Me.TextBox2.Size = New System.Drawing.Size(693, 29)
Me.TextBox2.TabIndex = 5
Me.TextBox2.TabStop = False
Me.TextBox2.Text = "Use Custom Name"
Me.TextBox2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
Me.TextBox2.UseSelectable = True
Me.TextBox2.WaterMarkColor = System.Drawing.Color.FromArgb(CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer))
Me.TextBox2.WaterMarkFont = New System.Drawing.Font("Segoe UI", 12.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel)
'
'textBox1
'
Me.textBox1.BackColor = System.Drawing.Color.White
Me.textBox1.Cursor = System.Windows.Forms.Cursors.Hand
'
'
'
Me.textBox1.CustomButton.Image = Nothing
Me.textBox1.CustomButton.Location = New System.Drawing.Point(665, 1)
Me.textBox1.CustomButton.Name = ""
Me.textBox1.CustomButton.Size = New System.Drawing.Size(27, 27)
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.ForeColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
Me.textBox1.Lines = New String() {"URL"}
Me.textBox1.Location = New System.Drawing.Point(18, 36)
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(693, 29)
Me.textBox1.TabIndex = 4
Me.textBox1.TabStop = False
Me.textBox1.Text = "URL"
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)
'
'TextBox4
'
Me.TextBox4.BackColor = System.Drawing.Color.White
Me.TextBox4.Cursor = System.Windows.Forms.Cursors.Hand
'
'
'
Me.TextBox4.CustomButton.Image = Nothing
Me.TextBox4.CustomButton.Location = New System.Drawing.Point(665, 1)
Me.TextBox4.CustomButton.Name = ""
Me.TextBox4.CustomButton.Size = New System.Drawing.Size(27, 27)
Me.TextBox4.CustomButton.Style = MetroFramework.MetroColorStyle.Blue
Me.TextBox4.CustomButton.TabIndex = 1
Me.TextBox4.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light
Me.TextBox4.CustomButton.UseSelectable = True
Me.TextBox4.CustomButton.Visible = False
Me.TextBox4.FontSize = MetroFramework.MetroTextBoxSize.Medium
Me.TextBox4.ForeColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
Me.TextBox4.Lines = New String() {"Main Directory"}
Me.TextBox4.Location = New System.Drawing.Point(18, 120)
Me.TextBox4.MaxLength = 32767
Me.TextBox4.Name = "TextBox4"
Me.TextBox4.PasswordChar = Global.Microsoft.VisualBasic.ChrW(0)
Me.TextBox4.ReadOnly = True
Me.TextBox4.ScrollBars = System.Windows.Forms.ScrollBars.None
Me.TextBox4.SelectedText = ""
Me.TextBox4.SelectionLength = 0
Me.TextBox4.SelectionStart = 0
Me.TextBox4.ShortcutsEnabled = True
Me.TextBox4.Size = New System.Drawing.Size(693, 29)
Me.TextBox4.TabIndex = 36
Me.TextBox4.TabStop = False
Me.TextBox4.Text = "Main Directory"
Me.TextBox4.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
Me.TextBox4.UseSelectable = True
Me.TextBox4.WaterMarkColor = System.Drawing.Color.FromArgb(CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer))
Me.TextBox4.WaterMarkFont = New System.Drawing.Font("Segoe UI", 12.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel)
'
'ComboBox2
'
Me.ComboBox2.BackColor = System.Drawing.Color.White
Me.ComboBox2.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.ComboBox2.ForeColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
Me.ComboBox2.FormattingEnabled = True
Me.ComboBox2.ItemHeight = 23
Me.ComboBox2.Location = New System.Drawing.Point(18, 162)
Me.ComboBox2.Name = "ComboBox2"
Me.ComboBox2.Size = New System.Drawing.Size(693, 29)
Me.ComboBox2.Sorted = True
Me.ComboBox2.TabIndex = 37
Me.ComboBox2.UseSelectable = True
'
'StatusLabel
'
Me.StatusLabel.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.StatusLabel.BackColor = System.Drawing.Color.Transparent
Me.StatusLabel.FontSize = MetroFramework.MetroLabelSize.Tall
Me.StatusLabel.FontWeight = MetroFramework.MetroLabelWeight.Regular
Me.StatusLabel.ForeColor = System.Drawing.SystemColors.InactiveCaptionText
Me.StatusLabel.Location = New System.Drawing.Point(18, 235)
Me.StatusLabel.Name = "StatusLabel"
Me.StatusLabel.Size = New System.Drawing.Size(693, 45)
Me.StatusLabel.TabIndex = 38
Me.StatusLabel.Text = "Status: idle"
Me.StatusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'DownloadScope
'
Me.DownloadScope.BackColor = System.Drawing.Color.White
Me.DownloadScope.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.DownloadScope.ForeColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
Me.DownloadScope.FormattingEnabled = True
Me.DownloadScope.ItemHeight = 23
Me.DownloadScope.Items.AddRange(New Object() {"[Default]", "[Merge Audio with existing files]", "[Subtitles only]", "[Audio only (AAC)]"})
Me.DownloadScope.Location = New System.Drawing.Point(18, 204)
Me.DownloadScope.Name = "DownloadScope"
Me.DownloadScope.Size = New System.Drawing.Size(693, 29)
Me.DownloadScope.TabIndex = 39
Me.DownloadScope.UseSelectable = True
'
'groupBox1
'
Me.groupBox1.BackColor = System.Drawing.Color.Transparent
Me.groupBox1.Controls.Add(Me.DownloadScope)
Me.groupBox1.Controls.Add(Me.StatusLabel)
Me.groupBox1.Controls.Add(Me.ComboBox2)
Me.groupBox1.Controls.Add(Me.TextBox4)
Me.groupBox1.Controls.Add(Me.textBox1)
Me.groupBox1.Controls.Add(Me.TextBox2)
Me.groupBox1.Location = New System.Drawing.Point(15, 60)
Me.groupBox1.Name = "groupBox1"
Me.groupBox1.Size = New System.Drawing.Size(720, 290)
Me.groupBox1.TabIndex = 33
Me.groupBox1.TabStop = False
'
'Anime_Add
'
Me.ApplyImageInvert = True
@ -349,36 +364,38 @@ 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)
Me.Text = "Add Video"
Me.TextAlign = MetroFramework.Forms.MetroFormTextAlign.Center
Me.groupBox1.ResumeLayout(False)
Me.groupBox2.ResumeLayout(False)
CType(Me.Btn_min, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Btn_Close, System.ComponentModel.ISupportInitialize).EndInit()
Me.groupBox2.ResumeLayout(False)
Me.groupBox1.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
Public WithEvents groupBox2 As GroupBox
Public WithEvents groupBox1 As GroupBox
Public WithEvents StatusLabel As MetroFramework.Controls.MetroLabel
Public WithEvents Add_Display As MetroFramework.Controls.MetroLabel
Friend WithEvents MetroTextBox1 As MetroFramework.Controls.MetroTextBox
Public WithEvents textBox1 As MetroFramework.Controls.MetroTextBox
Public WithEvents TextBox4 As MetroFramework.Controls.MetroTextBox
Public WithEvents TextBox2 As MetroFramework.Controls.MetroTextBox
Public WithEvents ComboBox2 As MetroFramework.Controls.MetroComboBox
Public WithEvents comboBox4 As MetroFramework.Controls.MetroComboBox
Public WithEvents ComboBox1 As MetroFramework.Controls.MetroComboBox
Public WithEvents comboBox3 As MetroFramework.Controls.MetroComboBox
Private WithEvents Btn_min As PictureBox
Private WithEvents Btn_Close As PictureBox
Public WithEvents DownloadScope As MetroFramework.Controls.MetroComboBox
Friend WithEvents btn_dl As Button
Friend WithEvents BackgroundWorker1 As System.ComponentModel.BackgroundWorker
Public WithEvents Add_Display As MetroFramework.Controls.MetroLabel
Public WithEvents CB_EP0 As MetroFramework.Controls.MetroComboBox
Public WithEvents CB_Season As MetroFramework.Controls.MetroComboBox
Public WithEvents CB_EP1 As MetroFramework.Controls.MetroComboBox
Friend WithEvents bt_Cancel_mass As Button
Public WithEvents groupBox2 As GroupBox
Public WithEvents TextBox2 As MetroFramework.Controls.MetroTextBox
Public WithEvents textBox1 As MetroFramework.Controls.MetroTextBox
Public WithEvents TextBox4 As MetroFramework.Controls.MetroTextBox
Public WithEvents ComboBox2 As MetroFramework.Controls.MetroComboBox
Public WithEvents StatusLabel As MetroFramework.Controls.MetroLabel
Public WithEvents DownloadScope As MetroFramework.Controls.MetroComboBox
Public WithEvents groupBox1 As GroupBox
Public WithEvents CB_Dub As MetroFramework.Controls.MetroComboBox
Public WithEvents TT_Dub As ToolTip
End Class

View File

@ -128,4 +128,7 @@
<metadata name="BackgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>24, 23</value>
</metadata>
<metadata name="TT_Dub.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>187, 23</value>
</metadata>
</root>

View File

@ -13,6 +13,7 @@ Imports System.Windows.Forms.VisualStyles.VisualStyleElement.Status
Imports Newtonsoft.Json.Linq
Imports System.Timers
Imports System.Security.Policy
Imports Crunchyroll_Downloader.CRD_Classes
Public Class Anime_Add
Public Mass_DL_Cancel As Boolean = False
@ -299,9 +300,9 @@ Public Class Anime_Add
bt_Cancel_mass.Enabled = False
bt_Cancel_mass.Visible = False
Main.DownloadFunimationJS_Seasons()
comboBox4.Enabled = False
comboBox3.Enabled = False
ComboBox1.Enabled = False
CB_EP1.Enabled = False
CB_EP0.Enabled = False
CB_Season.Enabled = False
ElseIf CBool(InStr(Main.WebbrowserURL, "crunchyroll.com")) = True Then
@ -313,9 +314,9 @@ Public Class Anime_Add
bt_Cancel_mass.Visible = False
Main.DownloadBetaSeasons()
comboBox4.Enabled = False
comboBox3.Enabled = False
ComboBox1.Enabled = False
CB_EP1.Enabled = False
CB_EP0.Enabled = False
CB_Season.Enabled = False
End If
@ -461,34 +462,54 @@ Public Class Anime_Add
Dim episode_id As String = Entry.GetValue("id").ToString
Dim slug_title As String = Entry.GetValue("slug_title").ToString
comboBox3.Items.Add("Episode " + episode_number)
comboBox4.Items.Add("Episode " + episode_number)
Main.CR_MassEpisodes.Add(New CR_Seasons(episode_id, slug_title, Main.CR_MassSeasons.Item(ComboBox1.SelectedIndex).Auth))
CB_EP0.Items.Add("Episode " + episode_number)
CB_EP1.Items.Add("Episode " + episode_number)
Main.CR_MassEpisodes.Add(New CR_Seasons(episode_id, slug_title, Main.CR_MassSeasons.Item(CB_Season.SelectedIndex).Auth, ""))
Next
End Select
Next
If comboBox3.Items.Count > 0 Then
comboBox3.SelectedIndex = 0
comboBox4.SelectedIndex = comboBox4.Items.Count - 1
If CB_EP0.Items.Count > 0 Then
CB_EP0.SelectedIndex = 0
CB_EP1.SelectedIndex = CB_EP1.Items.Count - 1
End If
comboBox3.Enabled = True
comboBox4.Enabled = True
CB_EP0.Enabled = True
CB_EP1.Enabled = True
End Sub
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CB_Season.SelectedIndexChanged
If CBool(InStr(Main.WebbrowserURL, "crunchyroll.com")) = True Then
comboBox3.Items.Clear()
comboBox4.Items.Clear()
comboBox3.Enabled = False
comboBox4.Enabled = False
comboBox3.Text = Nothing
comboBox4.Text = Nothing
CB_EP0.Items.Clear()
CB_EP1.Items.Clear()
CB_EP0.Enabled = False
CB_EP1.Enabled = False
CB_EP0.Text = Nothing
CB_EP1.Text = Nothing
'get guid
Dim guid As String = Nothing
For i As Integer = 0 To Main.CR_MassSeasons.Count - 1
If "Season " + Main.CR_MassSeasons.Item(i).Season = CB_Season.Text And Main.ConvertSubValue(Main.CR_MassSeasons.Item(i).audio_locale, ConvertSubsEnum.DisplayText) = CB_Dub.Text Then
guid = Main.CR_MassSeasons.Item(i).guid
'MsgBox(guid + vbNewLine + Main.CR_MassSeasons.Item(i).audio_locale)
End If
Next
If guid = Nothing Then
MsgBox("Requested guid not found", MsgBoxStyle.Critical)
Exit Sub
End If
' 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
Dim JsonUrl As String = "https://www.crunchyroll.com/content/v2/cms/seasons/" + Main.CR_MassSeasons.Item(ComboBox1.SelectedIndex).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)
@ -498,7 +519,7 @@ Public Class Anime_Add
Try
EpisodeJson = CurlAuthNew(JsonUrl, Loc_CR_Cookies, Main.CR_MassSeasons.Item(ComboBox1.SelectedIndex).Auth) '
EpisodeJson = CurlAuthNew(JsonUrl, Loc_CR_Cookies, Main.CR_MassSeasons.Item(CB_Season.SelectedIndex).Auth) '
Catch ex As Exception
If CBool(InStr(ex.ToString, "Error - Getting")) Then
@ -516,14 +537,14 @@ Public Class Anime_Add
ElseIf Main.WebbrowserURL = "https://funimation.com/js" Then
comboBox3.Items.Clear()
comboBox4.Items.Clear()
comboBox3.Text = Nothing
comboBox4.Text = Nothing
CB_EP0.Items.Clear()
CB_EP1.Items.Clear()
CB_EP0.Text = Nothing
CB_EP1.Text = Nothing
Dim ContentID As String = Nothing
For i As Integer = 0 To Main.FunimtaionSeasonList.Count - 1
If ComboBox1.Text = Main.FunimtaionSeasonList.Item(i).Title Then
If CB_Season.Text = Main.FunimtaionSeasonList.Item(i).Title Then
ContentID = Main.FunimtaionSeasonList.Item(i).ID
Exit For
End If
@ -559,9 +580,9 @@ Public Class Anime_Add
FillFunimationEpisodes(EpisodeJson)
If comboBox3.Items.Count > 0 Then
comboBox3.SelectedIndex = 0
comboBox4.SelectedIndex = comboBox4.Items.Count - 1
If CB_EP0.Items.Count > 0 Then
CB_EP0.SelectedIndex = 0
CB_EP1.SelectedIndex = CB_EP1.Items.Count - 1
End If
@ -573,16 +594,16 @@ Public Class Anime_Add
Public Sub FillFunimationEpisodes(ByVal EpisodeJson As String)
Main.FunimationEpisodeJSON = EpisodeJson
comboBox3.Enabled = True
comboBox4.Enabled = True
CB_EP0.Enabled = True
CB_EP1.Enabled = True
Dim EpisodeSplit() As String = EpisodeJson.Split(New String() {Chr(34) + "episodeNumber" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
'EpisodeJson.Split(New String() {Chr(34) + "episodeNumber" + Chr(34) + ": " + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Debug.WriteLine(EpisodeSplit.Count.ToString)
For i As Integer = 1 To EpisodeSplit.Count - 1
Dim EpisodeSplit2() As String = EpisodeSplit(i).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
comboBox3.Items.Add("Episode " + EpisodeSplit2(0))
comboBox4.Items.Add("Episode " + EpisodeSplit2(0))
CB_EP0.Items.Add("Episode " + EpisodeSplit2(0))
CB_EP1.Items.Add("Episode " + EpisodeSplit2(0))
Next
Main.WebbrowserURL = "https://funimation.com/js"
End Sub
@ -690,6 +711,35 @@ Public Class Anime_Add
End If
End Sub
Private Sub CB_Dub_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CB_Dub.SelectedIndexChanged
'MsgBox(CB_Dub.Text)
'MsgBox(Main.DubSprache.DisplayText)
If My.Settings.OverrideDub = True And CBool(InStr(CB_Dub.Text, Main.DubSprache.DisplayText)) = False Then
MessageBox.Show("The Duboveride might change the Dub to: " + Main.DubSprache.DisplayText, "Settings - Override enabled", MessageBoxButtons.OK)
End If
'clear everything below the dub
CB_Season.Items.Clear()
CB_EP0.Items.Clear()
CB_EP1.Items.Clear()
'also remove display text
CB_Season.Text = Nothing
CB_EP0.Text = Nothing
CB_EP1.Text = Nothing
For i As Integer = 0 To Main.CR_MassSeasons.Count - 1
If Main.ConvertSubValue(Main.CR_MassSeasons.Item(i).audio_locale, ConvertSubsEnum.DisplayText) = CB_Dub.Text Then
CB_Season.Items.Add("Season " + Main.CR_MassSeasons.Item(i).Season)
End If
Next
CB_Season.Enabled = True
End Sub
End Class

View File

@ -135,10 +135,12 @@ End Class
Public Class CR_Seasons
Public Season As String
Public guid As String
Public audio_locale As String
Public Auth As String
Public Sub New(ByVal guid As String, ByVal audio_locale As String, ByVal Auth As String)
Public Sub New(ByVal guid As String, ByVal audio_locale As String, ByVal Auth As String, ByVal Season As String)
Me.Season = Season
Me.guid = guid
Me.audio_locale = audio_locale
Me.Auth = Auth
@ -146,7 +148,7 @@ Public Class CR_Seasons
End Sub
Public Overrides Function ToString() As String
Return String.Format("{0}, {1}", Me.guid, Me.audio_locale)
Return String.Format("{0}, {1}", Me.guid, Me.audio_locale, Me.Season)
End Function
End Class

View File

@ -734,7 +734,7 @@ Public Class Main
End If
Next
Return HardSub + " not found"
Return HardSub + "-not-found"
End Function
@ -759,14 +759,14 @@ Public Class Main
Next
Dim First As Integer = 0
Dim Last As Integer = 0
If Anime_Add.comboBox4.SelectedIndex > Anime_Add.comboBox3.SelectedIndex Or Anime_Add.comboBox4.SelectedIndex = Anime_Add.comboBox3.SelectedIndex Then
First = Anime_Add.comboBox3.SelectedIndex
Last = Anime_Add.comboBox4.SelectedIndex
ElseIf Anime_Add.comboBox3.SelectedIndex > Anime_Add.comboBox4.SelectedIndex Then
First = Anime_Add.comboBox4.SelectedIndex
Last = Anime_Add.comboBox3.SelectedIndex
If Anime_Add.CB_EP1.SelectedIndex > Anime_Add.CB_EP0.SelectedIndex Or Anime_Add.CB_EP1.SelectedIndex = Anime_Add.CB_EP0.SelectedIndex Then
First = Anime_Add.CB_EP0.SelectedIndex
Last = Anime_Add.CB_EP1.SelectedIndex
ElseIf Anime_Add.CB_EP0.SelectedIndex > Anime_Add.CB_EP1.SelectedIndex Then
First = Anime_Add.CB_EP1.SelectedIndex
Last = Anime_Add.CB_EP0.SelectedIndex
End If
Dim Anzahl As Integer = Anime_Add.comboBox4.SelectedIndex - Anime_Add.comboBox3.SelectedIndex
Dim Anzahl As Integer = Anime_Add.CB_EP1.SelectedIndex - Anime_Add.CB_EP0.SelectedIndex
For i As Integer = First To Last
For e As Integer = 0 To Integer.MaxValue
If Grapp_RDY = True Then
@ -820,8 +820,8 @@ Public Class Main
If Debug2 = True Then
MsgBox(ex.ToString)
End If
Anime_Add.comboBox4.Items.Clear()
Anime_Add.comboBox3.Items.Clear()
Anime_Add.CB_EP1.Items.Clear()
Anime_Add.CB_EP0.Items.Clear()
Aktuell = 0.ToString
Gesamt = 0.ToString
Anime_Add.groupBox1.Visible = True
@ -837,19 +837,29 @@ Public Class Main
End Sub
Public Sub GetBetaSeasons(ByVal AnimeUrl As String, ByVal JsonUrl As String, ByVal Auth As String, Optional ByVal BrowserData As String = Nothing) ', ByVal SeasonJson As String)
'switch UI
Anime_Add.groupBox2.Visible = True
Anime_Add.bt_Cancel_mass.Enabled = True
Anime_Add.bt_Cancel_mass.Visible = True
Anime_Add.groupBox1.Visible = False
Anime_Add.ComboBox1.Items.Clear()
Anime_Add.comboBox3.Items.Clear()
Anime_Add.comboBox4.Items.Clear()
Anime_Add.ComboBox1.Text = Nothing
Anime_Add.comboBox3.Text = Nothing
Anime_Add.comboBox4.Text = Nothing
Anime_Add.ComboBox1.Enabled = True
Anime_Add.comboBox3.Enabled = True
Anime_Add.comboBox4.Enabled = True
'clear everything
Anime_Add.CB_Dub.Items.Clear()
Anime_Add.CB_Season.Items.Clear()
Anime_Add.CB_EP0.Items.Clear()
Anime_Add.CB_EP1.Items.Clear()
'also remove display text
Anime_Add.CB_Dub.Text = Nothing
Anime_Add.CB_Season.Text = Nothing
Anime_Add.CB_EP0.Text = Nothing
Anime_Add.CB_EP1.Text = Nothing
'disable everything for now
Anime_Add.CB_Dub.Enabled = False
Anime_Add.CB_Season.Enabled = False
Anime_Add.CB_EP0.Enabled = False
Anime_Add.CB_EP1.Enabled = False
Dim SeasonJson As String = Nothing
CR_MassSeasons.Clear()
If BrowserData = Nothing Then
@ -883,6 +893,8 @@ Public Class Main
Dim SeasonJObject As JObject = JObject.Parse(SeasonJson)
Dim SeasonData As List(Of JToken) = SeasonJObject.Children().ToList
Dim DubList As New List(Of String)
For Each item As JProperty In SeasonData
item.CreateReader()
Select Case item.Name
@ -892,21 +904,27 @@ Public Class Main
Dim localSeasons As New List(Of CR_Seasons)
Dim season_number As String = Nothing
Dim id As String = Nothing
Dim title As String = Nothing
Dim audio_localeMain As String = Nothing
Dim Dubs As New List(Of CR_Seasons)
For Each SeasonSubItem As JProperty In SeasonSubData
SeasonSubItem.CreateReader()
Select Case SeasonSubItem.Name
Case "versions"
Try
For Each VersionItem As JObject In SeasonSubItem.Values
Dim guid As String = Nothing
Dim audio_locale As String = Nothing
Dim guid As String = VersionItem.GetValue("guid").ToString
Dim audio_locale As String = VersionItem.GetValue("audio_locale").ToString
guid = VersionItem.GetValue("guid").ToString
audio_locale = VersionItem.GetValue("audio_locale").ToString
Dubs.Add(New CR_Seasons(guid, audio_locale, Auth, "NaN"))
localSeasons.Add(New CR_Seasons(guid, audio_locale, Auth))
Next
Catch ex As Exception
Debug.WriteLine("Error getting season data")
@ -917,27 +935,49 @@ Public Class Main
id = SeasonSubItem.Value.ToString
Case "audio_locale"
audio_localeMain = SeasonSubItem.Value.ToString
Case "title"
title = SeasonSubItem.Value.ToString
End Select
Next
'add dubs to local seasons
For i As Integer = 0 To Dubs.Count - 1
localSeasons.Add(New CR_Seasons(Dubs.Item(i).guid, Dubs.Item(i).audio_locale, Dubs.Item(i).Auth, season_number + " - " + title))
Next
'localSeasons.Add(New CR_Seasons(guid, audio_locale, Auth, season_number))
'MsgBox(audio_locale)
'Debug.WriteLine("Start-Seasons")
'Debug.WriteLine(localSeasons.Item(0).guid)
'Debug.WriteLine("END-Seasons")
If localSeasons.Count = 0 Then
Anime_Add.ComboBox1.Items.Add(ConvertSubValue(audio_localeMain, ConvertSubsEnum.DisplayText) + " - Season " + season_number)
CR_MassSeasons.Add(New CR_Seasons(id, audio_localeMain, Auth))
Continue For
End If
If localSeasons.Count > 0 Then
For i As Integer = 0 To CR_MassSeasons.Count - 1
If CR_MassSeasons.Item(i).guid = localSeasons.Item(0).guid Then
localSeasons.Clear()
Exit For
End If
Next
End If
'If localSeasons.Count = 0 Then
' Anime_Add.CB_Season.Items.Add(ConvertSubValue(audio_localeMain, ConvertSubsEnum.DisplayText) + " - Season " + season_number)
' CR_MassSeasons.Add(New CR_Seasons(id, audio_localeMain, Auth))
'End If
'If localSeasons.Count > 0 Then
' For i As Integer = 0 To CR_MassSeasons.Count - 1
' If CR_MassSeasons.Item(i).guid = localSeasons.Item(0).guid Then
' localSeasons.Clear()
' Exit For
' End If
' Next
'End If
If localSeasons.Count > 0 Then
For i As Integer = 0 To localSeasons.Count - 1
Anime_Add.ComboBox1.Items.Add(ConvertSubValue(localSeasons.Item(i).audio_locale, ConvertSubsEnum.DisplayText) + " - Season " + season_number)
'Anime_Add.CB_Season.Items.Add(ConvertSubValue(localSeasons.Item(i).audio_locale, ConvertSubsEnum.DisplayText) + " - Season " + season_number)
DubList.Add(localSeasons.Item(i).audio_locale)
CR_MassSeasons.Add(localSeasons.Item(i))
Next
End If
@ -946,6 +986,22 @@ Public Class Main
End Select
Next
Dim CleanDubs As List(Of String) = DubList.Distinct().ToList
Anime_Add.CB_Dub.Enabled = True
Dim Index As Integer = 0
For i As Integer = 0 To CleanDubs.Count - 1
Anime_Add.CB_Dub.Items.Add(ConvertSubValue(CleanDubs.Item(i), ConvertSubsEnum.DisplayText))
If CleanDubs.Item(i) = DubSprache.CR_Value Then
Index = i
End If
Next
Anime_Add.CB_Dub.SelectedIndex = Index
'Anime_Add.TT_Dub.SetToolTip(Anime_Add.CB_Dub, "Unable to select dub, dub override enabled!")
'Anime_Add.CB_Dub.Enabled = False
End Sub
Public Sub GetCRVideoProxy(ByVal requesturl As String, ByVal AuthToken As String, ByVal WebsiteURL As String, ByVal RT_count As Integer)
@ -2397,20 +2453,20 @@ Public Class Main
Anime_Add.bt_Cancel_mass.Enabled = True
Anime_Add.bt_Cancel_mass.Visible = True
Anime_Add.groupBox1.Visible = False
Anime_Add.ComboBox1.Items.Clear()
Anime_Add.comboBox3.Items.Clear()
Anime_Add.comboBox4.Items.Clear()
Anime_Add.ComboBox1.Text = Nothing
Anime_Add.comboBox3.Text = Nothing
Anime_Add.comboBox4.Text = Nothing
Anime_Add.ComboBox1.Enabled = True
Anime_Add.comboBox3.Enabled = False
Anime_Add.comboBox4.Enabled = False
Anime_Add.CB_Season.Items.Clear()
Anime_Add.CB_EP0.Items.Clear()
Anime_Add.CB_EP1.Items.Clear()
Anime_Add.CB_Season.Text = Nothing
Anime_Add.CB_EP0.Text = Nothing
Anime_Add.CB_EP1.Text = Nothing
Anime_Add.CB_Season.Enabled = True
Anime_Add.CB_EP0.Enabled = False
Anime_Add.CB_EP1.Enabled = False
WebbrowserURL = "https://funimation.com/js"
Debug.WriteLine("Count: " + FunimtaionSeasonList.Count.ToString)
For i As Integer = 0 To FunimtaionSeasonList.Count - 1
Debug.WriteLine(FunimtaionSeasonList.Item(i).Title)
Anime_Add.ComboBox1.Items.Add(FunimtaionSeasonList.Item(i).Title)
Anime_Add.CB_Season.Items.Add(FunimtaionSeasonList.Item(i).Title)
Next
End Sub
@ -2452,21 +2508,21 @@ Public Class Main
Dim Last As Integer = 0
Dim Anzahl As Integer = 0
If Anime_Add.comboBox4.SelectedIndex > Anime_Add.comboBox3.SelectedIndex Then
First = Anime_Add.comboBox3.SelectedIndex
Last = Anime_Add.comboBox4.SelectedIndex
If Anime_Add.CB_EP1.SelectedIndex > Anime_Add.CB_EP0.SelectedIndex Then
First = Anime_Add.CB_EP0.SelectedIndex
Last = Anime_Add.CB_EP1.SelectedIndex
Anzahl = Last - First + 1
ElseIf Anime_Add.comboBox4.SelectedIndex < Anime_Add.comboBox3.SelectedIndex Then
First = Anime_Add.comboBox4.SelectedIndex
Last = Anime_Add.comboBox3.SelectedIndex
ElseIf Anime_Add.CB_EP1.SelectedIndex < Anime_Add.CB_EP0.SelectedIndex Then
First = Anime_Add.CB_EP1.SelectedIndex
Last = Anime_Add.CB_EP0.SelectedIndex
Anime_Add.comboBox4.SelectedIndex = Last
Anime_Add.comboBox3.SelectedIndex = First
Anime_Add.CB_EP1.SelectedIndex = Last
Anime_Add.CB_EP0.SelectedIndex = First
Anzahl = Last - First + 1
ElseIf Anime_Add.comboBox4.SelectedIndex = Anime_Add.comboBox3.SelectedIndex Then
ElseIf Anime_Add.CB_EP1.SelectedIndex = Anime_Add.CB_EP0.SelectedIndex Then
First = Anime_Add.comboBox4.SelectedIndex
Last = Anime_Add.comboBox4.SelectedIndex
First = Anime_Add.CB_EP1.SelectedIndex
Last = Anime_Add.CB_EP1.SelectedIndex
Anzahl = Last - First + 1
End If
@ -2548,8 +2604,8 @@ Public Class Main
If Debug2 = True Then
MsgBox(ex.ToString)
End If
Anime_Add.comboBox4.Items.Clear()
Anime_Add.comboBox3.Items.Clear()
Anime_Add.CB_EP1.Items.Clear()
Anime_Add.CB_EP0.Items.Clear()
Aktuell = 0.ToString
Gesamt = 0.ToString
Anime_Add.groupBox1.Visible = True
@ -4361,23 +4417,25 @@ Public Class Main
LangValueEnum.Add(New NameValuePair("العربية (Arabic)", "ara", "ar-SA", Nothing))
LangValueEnum.Add(New NameValuePair("Polski", "pol", "pl-PL", Nothing))
LangValueEnum.Add(New NameValuePair("Русский (Russian)", "rus", "ru-RU", Nothing))
LangValueEnum.Add(New NameValuePair("Italiano (Italian)", "ita", "it-IT", Nothing))
LangValueEnum.Add(New NameValuePair("Español (España)", "spa", "es-ES", Nothing))
LangValueEnum.Add(New NameValuePair("Türkçe", "tur", "tr-TR", Nothing))
LangValueEnum.Add(New NameValuePair("Bahasa Indonesia", "ind", "id-ID", Nothing))
LangValueEnum.Add(New NameValuePair("Català", "cat", "ca-ES", Nothing))
LangValueEnum.Add(New NameValuePair("Polski", "pol", "pl-PL", Nothing))
LangValueEnum.Add(New NameValuePair("Tiếng Việt", "vie", "vi-VN", Nothing))
LangValueEnum.Add(New NameValuePair("తెలుగు", "tel", "te-IN", Nothing))
LangValueEnum.Add(New NameValuePair("English (India)", "eng", "en-IN", Nothing))
LangValueEnum.Add(New NameValuePair("Türkçe", "tur", "tr-TR", Nothing))
LangValueEnum.Add(New NameValuePair("తెలుగు", "tel", "te-IN", Nothing))
LangValueEnum.Add(New NameValuePair("हिंदी", "hin", "hi-IN", Nothing))

View File

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