audio change from #698

audio change from #698
This commit is contained in:
hama3254 2023-02-21 14:17:59 +01:00
parent 18a06b84dc
commit e788828a18
12 changed files with 500 additions and 293 deletions

Binary file not shown.

View File

@ -25,7 +25,7 @@ Partial Class Anime_Add
Private Sub InitializeComponent() Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Anime_Add)) Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Anime_Add))
Me.groupBox1 = New System.Windows.Forms.GroupBox() Me.groupBox1 = New System.Windows.Forms.GroupBox()
Me.SubTitlesOnlyCB = New MetroFramework.Controls.MetroComboBox() Me.DownloadScope = New MetroFramework.Controls.MetroComboBox()
Me.StatusLabel = New MetroFramework.Controls.MetroLabel() Me.StatusLabel = New MetroFramework.Controls.MetroLabel()
Me.ComboBox2 = New MetroFramework.Controls.MetroComboBox() Me.ComboBox2 = New MetroFramework.Controls.MetroComboBox()
Me.TextBox4 = New MetroFramework.Controls.MetroTextBox() Me.TextBox4 = New MetroFramework.Controls.MetroTextBox()
@ -50,7 +50,7 @@ Partial Class Anime_Add
'groupBox1 'groupBox1
' '
Me.groupBox1.BackColor = System.Drawing.Color.Transparent Me.groupBox1.BackColor = System.Drawing.Color.Transparent
Me.groupBox1.Controls.Add(Me.SubTitlesOnlyCB) Me.groupBox1.Controls.Add(Me.DownloadScope)
Me.groupBox1.Controls.Add(Me.StatusLabel) Me.groupBox1.Controls.Add(Me.StatusLabel)
Me.groupBox1.Controls.Add(Me.ComboBox2) Me.groupBox1.Controls.Add(Me.ComboBox2)
Me.groupBox1.Controls.Add(Me.TextBox4) Me.groupBox1.Controls.Add(Me.TextBox4)
@ -62,20 +62,19 @@ Partial Class Anime_Add
Me.groupBox1.TabIndex = 33 Me.groupBox1.TabIndex = 33
Me.groupBox1.TabStop = False Me.groupBox1.TabStop = False
' '
'SubTitlesOnlyCB 'DownloadScope
' '
Me.SubTitlesOnlyCB.BackColor = System.Drawing.Color.White Me.DownloadScope.BackColor = System.Drawing.Color.White
Me.SubTitlesOnlyCB.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.DownloadScope.Font = New System.Drawing.Font("Arial", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.SubTitlesOnlyCB.ForeColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer)) Me.DownloadScope.ForeColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
Me.SubTitlesOnlyCB.FormattingEnabled = True Me.DownloadScope.FormattingEnabled = True
Me.SubTitlesOnlyCB.ItemHeight = 23 Me.DownloadScope.ItemHeight = 23
Me.SubTitlesOnlyCB.Items.AddRange(New Object() {"[Default]", "[Subtitles only]"}) Me.DownloadScope.Items.AddRange(New Object() {"[Default]", "[Merge Audio with existing files]", "[Subtitles only]", "[Audio only (AAC)]"})
Me.SubTitlesOnlyCB.Location = New System.Drawing.Point(18, 190) Me.DownloadScope.Location = New System.Drawing.Point(18, 190)
Me.SubTitlesOnlyCB.Name = "SubTitlesOnlyCB" Me.DownloadScope.Name = "DownloadScope"
Me.SubTitlesOnlyCB.Size = New System.Drawing.Size(693, 29) Me.DownloadScope.Size = New System.Drawing.Size(693, 29)
Me.SubTitlesOnlyCB.Sorted = True Me.DownloadScope.TabIndex = 39
Me.SubTitlesOnlyCB.TabIndex = 39 Me.DownloadScope.UseSelectable = True
Me.SubTitlesOnlyCB.UseSelectable = True
' '
'StatusLabel 'StatusLabel
' '
@ -349,8 +348,8 @@ Partial Class Anime_Add
Me.Controls.Add(Me.btn_dl) Me.Controls.Add(Me.btn_dl)
Me.Controls.Add(Me.Btn_min) Me.Controls.Add(Me.Btn_min)
Me.Controls.Add(Me.Btn_Close) Me.Controls.Add(Me.Btn_Close)
Me.Controls.Add(Me.groupBox2)
Me.Controls.Add(Me.groupBox1) Me.Controls.Add(Me.groupBox1)
Me.Controls.Add(Me.groupBox2)
Me.Font = New System.Drawing.Font("Arial", 24.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) 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.Name = "Anime_Add"
Me.Padding = New System.Windows.Forms.Padding(10, 60, 20, 20) Me.Padding = New System.Windows.Forms.Padding(10, 60, 20, 20)
@ -377,7 +376,7 @@ Partial Class Anime_Add
Public WithEvents comboBox3 As MetroFramework.Controls.MetroComboBox Public WithEvents comboBox3 As MetroFramework.Controls.MetroComboBox
Private WithEvents Btn_min As PictureBox Private WithEvents Btn_min As PictureBox
Private WithEvents Btn_Close As PictureBox Private WithEvents Btn_Close As PictureBox
Public WithEvents SubTitlesOnlyCB As MetroFramework.Controls.MetroComboBox Public WithEvents DownloadScope As MetroFramework.Controls.MetroComboBox
Friend WithEvents btn_dl As Button Friend WithEvents btn_dl As Button
Friend WithEvents BackgroundWorker1 As System.ComponentModel.BackgroundWorker Friend WithEvents BackgroundWorker1 As System.ComponentModel.BackgroundWorker
Friend WithEvents bt_Cancel_mass As Button Friend WithEvents bt_Cancel_mass As Button

View File

@ -40,7 +40,7 @@ Public Class Anime_Add
Private Sub Anime_Add_Load(sender As Object, e As EventArgs) Handles MyBase.Load Private Sub Anime_Add_Load(sender As Object, e As EventArgs) Handles MyBase.Load
SubTitlesOnlyCB.SelectedIndex = 0 DownloadScope.SelectedIndex = 0
Manager.Owner = Me Manager.Owner = Me
Me.StyleManager = Manager Me.StyleManager = Manager
Btn_Close.Image = Main.CloseImg Btn_Close.Image = Main.CloseImg
@ -148,11 +148,8 @@ Public Class Anime_Add
Main.LoginOnly = "Download Mode!" Main.LoginOnly = "Download Mode!"
'MsgBox(Main.WebbrowserURL) 'MsgBox(Main.WebbrowserURL)
If SubTitlesOnlyCB.Text = "[Default]" Then
Main.SubsOnly = False
Else
Main.SubsOnly = True
End If
If groupBox1.Visible = True Then If groupBox1.Visible = True Then
' Main.LoadedUrls.Clear() ' Main.LoadedUrls.Clear()
Try Try
@ -589,12 +586,8 @@ Public Class Anime_Add
End If End If
End Sub End Sub
Private Sub SubTitlesOnlyCB_SelectedIndexChanged(sender As Object, e As EventArgs) Handles SubTitlesOnlyCB.SelectedIndexChanged Private Sub SubTitlesOnlyCB_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DownloadScope.SelectedIndexChanged
If SubTitlesOnlyCB.Text = "[Default]" Then Main.DownloadScope = DownloadScope.SelectedIndex
Main.SubsOnly = False
Else
Main.SubsOnly = True
End If
End Sub End Sub

View File

@ -150,6 +150,9 @@
<setting name="SaveThumbnail" serializeAs="String"> <setting name="SaveThumbnail" serializeAs="String">
<value>False</value> <value>False</value>
</setting> </setting>
<setting name="SaveMode" serializeAs="String">
<value>False</value>
</setting>
</Crunchyroll_Downloader.My.MySettings> </Crunchyroll_Downloader.My.MySettings>
</userSettings> </userSettings>
</configuration> </configuration>

View File

@ -1,5 +1,13 @@
Public Class CRD_Classes Public Class CRD_Classes
Public Enum DownloadScopeEnum
OldDefault = 0
MergeAudio = 1
SubsOnly = 2
AudioOnly = 3
End Enum
End Class End Class
#Region "funimation" #Region "funimation"

View File

@ -1093,7 +1093,13 @@ Public Class CRD_List_Item
End Function)) End Function))
For i As Integer = 0 To InuputStreams.Count - 1 For i As Integer = 0 To InuputStreams.Count - 1
Dim int As Integer = i Dim int As Integer = i
If CBool(InStr(InuputStreams(int), ":\")) Then
Continue For
End If
Dim InputURL As String() = InuputStreams(int).Split(New [Char]() {Chr(34)}) Dim InputURL As String() = InuputStreams(int).Split(New [Char]() {Chr(34)})
Dim InputClient As New WebClient Dim InputClient As New WebClient
InputClient.Encoding = Encoding.UTF8 InputClient.Encoding = Encoding.UTF8

View File

@ -40,6 +40,7 @@ Partial Class Main
Me.Btn_Close = New System.Windows.Forms.Button() Me.Btn_Close = New System.Windows.Forms.Button()
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.QueueToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.QueueToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.SaveThumbnailAsImageToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ToggleDebugModeToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ToggleDebugModeToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.Funimation_Token = New System.Windows.Forms.ToolStripMenuItem() Me.Funimation_Token = New System.Windows.Forms.ToolStripMenuItem()
Me.CheckCRBetaTokenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.CheckCRBetaTokenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
@ -51,7 +52,7 @@ Partial Class Main
Me.Panel1 = New System.Windows.Forms.Panel() Me.Panel1 = New System.Windows.Forms.Panel()
Me.ScanTimeout = New System.Windows.Forms.Timer(Me.components) Me.ScanTimeout = New System.Windows.Forms.Timer(Me.components)
Me.Btn_Queue = New System.Windows.Forms.Button() Me.Btn_Queue = New System.Windows.Forms.Button()
Me.SaveThumbnailAsImageToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.SaveModeToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
CType(Me.PictureBox5, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.PictureBox5, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.ConsoleBar, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.ConsoleBar, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.MetroStyleManager1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.MetroStyleManager1, System.ComponentModel.ISupportInitialize).BeginInit()
@ -160,7 +161,7 @@ Partial Class Main
' '
'ContextMenuStrip1 'ContextMenuStrip1
' '
Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.QueueToolStripMenuItem, Me.SaveThumbnailAsImageToolStripMenuItem, Me.ToggleDebugModeToolStripMenuItem, Me.Funimation_Token, Me.CheckCRBetaTokenToolStripMenuItem, Me.Timer3OffToolStripMenuItem, Me.ThreadCount, Me.CRCookieToolStripMenuItem, Me.UrlJsonsToolStripMenuItem, Me.DummyItemToolStripMenuItem}) Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.QueueToolStripMenuItem, Me.SaveModeToolStripMenuItem, Me.SaveThumbnailAsImageToolStripMenuItem, Me.ToggleDebugModeToolStripMenuItem, Me.Funimation_Token, Me.CheckCRBetaTokenToolStripMenuItem, Me.Timer3OffToolStripMenuItem, Me.ThreadCount, Me.CRCookieToolStripMenuItem, Me.UrlJsonsToolStripMenuItem, Me.DummyItemToolStripMenuItem})
Me.ContextMenuStrip1.Name = "ContextMenuStrip1" Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
resources.ApplyResources(Me.ContextMenuStrip1, "ContextMenuStrip1") resources.ApplyResources(Me.ContextMenuStrip1, "ContextMenuStrip1")
' '
@ -169,6 +170,11 @@ Partial Class Main
Me.QueueToolStripMenuItem.Name = "QueueToolStripMenuItem" Me.QueueToolStripMenuItem.Name = "QueueToolStripMenuItem"
resources.ApplyResources(Me.QueueToolStripMenuItem, "QueueToolStripMenuItem") resources.ApplyResources(Me.QueueToolStripMenuItem, "QueueToolStripMenuItem")
' '
'SaveThumbnailAsImageToolStripMenuItem
'
Me.SaveThumbnailAsImageToolStripMenuItem.Name = "SaveThumbnailAsImageToolStripMenuItem"
resources.ApplyResources(Me.SaveThumbnailAsImageToolStripMenuItem, "SaveThumbnailAsImageToolStripMenuItem")
'
'ToggleDebugModeToolStripMenuItem 'ToggleDebugModeToolStripMenuItem
' '
Me.ToggleDebugModeToolStripMenuItem.Name = "ToggleDebugModeToolStripMenuItem" Me.ToggleDebugModeToolStripMenuItem.Name = "ToggleDebugModeToolStripMenuItem"
@ -229,10 +235,10 @@ Partial Class Main
Me.Btn_Queue.Name = "Btn_Queue" Me.Btn_Queue.Name = "Btn_Queue"
Me.Btn_Queue.UseVisualStyleBackColor = False Me.Btn_Queue.UseVisualStyleBackColor = False
' '
'SaveThumbnailAsImageToolStripMenuItem 'SaveModeToolStripMenuItem
' '
Me.SaveThumbnailAsImageToolStripMenuItem.Name = "SaveThumbnailAsImageToolStripMenuItem" Me.SaveModeToolStripMenuItem.Name = "SaveModeToolStripMenuItem"
resources.ApplyResources(Me.SaveThumbnailAsImageToolStripMenuItem, "SaveThumbnailAsImageToolStripMenuItem") resources.ApplyResources(Me.SaveModeToolStripMenuItem, "SaveModeToolStripMenuItem")
' '
'Main 'Main
' '
@ -292,4 +298,5 @@ Partial Class Main
Friend WithEvents QueueToolStripMenuItem As ToolStripMenuItem Friend WithEvents QueueToolStripMenuItem As ToolStripMenuItem
Friend WithEvents Btn_Queue As Button Friend WithEvents Btn_Queue As Button
Friend WithEvents SaveThumbnailAsImageToolStripMenuItem As ToolStripMenuItem Friend WithEvents SaveThumbnailAsImageToolStripMenuItem As ToolStripMenuItem
Friend WithEvents SaveModeToolStripMenuItem As ToolStripMenuItem
End Class End Class

View File

@ -231,24 +231,6 @@
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing"> <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>900, 630</value> <value>900, 630</value>
</data> </data>
<data name="Btn_Queue.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="Btn_Queue.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="Btn_Queue.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="Btn_Queue.Location" type="System.Drawing.Point, System.Drawing">
<value>575, 18</value>
</data>
<data name="Btn_Queue.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 35</value>
</data>
<data name="Btn_Queue.TabIndex" type="System.Int32, mscorlib">
<value>70</value>
</data>
<data name="&gt;&gt;Btn_Queue.Name" xml:space="preserve"> <data name="&gt;&gt;Btn_Queue.Name" xml:space="preserve">
<value>Btn_Queue</value> <value>Btn_Queue</value>
</data> </data>
@ -261,21 +243,6 @@
<data name="&gt;&gt;Btn_Queue.ZOrder" xml:space="preserve"> <data name="&gt;&gt;Btn_Queue.ZOrder" xml:space="preserve">
<value>1</value> <value>1</value>
</data> </data>
<data name="Panel1.AutoScroll" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="Panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>1, 71</value>
</data>
<data name="Panel1.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>898, 403</value>
</data>
<data name="Panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>898, 546</value>
</data>
<data name="Panel1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;Panel1.Name" xml:space="preserve"> <data name="&gt;&gt;Panel1.Name" xml:space="preserve">
<value>Panel1</value> <value>Panel1</value>
</data> </data>
@ -288,24 +255,6 @@
<data name="&gt;&gt;Panel1.ZOrder" xml:space="preserve"> <data name="&gt;&gt;Panel1.ZOrder" xml:space="preserve">
<value>2</value> <value>2</value>
</data> </data>
<data name="Btn_Close.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
</data>
<data name="Btn_Close.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="Btn_Close.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="Btn_Close.Location" type="System.Drawing.Point, System.Drawing">
<value>800, 1</value>
</data>
<data name="Btn_Close.Size" type="System.Drawing.Size, System.Drawing">
<value>35, 35</value>
</data>
<data name="Btn_Close.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;Btn_Close.Name" xml:space="preserve"> <data name="&gt;&gt;Btn_Close.Name" xml:space="preserve">
<value>Btn_Close</value> <value>Btn_Close</value>
</data> </data>
@ -318,24 +267,6 @@
<data name="&gt;&gt;Btn_Close.ZOrder" xml:space="preserve"> <data name="&gt;&gt;Btn_Close.ZOrder" xml:space="preserve">
<value>3</value> <value>3</value>
</data> </data>
<data name="Btn_min.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
</data>
<data name="Btn_min.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="Btn_min.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="Btn_min.Location" type="System.Drawing.Point, System.Drawing">
<value>757, 1</value>
</data>
<data name="Btn_min.Size" type="System.Drawing.Size, System.Drawing">
<value>30, 30</value>
</data>
<data name="Btn_min.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;Btn_min.Name" xml:space="preserve"> <data name="&gt;&gt;Btn_min.Name" xml:space="preserve">
<value>Btn_min</value> <value>Btn_min</value>
</data> </data>
@ -348,24 +279,6 @@
<data name="&gt;&gt;Btn_min.ZOrder" xml:space="preserve"> <data name="&gt;&gt;Btn_min.ZOrder" xml:space="preserve">
<value>4</value> <value>4</value>
</data> </data>
<data name="Btn_Settings.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="Btn_Settings.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="Btn_Settings.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="Btn_Settings.Location" type="System.Drawing.Point, System.Drawing">
<value>665, 18</value>
</data>
<data name="Btn_Settings.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 35</value>
</data>
<data name="Btn_Settings.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;Btn_Settings.Name" xml:space="preserve"> <data name="&gt;&gt;Btn_Settings.Name" xml:space="preserve">
<value>Btn_Settings</value> <value>Btn_Settings</value>
</data> </data>
@ -378,21 +291,6 @@
<data name="&gt;&gt;Btn_Settings.ZOrder" xml:space="preserve"> <data name="&gt;&gt;Btn_Settings.ZOrder" xml:space="preserve">
<value>5</value> <value>5</value>
</data> </data>
<data name="Btn_Browser.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="Btn_Browser.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="Btn_Browser.Location" type="System.Drawing.Point, System.Drawing">
<value>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"> <data name="&gt;&gt;Btn_Browser.Name" xml:space="preserve">
<value>Btn_Browser</value> <value>Btn_Browser</value>
</data> </data>
@ -405,24 +303,6 @@
<data name="&gt;&gt;Btn_Browser.ZOrder" xml:space="preserve"> <data name="&gt;&gt;Btn_Browser.ZOrder" xml:space="preserve">
<value>6</value> <value>6</value>
</data> </data>
<data name="Btn_add.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="Btn_add.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="Btn_add.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="Btn_add.Location" type="System.Drawing.Point, System.Drawing">
<value>20, 18</value>
</data>
<data name="Btn_add.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 35</value>
</data>
<data name="Btn_add.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;Btn_add.Name" xml:space="preserve"> <data name="&gt;&gt;Btn_add.Name" xml:space="preserve">
<value>Btn_add</value> <value>Btn_add</value>
</data> </data>
@ -489,6 +369,12 @@
<data name="&gt;&gt;QueueToolStripMenuItem.Type" xml:space="preserve"> <data name="&gt;&gt;QueueToolStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;SaveThumbnailAsImageToolStripMenuItem.Name" xml:space="preserve">
<value>SaveThumbnailAsImageToolStripMenuItem</value>
</data>
<data name="&gt;&gt;SaveThumbnailAsImageToolStripMenuItem.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;ToggleDebugModeToolStripMenuItem.Name" xml:space="preserve"> <data name="&gt;&gt;ToggleDebugModeToolStripMenuItem.Name" xml:space="preserve">
<value>ToggleDebugModeToolStripMenuItem</value> <value>ToggleDebugModeToolStripMenuItem</value>
</data> </data>
@ -543,10 +429,10 @@
<data name="&gt;&gt;ScanTimeout.Type" xml:space="preserve"> <data name="&gt;&gt;ScanTimeout.Type" xml:space="preserve">
<value>System.Windows.Forms.Timer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.Timer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;SaveThumbnailAsImageToolStripMenuItem.Name" xml:space="preserve"> <data name="&gt;&gt;SaveModeToolStripMenuItem.Name" xml:space="preserve">
<value>SaveThumbnailAsImageToolStripMenuItem</value> <value>SaveModeToolStripMenuItem</value>
</data> </data>
<data name="&gt;&gt;SaveThumbnailAsImageToolStripMenuItem.Type" xml:space="preserve"> <data name="&gt;&gt;SaveModeToolStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="&gt;&gt;$this.Name" xml:space="preserve"> <data name="&gt;&gt;$this.Name" xml:space="preserve">
@ -558,6 +444,153 @@
<metadata name="Timer4.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="Timer4.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>276, 52</value> <value>276, 52</value>
</metadata> </metadata>
<data name="Btn_add.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="Btn_add.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="Btn_add.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="Btn_add.Location" type="System.Drawing.Point, System.Drawing">
<value>20, 18</value>
</data>
<data name="Btn_add.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 35</value>
</data>
<data name="Btn_add.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;Btn_add.Name" xml:space="preserve">
<value>Btn_add</value>
</data>
<data name="&gt;&gt;Btn_add.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;Btn_add.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;Btn_add.ZOrder" xml:space="preserve">
<value>7</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_Settings.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="Btn_Settings.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="Btn_Settings.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="Btn_Settings.Location" type="System.Drawing.Point, System.Drawing">
<value>665, 18</value>
</data>
<data name="Btn_Settings.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 35</value>
</data>
<data name="Btn_Settings.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="&gt;&gt;Btn_Settings.Name" xml:space="preserve">
<value>Btn_Settings</value>
</data>
<data name="&gt;&gt;Btn_Settings.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;Btn_Settings.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;Btn_Settings.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="Btn_min.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
</data>
<data name="Btn_min.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="Btn_min.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="Btn_min.Location" type="System.Drawing.Point, System.Drawing">
<value>757, 1</value>
</data>
<data name="Btn_min.Size" type="System.Drawing.Size, System.Drawing">
<value>30, 30</value>
</data>
<data name="Btn_min.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="&gt;&gt;Btn_min.Name" xml:space="preserve">
<value>Btn_min</value>
</data>
<data name="&gt;&gt;Btn_min.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;Btn_min.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;Btn_min.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="Btn_Close.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
</data>
<data name="Btn_Close.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="Btn_Close.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="Btn_Close.Location" type="System.Drawing.Point, System.Drawing">
<value>800, 1</value>
</data>
<data name="Btn_Close.Size" type="System.Drawing.Size, System.Drawing">
<value>35, 35</value>
</data>
<data name="Btn_Close.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
</data>
<data name="&gt;&gt;Btn_Close.Name" xml:space="preserve">
<value>Btn_Close</value>
</data>
<data name="&gt;&gt;Btn_Close.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;Btn_Close.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;Btn_Close.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<metadata name="ContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="ContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>352, 49</value> <value>352, 49</value>
</metadata> </metadata>
@ -567,6 +600,12 @@
<data name="QueueToolStripMenuItem.Text" xml:space="preserve"> <data name="QueueToolStripMenuItem.Text" xml:space="preserve">
<value>ffmpeg option</value> <value>ffmpeg option</value>
</data> </data>
<data name="SaveModeToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>233, 22</value>
</data>
<data name="SaveModeToolStripMenuItem.Text" xml:space="preserve">
<value>*Save Mode*</value>
</data>
<data name="SaveThumbnailAsImageToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing"> <data name="SaveThumbnailAsImageToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
<value>233, 22</value> <value>233, 22</value>
</data> </data>
@ -622,7 +661,7 @@
<value>Dummy_Item</value> <value>Dummy_Item</value>
</data> </data>
<data name="ContextMenuStrip1.Size" type="System.Drawing.Size, System.Drawing"> <data name="ContextMenuStrip1.Size" type="System.Drawing.Size, System.Drawing">
<value>234, 246</value> <value>234, 268</value>
</data> </data>
<data name="&gt;&gt;ContextMenuStrip1.Name" xml:space="preserve"> <data name="&gt;&gt;ContextMenuStrip1.Name" xml:space="preserve">
<value>ContextMenuStrip1</value> <value>ContextMenuStrip1</value>
@ -630,7 +669,64 @@
<data name="&gt;&gt;ContextMenuStrip1.Type" xml:space="preserve"> <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> <value>System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data> </data>
<data name="Panel1.AutoScroll" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="Panel1.Location" type="System.Drawing.Point, System.Drawing">
<value>1, 71</value>
</data>
<data name="Panel1.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>898, 403</value>
</data>
<data name="Panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>898, 546</value>
</data>
<data name="Panel1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;Panel1.Name" xml:space="preserve">
<value>Panel1</value>
</data>
<data name="&gt;&gt;Panel1.Type" xml:space="preserve">
<value>System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;Panel1.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;Panel1.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<metadata name="ScanTimeout.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="ScanTimeout.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>167, 10</value> <value>167, 10</value>
</metadata> </metadata>
<data name="Btn_Queue.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="Btn_Queue.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="Btn_Queue.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="Btn_Queue.Location" type="System.Drawing.Point, System.Drawing">
<value>575, 18</value>
</data>
<data name="Btn_Queue.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 35</value>
</data>
<data name="Btn_Queue.TabIndex" type="System.Int32, mscorlib">
<value>70</value>
</data>
<data name="&gt;&gt;Btn_Queue.Name" xml:space="preserve">
<value>Btn_Queue</value>
</data>
<data name="&gt;&gt;Btn_Queue.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_Queue.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;Btn_Queue.ZOrder" xml:space="preserve">
<value>1</value>
</data>
</root> </root>

View File

@ -18,6 +18,7 @@ Imports MyProvider.MyProvider
Imports System.Windows Imports System.Windows
Imports Microsoft.Web.WebView2.Core Imports Microsoft.Web.WebView2.Core
Imports System.Net.Http Imports System.Net.Http
Imports Crunchyroll_Downloader.CRD_Classes
Public Class Main Public Class Main
Inherits MetroForm Inherits MetroForm
@ -92,7 +93,8 @@ Public Class Main
Public IgnoreSeason As Integer = 0 Public IgnoreSeason As Integer = 0
Public HideFLInt As Integer = 0 Public HideFLInt As Integer = 0
Public KeepCache As Boolean = False Public KeepCache As Boolean = False
Public SubsOnly As Boolean = False 'Public SubsOnly As Boolean = False
Public DownloadScope As Integer = 0
Public VideoFormat As String = ".mp4" Public VideoFormat As String = ".mp4"
Public MergeSubsFormat As String = "mov_text" Public MergeSubsFormat As String = "mov_text"
'Public LoginDialog As Boolean = False 'Public LoginDialog As Boolean = False
@ -628,7 +630,11 @@ Public Class Main
VideoFormat = My.Settings.VideoFormat VideoFormat = My.Settings.VideoFormat
If VideoFormat = ".aac" Then
VideoFormat = ".mp4"
'My.Settings.VideoFormat = ".mp4"
MsgBox("The 'Audio only' output option has been moved." + vbNewLine + "See https://github.com/hama3254/Crunchyroll-Downloader-v3.0/issues/698 for more information.")
End If
RetryWithCachedFiles() RetryWithCachedFiles()
@ -1202,10 +1208,6 @@ Public Class Main
Try Try
Grapp_RDY = False Grapp_RDY = False
Dim ffmpeg_command_temp As String = ffmpeg_command Dim ffmpeg_command_temp As String = ffmpeg_command
If VideoFormat = ".aac" Then
Dim ffmpeg_command_Builder() As String = ffmpeg_command.Split(New String() {"-c:a copy"}, System.StringSplitOptions.RemoveEmptyEntries)
ffmpeg_command_temp = "-c:a copy" + ffmpeg_command_Builder(1)
End If
Dim CR_MetadataUsage As Boolean = False Dim CR_MetadataUsage As Boolean = False
Dim CR_Streams As New List(Of CR_Beta_Stream) Dim CR_Streams As New List(Of CR_Beta_Stream)
Dim CR_series_title As String = Nothing Dim CR_series_title As String = Nothing
@ -1270,8 +1272,11 @@ Public Class Main
ObjectJson = CR_ObjectsJson.Content ObjectJson = CR_ObjectsJson.Content
CR_ObjectsJson = New UrlJson("", "") CR_ObjectsJson = New UrlJson("", "")
ElseIf CBool(InStr(ObjectJson, "curl:")) Then ElseIf CBool(InStr(ObjectJson, "curl:")) Then
MsgBox("Error - Getting ObjectJson data" + vbNewLine + ObjectJson)
Exit Sub Throw New System.Exception("Error - Getting ObjectJson data" + vbNewLine + ObjectJson)
'MsgBox("Error - Getting ObjectJson data" + vbNewLine + ObjectJson)
'Exit Sub
End If End If
@ -1326,84 +1331,6 @@ Public Class Main
End Select End Select
Next Next
#Region "Chapters"
Dim Mdata_File As String = Application.StartupPath + "\" + ObjectsURLBuilder4(0) + "-mdata.txt"
If CR_Chapters = True Then
Dim ChaptersUrl As String = "https://static.crunchyroll.com/datalab-intro-v2/" + ObjectsURLBuilder4(0) + ".json"
Dim ChaptersJson As String = Nothing
ChaptersJson = Curl(ChaptersUrl)
If CBool(InStr(ChaptersJson, "curl:")) = True Then
ChaptersJson = Curl(ChaptersUrl)
End If
If CBool(InStr(ChaptersJson, "curl:")) = True Then
ChaptersJson = Nothing
Debug.WriteLine("no Chapter data... ignoring")
End If
If ChaptersJson IsNot Nothing Then
Dim StartTime As String() = ChaptersJson.Split(New String() {Chr(34) + "startTime" + Chr(34) + ": "}, System.StringSplitOptions.RemoveEmptyEntries)
Dim StartTime2 As String() = StartTime(1).Split(New String() {","}, System.StringSplitOptions.RemoveEmptyEntries)
Dim StartTime3 As String() = StartTime2(0).Split(New String() {"."}, System.StringSplitOptions.RemoveEmptyEntries)
Dim StartTime4 As String = StartTime3(1)
For i As Integer = StartTime4.Length To 2
StartTime4 = StartTime4 + "0"
Next
Dim StartTime_ms As String = StartTime3(0) + StartTime4
Dim EndTime As String() = ChaptersJson.Split(New String() {Chr(34) + "endTime" + Chr(34) + ": "}, System.StringSplitOptions.RemoveEmptyEntries)
Dim EndTime2 As String() = EndTime(1).Split(New String() {","}, System.StringSplitOptions.RemoveEmptyEntries)
Dim EndTime3 As String() = EndTime2(0).Split(New String() {"."}, System.StringSplitOptions.RemoveEmptyEntries)
Dim EndTime4 As String = EndTime3(1)
Dim AfterTime As String = Nothing
For i As Integer = EndTime4.Length To 2
If EndTime4.Length = 2 Then
AfterTime = EndTime4 + "1"
End If
EndTime4 = EndTime4 + "0"
Next
Dim EndTime_ms As String = EndTime3(0) + EndTime4
Dim AfterTime_ms As String = EndTime3(0) + AfterTime
Dim Metadata As String = Nothing
If CInt(CR_episode_duration_ms) < CInt(StartTime_ms) Then
'Totaly invalid...
ElseIf CInt(CR_episode_duration_ms) < CInt(EndTime_ms) Then
'it's not an Intro it's an outro
Dim DeCh As Integer = CInt(StartTime_ms) - 1
Metadata = My.Resources.ffmpeg_metadata_out.Replace("[Titel]", CR_FilenName).Replace("[Start-1]", DeCh.ToString).Replace("[Start]", StartTime_ms).Replace("[duration_ms]", CR_episode_duration_ms)
Else
Metadata = My.Resources.ffmpeg_metadata.Replace("[Titel]", CR_FilenName).Replace("[Start]", StartTime_ms).Replace("[END]", EndTime_ms).Replace("[after]", AfterTime_ms).Replace("[duration_ms]", CR_episode_duration_ms)
End If
If Metadata = Nothing Then
Else
Dim utf8WithoutBom2 As New System.Text.UTF8Encoding(False)
Using sink As New StreamWriter(Mdata_File, False, utf8WithoutBom2)
sink.WriteLine(Metadata)
CR_MetadataUsage = True
End Using
End If
End If
End If
#End Region
#Region "VideoJson" #Region "VideoJson"
Dim VideoJson As String = Nothing Dim VideoJson As String = Nothing
@ -1428,9 +1355,9 @@ Public Class Main
VideoJson = CR_VideoJson.Content VideoJson = CR_VideoJson.Content
CR_VideoJson = New UrlJson("", "") CR_VideoJson = New UrlJson("", "")
ElseIf CBool(InStr(VideoJson, "curl:")) = True Then ElseIf CBool(InStr(VideoJson, "curl:")) = True Then
'VideoJson = Nothing Throw New System.Exception("Error - Getting VideoJson data" + vbNewLine + VideoJson) 'VideoJson = Nothing
MsgBox("Error - Getting VideoJson data" + vbNewLine + VideoJson) ' MsgBox("Error - Getting VideoJson data" + vbNewLine + VideoJson)
Exit Sub ' Exit Sub
End If End If
@ -1699,13 +1626,100 @@ Public Class Main
End If End If
#End Region #End Region
#Region "Chapters"
Dim Mdata_File As String = Application.StartupPath + "\" + ObjectsURLBuilder4(0) + "-mdata.txt"
If CR_Chapters = True Then
Dim ChaptersUrl As String = "https://static.crunchyroll.com/datalab-intro-v2/" + ObjectsURLBuilder4(0) + ".json"
Dim ChaptersJson As String = Nothing
ChaptersJson = Curl(ChaptersUrl)
If CBool(InStr(ChaptersJson, "curl:")) = True Then
ChaptersJson = Curl(ChaptersUrl)
End If
If CBool(InStr(ChaptersJson, "curl:")) = True Then
ChaptersJson = Nothing
Debug.WriteLine("no Chapter data... ignoring")
End If
If ChaptersJson IsNot Nothing Then
Dim StartTime As String() = ChaptersJson.Split(New String() {Chr(34) + "startTime" + Chr(34) + ": "}, System.StringSplitOptions.RemoveEmptyEntries)
Dim StartTime2 As String() = StartTime(1).Split(New String() {","}, System.StringSplitOptions.RemoveEmptyEntries)
Dim StartTime3 As String() = StartTime2(0).Split(New String() {"."}, System.StringSplitOptions.RemoveEmptyEntries)
Dim StartTime4 As String = StartTime3(1)
For i As Integer = StartTime4.Length To 2
StartTime4 = StartTime4 + "0"
Next
Dim StartTime_ms As String = StartTime3(0) + StartTime4
Dim EndTime As String() = ChaptersJson.Split(New String() {Chr(34) + "endTime" + Chr(34) + ": "}, System.StringSplitOptions.RemoveEmptyEntries)
Dim EndTime2 As String() = EndTime(1).Split(New String() {","}, System.StringSplitOptions.RemoveEmptyEntries)
Dim EndTime3 As String() = EndTime2(0).Split(New String() {"."}, System.StringSplitOptions.RemoveEmptyEntries)
Dim EndTime4 As String = EndTime3(1)
Dim AfterTime As String = Nothing
For i As Integer = EndTime4.Length To 2
If EndTime4.Length = 2 Then
AfterTime = EndTime4 + "1"
End If
EndTime4 = EndTime4 + "0"
Next
Dim EndTime_ms As String = EndTime3(0) + EndTime4
Dim AfterTime_ms As String = EndTime3(0) + AfterTime
Dim Metadata As String = Nothing
If CInt(CR_episode_duration_ms) < CInt(StartTime_ms) Then
'Totaly invalid...
ElseIf CInt(CR_episode_duration_ms) < CInt(EndTime_ms) Then
'it's not an Intro it's an outro
Dim DeCh As Integer = CInt(StartTime_ms) - 1
Metadata = My.Resources.ffmpeg_metadata_out.Replace("[Titel]", CR_FilenName).Replace("[Start-1]", DeCh.ToString).Replace("[Start]", StartTime_ms).Replace("[duration_ms]", CR_episode_duration_ms)
Else
Metadata = My.Resources.ffmpeg_metadata.Replace("[Titel]", CR_FilenName).Replace("[Start]", StartTime_ms).Replace("[END]", EndTime_ms).Replace("[after]", AfterTime_ms).Replace("[duration_ms]", CR_episode_duration_ms)
End If
If Metadata = Nothing Then
Else
Dim utf8WithoutBom2 As New System.Text.UTF8Encoding(False)
Using sink As New StreamWriter(Mdata_File, False, utf8WithoutBom2)
sink.WriteLine(Metadata)
CR_MetadataUsage = True
End Using
End If
End If
End If
#End Region
#Region "lösche doppel download" #Region "lösche doppel download"
'MsgBox(Pfad2) 'MsgBox(Pfad2)
Dim Pfad5 As String = Pfad2.Replace(Chr(34), "") Dim Pfad5 As String = Pfad2.Replace(Chr(34), "")
If My.Computer.FileSystem.FileExists(Pfad5) And SubsOnly = False Then 'Pfad = Kompeltter Pfad mit Dateinamen + ENdung Dim Pfad6 As String = Pfad5
Dim MergeAudio As Boolean = False
If My.Computer.FileSystem.FileExists(Pfad5) And DownloadScope = DownloadScopeEnum.OldDefault Then 'Pfad = Kompeltter Pfad mit Dateinamen + ENdung
Me.Invoke(New Action(Function() As Object Me.Invoke(New Action(Function() As Object
Anime_Add.StatusLabel.Text = "Status: The file video already exists." Anime_Add.StatusLabel.Text = "Status: The file already exists."
Me.Text = "Status: The file video already exists." Me.Text = "Status: The file already exists."
Me.Invalidate() Me.Invalidate()
Return Nothing Return Nothing
End Function)) End Function))
@ -1718,6 +1732,41 @@ Public Class Main
Grapp_RDY = True Grapp_RDY = True
Exit Sub Exit Sub
End If End If
ElseIf My.Computer.FileSystem.FileExists(Pfad5) And DownloadScope = DownloadScopeEnum.MergeAudio Then
Pfad6 = Path.GetDirectoryName(Pfad5) + "\" + GeräteID() + Path.GetExtension(Pfad5) '+ "."
FileSystem.Rename(Pfad5, Pfad6)
MergeAudio = True
ElseIf My.Computer.FileSystem.FileExists(Path.GetDirectoryName(Pfad5) + "\" + Path.GetFileNameWithoutExtension(Pfad5) + "aac") And DownloadScope = DownloadScopeEnum.AudioOnly Then
Me.Invoke(New Action(Function() As Object
Anime_Add.StatusLabel.Text = "Status: The file already exists."
Me.Text = "Status: The file already exists."
Me.Invalidate()
Return Nothing
End Function))
If MessageBox.Show("The file " + Path.GetDirectoryName(Pfad5) + "\" + Path.GetFileNameWithoutExtension(Pfad5) + "aac" + " already exists." + vbNewLine + "You want to override it?", "File exists!", MessageBoxButtons.OKCancel) = DialogResult.OK Then
Try
My.Computer.FileSystem.DeleteFile(Path.GetDirectoryName(Pfad5) + "\" + Path.GetFileNameWithoutExtension(Pfad5) + "aac")
Catch ex As Exception
End Try
Else
Grapp_RDY = True
Exit Sub
End If
ElseIf DownloadScope = DownloadScopeEnum.AudioOnly Then
'replace format with aac
Pfad2 = Pfad2.Replace(VideoFormat, ".aac")
'replace command for aac
Dim ffmpeg_command_Builder() As String = ffmpeg_command.Split(New String() {"-c:a copy"}, System.StringSplitOptions.RemoveEmptyEntries)
ffmpeg_command_temp = "-c:a copy" + ffmpeg_command_Builder(1)
End If End If
#End Region #End Region
@ -1728,7 +1777,7 @@ Public Class Main
ffmpegInput = "-i " + Chr(34) + CR_URI_Master(0) + Chr(34) ffmpegInput = "-i " + Chr(34) + CR_URI_Master(0) + Chr(34)
ElseIf SubsOnly = True Then ElseIf DownloadScope = DownloadScopeEnum.SubsOnly Then
ffmpegInput = "-i [Subtitles only]" ffmpegInput = "-i [Subtitles only]"
Else Else
@ -1736,6 +1785,7 @@ Public Class Main
For i As Integer = 0 To CR_URI_Master.Count - 1 For i As Integer = 0 To CR_URI_Master.Count - 1
str = Curl(CR_URI_Master(i)) str = Curl(CR_URI_Master(i))
@ -1748,6 +1798,13 @@ Public Class Main
If CBool(InStr(str, "curl:")) = True Then If CBool(InStr(str, "curl:")) = True Then
MsgBox("Unable to get master.m3u8" + vbNewLine + str, MsgBoxStyle.Critical) MsgBox("Unable to get master.m3u8" + vbNewLine + str, MsgBoxStyle.Critical)
ElseIf DownloadScope = DownloadScopeEnum.AudioOnly Or MergeAudio = True Then
If CBool(InStr(str, "x480,")) Then
ResoUsed = "x480"
ElseIf CBool(InStr(str, "x" + Reso.ToString + ",")) Then
ResoUsed = "x" + Reso.ToString
End If
ElseIf CBool(InStr(str, "x" + Reso.ToString + ",")) Then ElseIf CBool(InStr(str, "x" + Reso.ToString + ",")) Then
ResoUsed = "x" + Reso.ToString ResoUsed = "x" + Reso.ToString
@ -1769,6 +1826,7 @@ Public Class Main
End If End If
End If End If
End If End If
Dim ffmpeg_url_3 As String = Nothing Dim ffmpeg_url_3 As String = Nothing
Dim LineChar As String = vbLf Dim LineChar As String = vbLf
If CBool(InStr(str, vbCrLf)) Then If CBool(InStr(str, vbCrLf)) Then
@ -1784,7 +1842,6 @@ Public Class Main
End If End If
Next Next
ffmpegInput = "-i " + Chr(34) + ffmpeg_url_3.Trim() + Chr(34) ffmpegInput = "-i " + Chr(34) + ffmpeg_url_3.Trim() + Chr(34)
End If End If
@ -1806,7 +1863,20 @@ Public Class Main
Next Next
End If End If
If SoftSubsAvailable.Count > 0 Then
If DownloadScope = DownloadScopeEnum.AudioOnly Then
ElseIf MergeAudio = True Then
ElseIf SoftSubsAvailable.Count > 0 Then
Dim MergeSubsNow As Boolean = MergeSubs
If DownloadScope = DownloadScopeEnum.SubsOnly Then
MergeSubsNow = False
End If
Debug.WriteLine("Softsubs Default: " + DefaultSubCR) Debug.WriteLine("Softsubs Default: " + DefaultSubCR)
@ -1820,7 +1890,7 @@ Public Class Main
Next Next
If MergeSubs = True And SubsOnly = False Then If MergeSubsNow = True Then
Dim DispositionIndex As Integer = 69 Dim DispositionIndex As Integer = 69
Dim SoftSubMergeURLs As String = "" Dim SoftSubMergeURLs As String = ""
Dim SoftSubMergeMaps As String = " -map 0:v -map 0:a" Dim SoftSubMergeMaps As String = " -map 0:v -map 0:a"
@ -1855,6 +1925,7 @@ Public Class Main
End If End If
Else Else
For i As Integer = 0 To SoftSubsList.Count - 1 For i As Integer = 0 To SoftSubsList.Count - 1
@ -1876,6 +1947,7 @@ Public Class Main
Dim Pfad4 As String = Path.Combine(Path.GetDirectoryName(Pfad3), FN) Dim Pfad4 As String = Path.Combine(Path.GetDirectoryName(Pfad3), FN)
WriteText(Pfad4, SubText) WriteText(Pfad4, SubText)
Pause(3) Pause(3)
Next Next
If CR_MetadataUsage = False Then If CR_MetadataUsage = False Then
@ -1884,13 +1956,7 @@ Public Class Main
ffmpegInput = ffmpegInput + " -i " + Chr(34) + Mdata_File + Chr(34) + " -map_metadata 1" + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) + " " + ffmpeg_command_temp ffmpegInput = ffmpegInput + " -i " + Chr(34) + Mdata_File + Chr(34) + " -map_metadata 1" + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) + " " + ffmpeg_command_temp
End If End If
End If End If
Else
If CR_MetadataUsage = False Then
ffmpegInput = ffmpegInput + " " + ffmpeg_command_temp
Else
ffmpegInput = ffmpegInput + " -i " + Chr(34) + Mdata_File + Chr(34) + " -map_metadata 1 " + ffmpeg_command_temp
End If
'MsgBox(ffmpegInput)
End If End If
ffmpegInput = RemoveExtraSpaces(ffmpegInput) ffmpegInput = RemoveExtraSpaces(ffmpegInput)
@ -1976,6 +2042,7 @@ Public Class Main
Me.Invalidate() Me.Invalidate()
Return Nothing Return Nothing
End Function)) End Function))
Catch ex As Exception Catch ex As Exception
Me.Invoke(New Action(Function() As Object Me.Invoke(New Action(Function() As Object
Anime_Add.StatusLabel.Text = "Status: idle" Anime_Add.StatusLabel.Text = "Status: idle"
@ -1995,10 +2062,12 @@ Public Class Main
MsgBox(ErrorNoPermisson + vbNewLine + ex.ToString, MsgBoxStyle.Information) MsgBox(ErrorNoPermisson + vbNewLine + ex.ToString, MsgBoxStyle.Information)
ElseIf CBool(InStr(ex.ToString, Chr(34) + "UserAbort" + Chr(34))) Then ElseIf CBool(InStr(ex.ToString, Chr(34) + "UserAbort" + Chr(34))) Then
MsgBox(ex.ToString, MsgBoxStyle.Information) MsgBox(ex.ToString, MsgBoxStyle.Information)
ElseIf CBool(InStr(ex.ToString, "Error - Getting")) Then
Navigate(WebsiteURL)
Else Else
MsgBox(ex.ToString, MsgBoxStyle.Information) MsgBox(ex.ToString, MsgBoxStyle.Information)
End If End If
End Try End Try '
End Sub End Sub
Function Convert_locale(ByVal locale As String) As String Function Convert_locale(ByVal locale As String) As String
@ -2585,10 +2654,7 @@ Public Class Main
End If End If
Try Try
Dim ffmpeg_command_temp As String = ffmpeg_command Dim ffmpeg_command_temp As String = ffmpeg_command
If VideoFormat = ".aac" Then
Dim ffmpeg_command_Builder() As String = ffmpeg_command.Split(New String() {"-c:a copy"}, System.StringSplitOptions.RemoveEmptyEntries)
ffmpeg_command_temp = "-c:a copy" + ffmpeg_command_Builder(1)
End If
Me.Invoke(New Action(Function() As Object Me.Invoke(New Action(Function() As Object
Me.Text = "Status: looking for video file" Me.Text = "Status: looking for video file"
Anime_Add.StatusLabel.Text = "Status: looking for video file" Anime_Add.StatusLabel.Text = "Status: looking for video file"
@ -2931,7 +2997,7 @@ Public Class Main
Dim Funimation_m3u8_final As String = Nothing Dim Funimation_m3u8_final As String = Nothing
Dim client0 As New WebClient Dim client0 As New WebClient
client0.Encoding = Encoding.UTF8 client0.Encoding = Encoding.UTF8
If SubsOnly = False Then If DownloadScope = 1 Then
For i As Integer = 0 To VideoStreams.Count - 1 For i As Integer = 0 To VideoStreams.Count - 1
If VideoStreams(i).Primary = True Then If VideoStreams(i).Primary = True Then
Funimation_m3u8_Primary = VideoStreams(i).Url Funimation_m3u8_Primary = VideoStreams(i).Url
@ -3157,7 +3223,7 @@ Public Class Main
End If End If
Dim SoftSubMergeMetatata As String = Nothing Dim SoftSubMergeMetatata As String = Nothing
If UsedSubs.Count > 0 Then If UsedSubs.Count > 0 Then
If MergeSubs = True And SubsOnly = False Then If MergeSubs = True And DownloadScope = 0 Then
Dim DispositionIndex As Integer = 999 Dim DispositionIndex As Integer = 999
Dim LastMerged As String = Nothing Dim LastMerged As String = Nothing
Dim MapCount As Integer = -1 Dim MapCount As Integer = -1
@ -3257,7 +3323,7 @@ Public Class Main
#End Region #End Region
'MsgBox(Funimation_m3u8_final) 'MsgBox(Funimation_m3u8_final)
'DownloadPfad = DownloadPfad.Replace(" \", "\") 'DownloadPfad = DownloadPfad.Replace(" \", "\")
If SubsOnly = True Then If DownloadScope = 1 Then
Funimation_m3u8_final = "-i [Subtitles only]" Funimation_m3u8_final = "-i [Subtitles only]"
End If End If
Dim L1Name_Split As String() = WebbrowserURL.Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries) Dim L1Name_Split As String() = WebbrowserURL.Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
@ -4374,6 +4440,12 @@ Public Class Main
LoadingUrl = Url LoadingUrl = Url
LoadedUrls.Clear() LoadedUrls.Clear()
Dim NoBrowser As Boolean = False Dim NoBrowser As Boolean = False
If My.Settings.SaveMode = True Then
Browser.WebView2.CoreWebView2.Navigate(Url)
Exit Sub
End If
'CR_v1Token = "Get" 'CR_v1Token = "Get"
'Browser.WebView2.Source = New Uri(Url) 'Browser.WebView2.Source = New Uri(Url)
'Exit Sub 'Exit Sub
@ -4540,12 +4612,11 @@ Public Class Main
Dim StreamsUrl As String = Nothing Dim StreamsUrl As String = Nothing
Dim ObjectJson As String Dim ObjectJson As String
Try
ObjectJson = CurlAuth(ObjectsUrl, Loc_CR_Cookies, Auth2) ObjectJson = CurlAuth(ObjectsUrl, Loc_CR_Cookies, Auth2)
If CBool(InStr(ObjectJson, "curl:")) = True Then If CBool(InStr(ObjectJson, "curl:")) = True Then
Browser.WebView2.CoreWebView2.Navigate(ObjectsUrl) Browser.WebView2.CoreWebView2.Navigate(url)
LoadingUrl = ObjectsUrl
Exit Sub Exit Sub
ElseIf CBool(InStr(ObjectJson, "videos/")) = False Then ElseIf CBool(InStr(ObjectJson, "videos/")) = False Then
@ -4557,11 +4628,6 @@ Public Class Main
Exit Sub Exit Sub
End If End If
Catch ex As Exception
Browser.WebView2.CoreWebView2.Navigate(url)
Exit Sub
End Try
Try Try
Dim StreamsUrlBuilder() As String = ObjectJson.Split(New String() {"videos/"}, System.StringSplitOptions.RemoveEmptyEntries) Dim StreamsUrlBuilder() As String = ObjectJson.Split(New String() {"videos/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim StreamsUrlBuilder2() As String = StreamsUrlBuilder(1).Split(New String() {"/streams"}, System.StringSplitOptions.RemoveEmptyEntries) Dim StreamsUrlBuilder2() As String = StreamsUrlBuilder(1).Split(New String() {"/streams"}, System.StringSplitOptions.RemoveEmptyEntries)
@ -4655,6 +4721,20 @@ Public Class Main
End If End If
End Sub End Sub
Private Sub SaveModeToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles SaveModeToolStripMenuItem.Click
If My.Settings.SaveMode = False Then
My.Settings.SaveMode = True
MsgBox("SaveMode enabled")
My.Settings.Save()
Else
My.Settings.SaveMode = False
MsgBox("SaveMode disabled")
My.Settings.Save()
End If
End Sub
#End Region #End Region
End Class End Class

View File

@ -569,6 +569,18 @@ Namespace My
Me("SaveThumbnail") = value Me("SaveThumbnail") = value
End Set End Set
End Property End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("False")> _
Public Property SaveMode() As Boolean
Get
Return CType(Me("SaveMode"),Boolean)
End Get
Set
Me("SaveMode") = value
End Set
End Property
End Class End Class
End Namespace End Namespace

View File

@ -131,5 +131,8 @@
<Setting Name="SaveThumbnail" Type="System.Boolean" Scope="User"> <Setting Name="SaveThumbnail" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value> <Value Profile="(Default)">False</Value>
</Setting> </Setting>
<Setting Name="SaveMode" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings> </Settings>
</SettingsFile> </SettingsFile>

View File

@ -306,10 +306,10 @@ Partial Class Einstellungen
Me.TabPage2.HorizontalScrollbarBarColor = True Me.TabPage2.HorizontalScrollbarBarColor = True
Me.TabPage2.HorizontalScrollbarHighlightOnWheel = False Me.TabPage2.HorizontalScrollbarHighlightOnWheel = False
Me.TabPage2.HorizontalScrollbarSize = 10 Me.TabPage2.HorizontalScrollbarSize = 10
Me.TabPage2.Location = New System.Drawing.Point(4, 35) Me.TabPage2.Location = New System.Drawing.Point(4, 44)
Me.TabPage2.Name = "TabPage2" Me.TabPage2.Name = "TabPage2"
Me.TabPage2.Padding = New System.Windows.Forms.Padding(3) Me.TabPage2.Padding = New System.Windows.Forms.Padding(3)
Me.TabPage2.Size = New System.Drawing.Size(501, 528) Me.TabPage2.Size = New System.Drawing.Size(501, 519)
Me.TabPage2.TabIndex = 1 Me.TabPage2.TabIndex = 1
Me.TabPage2.Text = "Output" Me.TabPage2.Text = "Output"
Me.TabPage2.VerticalScrollbarBarColor = True Me.TabPage2.VerticalScrollbarBarColor = True
@ -449,7 +449,7 @@ Partial Class Einstellungen
Me.CB_Format.FormattingEnabled = True Me.CB_Format.FormattingEnabled = True
Me.CB_Format.IntegralHeight = False Me.CB_Format.IntegralHeight = False
Me.CB_Format.ItemHeight = 23 Me.CB_Format.ItemHeight = 23
Me.CB_Format.Items.AddRange(New Object() {"MP4", "MKV", "AAC (Audio only)"}) Me.CB_Format.Items.AddRange(New Object() {"MP4", "MKV"})
Me.CB_Format.Location = New System.Drawing.Point(50, 25) Me.CB_Format.Location = New System.Drawing.Point(50, 25)
Me.CB_Format.Name = "CB_Format" Me.CB_Format.Name = "CB_Format"
Me.CB_Format.Size = New System.Drawing.Size(175, 29) Me.CB_Format.Size = New System.Drawing.Size(175, 29)
@ -1032,7 +1032,7 @@ Partial Class Einstellungen
Me.TabControl1.FontWeight = MetroFramework.MetroTabControlWeight.Regular Me.TabControl1.FontWeight = MetroFramework.MetroTabControlWeight.Regular
Me.TabControl1.Location = New System.Drawing.Point(22, 60) Me.TabControl1.Location = New System.Drawing.Point(22, 60)
Me.TabControl1.Name = "TabControl1" Me.TabControl1.Name = "TabControl1"
Me.TabControl1.SelectedIndex = 3 Me.TabControl1.SelectedIndex = 1
Me.TabControl1.Size = New System.Drawing.Size(509, 567) Me.TabControl1.Size = New System.Drawing.Size(509, 567)
Me.TabControl1.TabIndex = 0 Me.TabControl1.TabIndex = 0
Me.TabControl1.UseSelectable = True Me.TabControl1.UseSelectable = True
@ -1046,9 +1046,9 @@ Partial Class Einstellungen
Me.MetroTabPage2.HorizontalScrollbarBarColor = True Me.MetroTabPage2.HorizontalScrollbarBarColor = True
Me.MetroTabPage2.HorizontalScrollbarHighlightOnWheel = False Me.MetroTabPage2.HorizontalScrollbarHighlightOnWheel = False
Me.MetroTabPage2.HorizontalScrollbarSize = 10 Me.MetroTabPage2.HorizontalScrollbarSize = 10
Me.MetroTabPage2.Location = New System.Drawing.Point(4, 35) Me.MetroTabPage2.Location = New System.Drawing.Point(4, 44)
Me.MetroTabPage2.Name = "MetroTabPage2" Me.MetroTabPage2.Name = "MetroTabPage2"
Me.MetroTabPage2.Size = New System.Drawing.Size(501, 528) Me.MetroTabPage2.Size = New System.Drawing.Size(501, 519)
Me.MetroTabPage2.TabIndex = 8 Me.MetroTabPage2.TabIndex = 8
Me.MetroTabPage2.Text = "Naming" Me.MetroTabPage2.Text = "Naming"
Me.MetroTabPage2.VerticalScrollbarBarColor = True Me.MetroTabPage2.VerticalScrollbarBarColor = True