- fixed random crashes
- added error handling failed segments
- changed error handling download crash
This commit is contained in:
hama3254 2020-10-31 23:36:52 +01:00
parent b41b783a99
commit 0717281b1c
31 changed files with 1207 additions and 1044 deletions

Binary file not shown.

View File

@ -273,9 +273,9 @@ Partial Class Anime_Add
Me.ClientSize = New System.Drawing.Size(630, 275)
Me.Controls.Add(Me.pictureBox3)
Me.Controls.Add(Me.pictureBox4)
Me.Controls.Add(Me.groupBox2)
Me.Controls.Add(Me.groupBox1)
Me.Controls.Add(Me.GroupBox3)
Me.Controls.Add(Me.groupBox2)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
Me.Name = "Anime_Add"
Me.Text = "Add"

View File

@ -121,6 +121,6 @@
<value>17, 17</value>
</metadata>
<metadata name="Timer2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>390, 22</value>
<value>117, 19</value>
</metadata>
</root>

View File

@ -26,10 +26,22 @@ Public Class Anime_Add
Private Sub Anime_Add_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.Icon = My.Resources.icon
Try
For i As Integer = 0 To Main.ListBoxList.Count - 1
ListBox1.Items.Add(Main.ListBoxList.Item(i))
Dim ListBox1List As New List(Of String)
'Jeder Eintrag in der Combobox durchgehen
For Each item As String In Main.ListBoxList
'Wenn der Combobox-Eintrag noch nicht in der Result-List vorhanden ist, Eintrag der Result-List hinzufügen
If ListBox1List.Contains(item) = False Then
ListBox1List.Add(item)
End If
Next
ListBox1.Items.Clear()
'Die Result-List der Combobox hinzufügen
ListBox1.Items.AddRange(ListBox1List.ToArray)
'For i As Integer = 0 To Main.ListBoxList.Count - 1
' ListBox1.Items.Add(Main.ListBoxList.Item(i))
'Next
Catch ex As Exception
End Try
@ -215,7 +227,7 @@ Public Class Anime_Add
Else
If Main.Grapp_RDY = True Then
GeckoFX.WebBrowser1.Navigate(textBox1.Text)
StatusLabel.Text = "Status: looking for video file"
StatusLabel.Text = "Status: loading ..."
Main.b = False
End If
End If
@ -408,6 +420,8 @@ Public Class Anime_Add
ListBox1.Items.Remove(ListBox1.Items(0))
Main.Funimation_Grapp_RDY = False
Main.b = False
StatusLabel.Text = "Status: loading ..."
Main.StatusMainForm.Text = "Status: loading ..."
End If
Else
@ -416,6 +430,9 @@ Public Class Anime_Add
ListBox1.Items.Remove(ListBox1.Items(0))
Main.Grapp_RDY = False
Main.b = False
StatusLabel.Text = "Status: loading ..."
Main.StatusMainForm.Text = "Status: loading ..."
End If
End If
End If

View File

@ -119,9 +119,9 @@ Partial Class CRD_List_Item
'
Me.Label_percent.Anchor = System.Windows.Forms.AnchorStyles.Right
Me.Label_percent.Font = New System.Drawing.Font("Consolas", 12.0!)
Me.Label_percent.Location = New System.Drawing.Point(455, 101)
Me.Label_percent.Location = New System.Drawing.Point(432, 101)
Me.Label_percent.Name = "Label_percent"
Me.Label_percent.Size = New System.Drawing.Size(355, 19)
Me.Label_percent.Size = New System.Drawing.Size(378, 19)
Me.Label_percent.TabIndex = 7
Me.Label_percent.Text = "Status Label : speed, size and percent"
Me.Label_percent.TextAlign = System.Drawing.ContentAlignment.MiddleRight
@ -146,18 +146,18 @@ Partial Class CRD_List_Item
'
Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ViewInExplorerToolStripMenuItem, Me.PlaybackVideoFileToolStripMenuItem})
Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
Me.ContextMenuStrip1.Size = New System.Drawing.Size(181, 70)
Me.ContextMenuStrip1.Size = New System.Drawing.Size(173, 48)
'
'ViewInExplorerToolStripMenuItem
'
Me.ViewInExplorerToolStripMenuItem.Name = "ViewInExplorerToolStripMenuItem"
Me.ViewInExplorerToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
Me.ViewInExplorerToolStripMenuItem.Size = New System.Drawing.Size(172, 22)
Me.ViewInExplorerToolStripMenuItem.Text = "View in explorer"
'
'PlaybackVideoFileToolStripMenuItem
'
Me.PlaybackVideoFileToolStripMenuItem.Name = "PlaybackVideoFileToolStripMenuItem"
Me.PlaybackVideoFileToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
Me.PlaybackVideoFileToolStripMenuItem.Size = New System.Drawing.Size(172, 22)
Me.PlaybackVideoFileToolStripMenuItem.Text = "playback video file"
'
'CRD_List_Item

View File

@ -10,18 +10,20 @@ Public Class CRD_List_Item
Dim ListOfStreams As New List(Of String)
Dim proc As Process
Dim ThreadList As New List(Of Thread)
Dim timeout As DateTime
Dim Canceld As Boolean = False
Dim Label_website_Text As String = Nothing
Dim StatusRunning As Boolean = True
'Dim UsedMap As String = Nothing
Dim ffmpeg_command As String = Nothing
Dim Debug2 As Boolean = False
Dim MergeSubstoMP4 As Boolean = False
Dim SaveLog As Boolean = False
Dim DownloadPfad As String = Nothing
Dim ToDispose As Boolean = False
Dim Failed As Boolean = False
Dim FailedCount As Integer = 0
Dim HistoryDL_URL As String
Dim HistoryDL_Pfad As String
Dim HistoryFilename As String
@ -42,8 +44,9 @@ Public Class CRD_List_Item
#End Region
#Region "Set UI"
Public Sub SetLabelWebsite(ByVal Text As String)
Label_website.Text = Text
Label_website.Text = Text
Label_website_Text = Text
End Sub
Public Sub SetLabelAnimeTitel(ByVal Text As String)
Label_Anime.Text = Text
@ -179,28 +182,32 @@ Public Class CRD_List_Item
Else
If proc.HasExited = True Then
If ProgressBar1.Value < 100 Then
MsgBox("The download process seems to have crashed", MsgBoxStyle.Exclamation)
Label_percent.Text = "Press the play button again to retry."
ProgressBar1.Value = 100
Retry = True
StatusRunning = False
ElseIf Retry = True Then
If Main.RunningDownloads < Main.MaxDL Then
If Retry = True Then
If Main.RunningDownloads < Main.MaxDL Then
Else
If MessageBox.Show("You have currtenly on your set Download limit." + vbNewLine + " You can Press OK to ignore it.", "Download maximum reached", MessageBoxButtons.OKCancel) = DialogResult.Cancel Then
Exit Sub
Else
If MessageBox.Show("You have currtenly on your set Download limit." + vbNewLine + " You can Press OK to ignore it.", "Download maximum reached", MessageBoxButtons.OKCancel) = DialogResult.Cancel Then
Exit Sub
End If
End If
If My.Computer.FileSystem.FileExists(HistoryDL_Pfad.Replace(Chr(34), "")) Then 'Pfad = Kompeltter Pfad mit Dateinamen + ENdung
Try
My.Computer.FileSystem.DeleteFile(HistoryDL_Pfad.Replace(Chr(34), ""))
Catch ex As Exception
End Try
End If
StartDownload(HistoryDL_URL, HistoryDL_Pfad, HistoryFilename, HybridMode)
StatusRunning = True
Label_website.Text = Label_website_Text
Else
MsgBox("The download process seems to have crashed", MsgBoxStyle.Exclamation)
Label_percent.Text = "Press the play button again to retry."
ProgressBar1.Value = 0
Retry = True
StatusRunning = False
End If
If My.Computer.FileSystem.FileExists(HistoryDL_Pfad.Replace(Chr(34), "")) Then 'Pfad = Kompeltter Pfad mit Dateinamen + ENdung
Try
My.Computer.FileSystem.DeleteFile(HistoryDL_Pfad.Replace(Chr(34), ""))
Catch ex As Exception
End Try
End If
DownloadFFMPEG(HistoryDL_URL, HistoryDL_Pfad, HistoryFilename)
StatusRunning = True
Label_website.Text = Label_website_Text
Else
End If
Exit Sub
End If
@ -209,9 +216,50 @@ Public Class CRD_List_Item
bt_pause.BackgroundImage = My.Resources.main_pause_play
SuspendProcess(proc)
Else
StatusRunning = True
bt_pause.BackgroundImage = My.Resources.main_pause
ResumeProcess(proc)
If Failed = True Then
Dim Result As DialogResult = MessageBox.Show("The download has " + FailedCount.ToString + " failded segments" + vbNewLine + "Press 'Ignore' to continue", "Download Error", MessageBoxButtons.AbortRetryIgnore) '= DialogResult.Ignore Then
If Result = DialogResult.Ignore Then
Failed = False
StatusRunning = True
bt_pause.BackgroundImage = My.Resources.main_pause
ResumeProcess(proc)
ElseIf Result = DialogResult.Retry Then
Try
proc.Kill()
proc.WaitForExit(500)
Label_percent.Text = "retrying -%"
Label_website.Text = Label_website_Text
Catch ex As Exception
End Try
If proc.HasExited Then
StartDownload(HistoryDL_URL, HistoryDL_Pfad, HistoryFilename, HybridMode)
StatusRunning = True
Label_website.Text = Label_website_Text
bt_pause.BackgroundImage = My.Resources.main_pause
End If
ElseIf Result = DialogResult.Abort Then
Try
proc.Kill()
proc.WaitForExit(500)
Label_percent.Text = "canceled -%"
Label_website.Text = Label_website_Text
Catch ex As Exception
End Try
End If
Else
If StatusRunning = True Then
StatusRunning = False
bt_pause.BackgroundImage = My.Resources.main_pause_play
SuspendProcess(proc)
Else
StatusRunning = True
bt_pause.BackgroundImage = My.Resources.main_pause
ResumeProcess(proc)
End If
End If
End If
End If
@ -231,9 +279,10 @@ Public Class CRD_List_Item
Label_Anime.Location = New Point(195, locationY + 42)
Label_Reso.Location = New Point(195, locationY + 101)
Label_Hardsub.Location = New Point(300, locationY + 101)
Label_percent.SetBounds(455, locationY + 101, 355, 19)
Label_percent.SetBounds(432, locationY + 101, 378, 19)
Label_percent.AutoSize = False
ProgressBar1.SetBounds(195, locationY + 70, 601, 20)
'ProgressBar1.ForeColor = Color.Red
End Sub
Public Function GetTextBound()
@ -257,6 +306,11 @@ Public Class CRD_List_Item
Public Sub StartDownload(ByVal DL_URL As String, ByVal DL_Pfad As String, ByVal Filename As String, ByVal DownloadHybridMode As Boolean)
'MsgBox(DL_URL)
DownloadPfad = DL_Pfad
HistoryDL_URL = DL_URL
HistoryDL_Pfad = DL_Pfad
HistoryFilename = Filename
If DownloadHybridMode = True Then
Dim Evaluator = New Thread(Sub() DownloadHybrid(DL_URL, DL_Pfad, Filename))
Evaluator.Start()
@ -327,10 +381,6 @@ Public Class CRD_List_Item
End Function
Public Function DownloadHybrid(ByVal DL_URL As String, ByVal DL_Pfad As String, ByVal Filename As String) As String
DownloadPfad = DL_Pfad
HistoryDL_URL = DL_URL
HistoryDL_Pfad = DL_Pfad
HistoryFilename = Filename
'MsgBox(DL_URL)
Dim Folder As String = einstellungen.GeräteID()
Dim Pfad2 As String = Path.GetDirectoryName(DL_Pfad.Replace(Chr(34), "")) + "\" + Folder + "\"
@ -347,8 +397,12 @@ Public Class CRD_List_Item
End Try
End If
Dim MergeSub As String() = DL_URL.Split(New String() {"-i " + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
If MergeSub.Count > 1 Then
Me.Invoke(New Action(Function()
Label_percent.Text = "Downloading Subtitles..."
Return Nothing
End Function))
For i As Integer = 1 To MergeSub.Count - 1
Dim SubsURL As String() = MergeSub(i).Split(New [Char]() {Chr(34)})
Dim SubsClient As New WebClient
@ -358,11 +412,33 @@ Public Class CRD_List_Item
SubsClient.Headers.Add(HttpRequestHeader.Cookie, Main.WebbrowserCookie)
End If
Dim SubsFile As String = einstellungen.GeräteID() + ".txt"
SubsClient.DownloadFile(SubsURL(0), Pfad2 + "\" + SubsFile)
Dim retry As Boolean = True
Dim retryCount As Integer = 3
While retry
Try
SubsClient.DownloadFile(SubsURL(0), Pfad2 + "\" + SubsFile)
retry = False
Catch ex As Exception
If retryCount > 0 Then
retryCount = retryCount - 1
Me.Invoke(New Action(Function()
Label_percent.Text = "Error Downloading Subtitles - retrying"
Return Nothing
End Function))
Else
Dim utf8WithoutBom2 As New System.Text.UTF8Encoding(False)
Using sink As New StreamWriter(SubsFile, False, utf8WithoutBom2)
sink.WriteLine(My.Resources.ass_template)
End Using
retry = False
End If
End Try
End While
DL_URL = DL_URL.Replace(SubsURL(0), Pfad2 + "\" + SubsFile)
Next
End If
Dim m3u8_url As String() = DL_URL.Split(New [Char]() {Chr(34)})
Dim m3u8_url_1 As String = Nothing
Dim m3u8_url_3 As String = m3u8_url(1)
@ -417,7 +493,10 @@ Public Class CRD_List_Item
MsgBox(Pfad2)
End If
Dim PauseTime As Integer = 0
Dim Threads As Integer = Environment.ProcessorCount / 2 - 1
If Threads < 2 Then
Threads = 2
End If
Dim di As New IO.DirectoryInfo(Pfad2)
For i As Integer = 0 To textLenght.Length - 1
If InStr(textLenght(i), ".ts") Then
@ -427,7 +506,7 @@ Public Class CRD_List_Item
'MsgBox(True.ToString)
Thread.Sleep(5000)
PauseTime = PauseTime + 5
ElseIf ThreadList.Count > 7 Then
ElseIf ThreadList.Count > Threads Then
Thread.Sleep(125)
ElseIf Canceld = True Then
For www As Integer = 0 To Integer.MaxValue
@ -585,8 +664,10 @@ Public Class CRD_List_Item
startinfo.RedirectStandardOutput = True
startinfo.CreateNoWindow = True
proc = New Process
AddHandler proc.ErrorDataReceived, AddressOf TestOutput
AddHandler proc.OutputDataReceived, AddressOf TestOutput
proc.EnableRaisingEvents = True
AddHandler proc.ErrorDataReceived, AddressOf ffmpegOutput
AddHandler proc.OutputDataReceived, AddressOf ffmpegOutput
AddHandler proc.Exited, AddressOf ProcessClosed
proc.StartInfo = startinfo
proc.Start() ' start the process
proc.BeginOutputReadLine()
@ -602,10 +683,7 @@ Public Class CRD_List_Item
Public Function DownloadFFMPEG(ByVal DLCommand As String, ByVal DL_Pfad As String, ByVal Filename As String) As String
DownloadPfad = DL_Pfad
HistoryDL_URL = DLCommand
HistoryDL_Pfad = DL_Pfad
HistoryFilename = Filename
Dim exepath As String = Application.StartupPath + "\ffmpeg.exe"
Dim startinfo As New System.Diagnostics.ProcessStartInfo
@ -624,8 +702,10 @@ Public Class CRD_List_Item
startinfo.RedirectStandardOutput = True
startinfo.CreateNoWindow = True
proc = New Process
AddHandler proc.ErrorDataReceived, AddressOf TestOutput
AddHandler proc.OutputDataReceived, AddressOf TestOutput
proc.EnableRaisingEvents = True
AddHandler proc.ErrorDataReceived, AddressOf ffmpegOutput
AddHandler proc.OutputDataReceived, AddressOf ffmpegOutput
AddHandler proc.Exited, AddressOf ProcessClosed
proc.StartInfo = startinfo
proc.Start() ' start the process
proc.BeginOutputReadLine()
@ -633,7 +713,27 @@ Public Class CRD_List_Item
Return Nothing
End Function
Sub TestOutput(ByVal sender As Object, ByVal e As DataReceivedEventArgs)
Sub ProcessClosed(ByVal sender As Object, ByVal e As System.EventArgs)
If ProgressBar1.Value < 100 Then
If Canceld = False Then
Label_website.Text = "The download process seems to have crashed"
Label_percent.Text = "Press the play button again to retry."
ProgressBar1.Value = 100
Retry = True
StatusRunning = False
End If
End If
'Me.Invoke(New Action(Function()
' Label_percent.Text = "Finished - event"
' Return Nothing
' End Function))
End Sub
Sub ffmpegOutput(ByVal sender As Object, ByVal e As DataReceivedEventArgs)
'timeout = DateTime.Now
'MsgBox(timeout)
Try
Dim logfile As String = DownloadPfad.Replace(".mp4", ".log").Replace(Chr(34), "")
If SaveLog = True Then
@ -724,7 +824,17 @@ Public Class CRD_List_Item
Label_percent.Text = Math.Round(DownloadFinished, 2, MidpointRounding.AwayFromZero).ToString + "MB/" + Math.Round(FileSize, 2, MidpointRounding.AwayFromZero).ToString + "MB " + percent.ToString + "%"
Return Nothing
End Function))
ElseIf InStr(e.Data, "Failed to open segment") Then
Failed = True
FailedCount = FailedCount + 1
StatusRunning = False
bt_pause.BackgroundImage = My.Resources.main_pause_play
SuspendProcess(proc)
Me.Invoke(New Action(Function()
Label_percent.Text = "Missing segment detected, retry or resume with the play button"
Return Nothing
End Function))
ElseIf InStr(e.Data, "muxing overhead:") Then
Me.Invoke(New Action(Function()
Dim Done As String() = Label_percent.Text.Split(New String() {"MB"}, System.StringSplitOptions.RemoveEmptyEntries)
@ -732,8 +842,11 @@ Public Class CRD_List_Item
Return Nothing
End Function))
If HybridMode = True Then
Thread.Sleep(1000)
System.IO.Directory.Delete(HybridModePath, True)
Thread.Sleep(5000)
Try
System.IO.Directory.Delete(HybridModePath, True)
Catch ex As Exception
End Try
End If
End If
@ -829,26 +942,20 @@ Public Class CRD_List_Item
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Try
If proc.HasExited = True Then
If ProgressBar1.Value < 100 Then
If Canceld = False Then
Label_website.Text = "The download process seems to have crashed"
Label_percent.Text = "Press the play button again to retry."
ProgressBar1.Value = 100
Retry = True
StatusRunning = False
End If
End If
End If
Catch ex As Exception
End Try
'Try
' If proc.HasExited = True Then
' If ProgressBar1.Value < 100 Then
' If Canceld = False Then
' Label_website.Text = "The download process seems to have crashed"
' Label_percent.Text = "Press the play button again to retry."
' ProgressBar1.Value = 100
' Retry = True
' StatusRunning = False
' End If
' End If
' End If
'Catch ex As Exception
'End Try
End Sub
Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick

View File

@ -50,7 +50,7 @@ Partial Class Main
Me.Btn_add.BackColor = System.Drawing.Color.Transparent
Me.Btn_add.Cursor = System.Windows.Forms.Cursors.Hand
Me.Btn_add.Image = Global.Crunchyroll_Downloader.My.Resources.Resources.main_add
Me.Btn_add.Location = New System.Drawing.Point(5, 5)
Me.Btn_add.Location = New System.Drawing.Point(5, 7)
Me.Btn_add.Name = "Btn_add"
Me.Btn_add.Size = New System.Drawing.Size(100, 48)
Me.Btn_add.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage
@ -74,7 +74,7 @@ Partial Class Main
Me.Btn_Settings.BackColor = System.Drawing.Color.Transparent
Me.Btn_Settings.Cursor = System.Windows.Forms.Cursors.Hand
Me.Btn_Settings.Image = Global.Crunchyroll_Downloader.My.Resources.Resources.main_settings
Me.Btn_Settings.Location = New System.Drawing.Point(676, 10)
Me.Btn_Settings.Location = New System.Drawing.Point(676, 12)
Me.Btn_Settings.Name = "Btn_Settings"
Me.Btn_Settings.Size = New System.Drawing.Size(100, 40)
Me.Btn_Settings.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage
@ -86,7 +86,7 @@ Partial Class Main
Me.Btn_Browser.BackColor = System.Drawing.Color.Transparent
Me.Btn_Browser.Cursor = System.Windows.Forms.Cursors.Hand
Me.Btn_Browser.Image = Global.Crunchyroll_Downloader.My.Resources.Resources.main_browser
Me.Btn_Browser.Location = New System.Drawing.Point(110, 10)
Me.Btn_Browser.Location = New System.Drawing.Point(110, 12)
Me.Btn_Browser.Name = "Btn_Browser"
Me.Btn_Browser.Size = New System.Drawing.Size(100, 40)
Me.Btn_Browser.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage
@ -96,14 +96,14 @@ Partial Class Main
'StatusMainForm
'
Me.StatusMainForm.BackColor = System.Drawing.Color.Transparent
Me.StatusMainForm.Font = New System.Drawing.Font("Consolas", 15.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.StatusMainForm.Font = New System.Drawing.Font("Consolas", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.StatusMainForm.ForeColor = System.Drawing.SystemColors.WindowFrame
Me.StatusMainForm.Location = New System.Drawing.Point(212, 17)
Me.StatusMainForm.Location = New System.Drawing.Point(212, 15)
Me.StatusMainForm.Name = "StatusMainForm"
Me.StatusMainForm.Size = New System.Drawing.Size(416, 24)
Me.StatusMainForm.Size = New System.Drawing.Size(431, 35)
Me.StatusMainForm.TabIndex = 66
Me.StatusMainForm.Text = "Crunchyroll Downloader"
Me.StatusMainForm.TextAlign = System.Drawing.ContentAlignment.TopCenter
Me.StatusMainForm.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'ListView1
'
@ -114,10 +114,10 @@ Partial Class Main
Me.ListView1.ForeColor = System.Drawing.Color.Black
Me.ListView1.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None
Me.ListView1.HideSelection = False
Me.ListView1.Location = New System.Drawing.Point(1, 64)
Me.ListView1.Location = New System.Drawing.Point(1, 73)
Me.ListView1.MinimumSize = New System.Drawing.Size(800, 400)
Me.ListView1.Name = "ListView1"
Me.ListView1.Size = New System.Drawing.Size(838, 487)
Me.ListView1.Size = New System.Drawing.Size(838, 547)
Me.ListView1.TabIndex = 57
Me.ListView1.UseCompatibleStateImageBehavior = False
Me.ListView1.View = System.Windows.Forms.View.Details
@ -130,7 +130,7 @@ Partial Class Main
'PictureBox5
'
Me.PictureBox5.BackgroundImage = Global.Crunchyroll_Downloader.My.Resources.Resources.balken
Me.PictureBox5.Location = New System.Drawing.Point(1, 56)
Me.PictureBox5.Location = New System.Drawing.Point(1, 65)
Me.PictureBox5.Name = "PictureBox5"
Me.PictureBox5.Size = New System.Drawing.Size(838, 8)
Me.PictureBox5.TabIndex = 67
@ -154,7 +154,7 @@ Partial Class Main
'
Me.TheTextBox.BackColor = System.Drawing.SystemColors.ScrollBar
Me.TheTextBox.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.TheTextBox.Location = New System.Drawing.Point(1, 558)
Me.TheTextBox.Location = New System.Drawing.Point(1, 630)
Me.TheTextBox.Name = "TheTextBox"
Me.TheTextBox.Size = New System.Drawing.Size(838, 111)
Me.TheTextBox.TabIndex = 69
@ -164,7 +164,7 @@ Partial Class Main
'
Me.PictureBox6.BackgroundImage = Global.Crunchyroll_Downloader.My.Resources.Resources.balken
Me.PictureBox6.Cursor = System.Windows.Forms.Cursors.Hand
Me.PictureBox6.Location = New System.Drawing.Point(1, 549)
Me.PictureBox6.Location = New System.Drawing.Point(1, 620)
Me.PictureBox6.Name = "PictureBox6"
Me.PictureBox6.Size = New System.Drawing.Size(838, 8)
Me.PictureBox6.TabIndex = 68
@ -175,7 +175,7 @@ Partial Class Main
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BackgroundImage = Global.Crunchyroll_Downloader.My.Resources.Resources.main_background
Me.ClientSize = New System.Drawing.Size(840, 558)
Me.ClientSize = New System.Drawing.Size(840, 629)
Me.Controls.Add(Me.TheTextBox)
Me.Controls.Add(Me.PictureBox6)
Me.Controls.Add(Me.PictureBox5)

View File

@ -809,30 +809,38 @@ Public Class Main
If SoftSubs2.Count > 0 Then
For i As Integer = 0 To SoftSubs2.Count - 1
Dim ii As Integer = i
Me.Invoke(New Action(Function()
einstellungen.StatusLabel.Text = "Status: downloading - " + HardSubValuesToDisplay(Chr(34) + SoftSubs2(ii) + Chr(34))
Pause(1)
Return Nothing
End Function))
Try
Me.Invoke(New Action(Function()
einstellungen.StatusLabel.Text = "Status: downloading - " + HardSubValuesToDisplay(Chr(34) + SoftSubs2(ii) + Chr(34))
Pause(1)
Return Nothing
End Function))
LabelEpisode = SoftSubs2(i)
Dim SoftSub As String() = WebbrowserText.Split(New String() {Chr(34) + "language" + Chr(34) + ":" + Chr(34) + SoftSubs2(i) + Chr(34) + "," + Chr(34) + "url" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim SoftSub_2 As String() = SoftSub(1).Split(New [Char]() {Chr(34)})
Dim SoftSub_3 As String = SoftSub_2(0).Replace("\/", "/")
Dim client0 As New WebClient
client0.Encoding = Encoding.UTF8
Dim str0 As String = client0.DownloadString(SoftSub_3)
Dim Pfad3 As String = Pfad2.Replace(Chr(34), "")
Dim FN As String = Path.ChangeExtension(Path.Combine(Path.GetFileNameWithoutExtension(Pfad3) + " " + SoftSubs2(i) + Path.GetExtension(Pfad3)), "ass")
'MsgBox(FN)
If i = 0 Then
FN = Path.ChangeExtension(Path.GetFileName(Pfad3), "ass")
LabelEpisode = SoftSubs2(i)
Dim SoftSub As String() = WebbrowserText.Split(New String() {Chr(34) + "language" + Chr(34) + ":" + Chr(34) + SoftSubs2(i) + Chr(34) + "," + Chr(34) + "url" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim SoftSub_2 As String() = SoftSub(1).Split(New [Char]() {Chr(34)})
Dim SoftSub_3 As String = SoftSub_2(0).Replace("\/", "/")
Dim client0 As New WebClient
client0.Encoding = Encoding.UTF8
Dim str0 As String = client0.DownloadString(SoftSub_3)
Dim Pfad3 As String = Pfad2.Replace(Chr(34), "")
Dim FN As String = Path.ChangeExtension(Path.Combine(Path.GetFileNameWithoutExtension(Pfad3) + " " + SoftSubs2(i) + Path.GetExtension(Pfad3)), "ass")
'MsgBox(FN)
End If
Dim Pfad4 As String = Path.Combine(Path.GetDirectoryName(Pfad3), FN)
'MsgBox(Pfad4)
File.WriteAllText(Pfad4, str0, Encoding.UTF8)
Pause(1)
If i = 0 Then
FN = Path.ChangeExtension(Path.GetFileName(Pfad3), "ass")
'MsgBox(FN)
End If
Dim Pfad4 As String = Path.Combine(Path.GetDirectoryName(Pfad3), FN)
'MsgBox(Pfad4)
File.WriteAllText(Pfad4, str0, Encoding.UTF8)
Pause(1)
Catch ex As Exception
Me.Invoke(New Action(Function()
einstellungen.StatusLabel.Text = "Status: failed - " + HardSubValuesToDisplay(Chr(34) + SoftSubs2(ii) + Chr(34))
Pause(3)
Return Nothing
End Function))
End Try
Next
Else
@ -2437,37 +2445,9 @@ Public Class Main
End Sub
Private Sub Timer3_Tick(sender As Object, e As EventArgs) Handles Timer3.Tick
'Try
' If Anime_Add.Visible = True Then
' num.Visible = False
' Else
' If ListBoxList.Count > 9 Then
' num.Location = New Point(69, 0)
' num.Text = ListBoxList.Count.ToString
' Btn_add.Controls.Add(num)
' num.Visible = True
' num2.Location = New Point(69, 0)
' num2.Text = ListBoxList.Count.ToString
' Btn_add.Controls.Add(num2)
' num2.Visible = True
' ElseIf ListBoxList.Count > 0 Then
' num.Location = New Point(74, 0)
' num.Text = ListBoxList.Count.ToString
' num.Visible = True
' Btn_add.Controls.Add(num)
' Else
' num.Visible = False
' End If
' End If
'Catch ex As Exception
' Debug.WriteLine(ex.ToString)
'End Try
Try
Dim GeckoHTML As String = My.Resources.htmlTop + vbNewLine + My.Resources.htmlTitlel.Replace("Placeholder", StatusMainForm.Text)
Dim GeckoHTML As String = My.Resources.htmlTop + vbNewLine + My.Resources.htmlTitlel.Replace("Placeholder", StatusMainForm.Text.Replace("open the add window to continue", ""))
Dim LiAdd As String = Nothing
For ii As Integer = 0 To ItemList.Count - 1
For i As Integer = 0 To liList.Count - 1
@ -2615,12 +2595,18 @@ Public Class Main
Else
If Application.OpenForms().OfType(Of Anime_Add).Any = True Then
Me.Invoke(New Action(Function()
Anime_Add.ListBox1.Items.Add(WebbrowserURL)
If Anime_Add.ListBox1.Items.Contains(WebbrowserURL) = False Then
Anime_Add.ListBox1.Items.Add(WebbrowserURL)
End If
'Anime_Add.ListBox1.Items.Add(WebbrowserURL)
Return Nothing
End Function))
Else
ListBoxList.Add(WebbrowserURL)
If ListBoxList.Contains(WebbrowserURL) = False Then
ListBoxList.Add(WebbrowserURL)
End If
'ListBoxList.Add(WebbrowserURL)
End If
End If
strRequest = rootPath & "Post_Single_Sucess.html" 'PostPage
@ -2657,17 +2643,23 @@ Public Class Main
For i As Integer = 0 To URLSplit.Count - 1
Dim ii As Integer = i
Me.Invoke(New Action(Function()
Anime_Add.ListBox1.Items.Add(URLSplit(ii))
If Anime_Add.ListBox1.Items.Contains(URLSplit(ii)) = False Then
Anime_Add.ListBox1.Items.Add(URLSplit(ii))
End If
'Anime_Add.ListBox1.Items.Add(URLSplit(ii))
Return Nothing
End Function))
Next
Else
For i As Integer = 0 To URLSplit.Count - 1
ListBoxList.Add(URLSplit(i))
If ListBoxList.Contains(URLSplit(i)) = False Then
ListBoxList.Add(URLSplit(i))
End If
Next
Me.Invoke(New Action(Function()
StatusMainForm.Text = "Status: " + ListBoxList.Count.ToString + " Downloads in queue"
StatusMainForm.Text = "Status: " + ListBoxList.Count.ToString + " Downloads in queue" + vbNewLine + "open the add window to continue"
Return Nothing
End Function))
End If
@ -2694,7 +2686,10 @@ Public Class Main
If Funimation_Grapp_RDY = True Then
If RunningDownloads >= MaxDL Then
ListBoxList.Add(WebbrowserURL)
If ListBoxList.Contains(WebbrowserURL) = False Then
ListBoxList.Add(WebbrowserURL)
End If
'ListBoxList.Add(WebbrowserURL)
Else
Me.Invoke(New Action(Function()
GeckoFX.WebBrowser1.Navigate(WebbrowserURL)
@ -2707,12 +2702,17 @@ Public Class Main
Else
If Application.OpenForms().OfType(Of Anime_Add).Any = True Then
Me.Invoke(New Action(Function()
Anime_Add.ListBox1.Items.Add(WebbrowserURL)
If Anime_Add.ListBox1.Items.Contains(WebbrowserURL) = False Then
Anime_Add.ListBox1.Items.Add(WebbrowserURL)
End If
Return Nothing
End Function))
Else
ListBoxList.Add(WebbrowserURL)
If ListBoxList.Contains(WebbrowserURL) = False Then
ListBoxList.Add(WebbrowserURL)
End If
Me.Invoke(New Action(Function()
StatusMainForm.Text = "Status: " + ListBoxList.Count.ToString + " Downloads in queue"
Return Nothing
@ -2873,10 +2873,10 @@ Public Class Main
End Sub
Private Sub PictureBox6_Click(sender As Object, e As EventArgs) Handles PictureBox6.Click
If Me.Height = 670 Then
Me.Height = 558
If Me.Height = 741 Then
Me.Height = 629
Else
Me.Height = 670
Me.Height = 741
End If
End Sub

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -148,9 +148,6 @@
<data name="add_mass_cancel" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\add_mass_cancel.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ads_midroll" xml:space="preserve">
<value>"type":"midroll"</value>
</data>
<data name="main_del_hover" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\main-del-hover.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@ -236,9 +233,6 @@
<data name="LoginSuccess" xml:space="preserve">
<value>"error":false,"code":"ok"</value>
</data>
<data name="ads_preroll" xml:space="preserve">
<value>{"type":"preroll","offset":0},</value>
</data>
<data name="Funimation_Subtitle_String" xml:space="preserve">
<value>", "kind": "subtitle", "type": "CC", "language": "en"</value>
</data>
@ -476,4 +470,27 @@ I delete the curremt session with the unlock, if you want to be logged in with t
<data name="ffmpeg_user_agend" xml:space="preserve">
<value>"User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0"</value>
</data>
<data name="ass_template" xml:space="preserve">
<value>[Script Info]
; Template for error handling in the Crunchyrol Downloader by hama3254 https://github.com/hama3254/Crunchyroll-Downloader-v3.0
; ass file from https://github.com/Aegisub/Aegisub/blob/master/automation/v4-docs/template-scripting-ideas.ass
; Script generated by Aegisub v2.00 PRE-RELEASE (SVN r939, jfs)
; http://www.aegisub.net
Title: Default Aegisub file
ScriptType: v4.00+
WrapStyle: 0
PlayResX: 640
PlayResY: 480
Video Aspect Ratio: 0
Video Zoom: 6
Video Position: 0
[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Arial,20,&amp;H00FFFFFF,&amp;H0000FFFF,&amp;H00000000,&amp;H00000000,0,0,0,0,100,100,0,0,1,2,2,2,10,10,10,0
[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:00.00,0:00:00.00,Default,,0000,0000,0000,,some ideas on how templated karaoke could work in auto4/lua</value>
</data>
</root>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

View File

@ -47,14 +47,24 @@ Crunchyroll Downloader
Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
</summary>
</member>
<member name="P:Crunchyroll_Downloader.My.Resources.Resources.ads_midroll">
<member name="P:Crunchyroll_Downloader.My.Resources.Resources.ass_template">
<summary>
Sucht eine lokalisierte Zeichenfolge, die &quot;type&quot;:&quot;midroll&quot; ähnelt.
</summary>
</member>
<member name="P:Crunchyroll_Downloader.My.Resources.Resources.ads_preroll">
<summary>
Sucht eine lokalisierte Zeichenfolge, die {&quot;type&quot;:&quot;preroll&quot;,&quot;offset&quot;:0}, ähnelt.
Sucht eine lokalisierte Zeichenfolge, die [Script Info]
; Template for error handling in the Crunchyrol Downloader by hama3254 https://github.com/hama3254/Crunchyroll-Downloader-v3.0
; ass file from https://github.com/Aegisub/Aegisub/blob/master/automation/v4-docs/template-scripting-ideas.ass
; Script generated by Aegisub v2.00 PRE-RELEASE (SVN r939, jfs)
; http://www.aegisub.net
Title: Default Aegisub file
ScriptType: v4.00+
WrapStyle: 0
PlayResX: 640
PlayResY: 480
Video Aspect Ratio: 0
Video Zoom: 6
Video Position: 0
[V4+ Styles]
[Rest der Zeichenfolge wurde abgeschnitten]&quot;; ähnelt.
</summary>
</member>
<member name="P:Crunchyroll_Downloader.My.Resources.Resources.backgroud">

View File

@ -1,22 +0,0 @@
Operating System: Microsoft Windows 10 Pro
Crunchyroll URL: http://www.crunchyroll.com/de/rwby/episode-45-world-of-remnant-1-dust-658499
subtitle language: None
video resolution: 360
error message: System.InvalidCastException: Ungültige Konvertierung von der Zeichenfolge enUS in Typ Integer. ---> System.FormatException: Die Eingabezeichenfolge hat das falsche Format.
bei Microsoft.VisualBasic.CompilerServices.Conversions.ParseDouble(String Value, NumberFormatInfo NumberFormat)
bei Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
--- Ende der internen Ausnahmestapelüberwachung ---
bei Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
bei Crunchyroll_Downloader.Main.GrappURL() in D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0\Crunchyroll Downloader\Main.vb:Zeile 1534.
bei Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(String Value)
bei Crunchyroll_Downloader.Main.GrappURL() in D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0\Crunchyroll Downloader\Main.vb:Zeile 1534.
softsubs enabled?: System.Collections.Generic.List`1[System.String]
Crunchyroll Downloader Version: 3.5.6
detected location from Crunchyroll: at

View File

@ -42,7 +42,9 @@
<i class="checkmark"></i>
</div>
<h1>Failed!</h1>
<p>no video found</p>
<p>System.Net.Sockets.SocketException (0x80004005): Eine vorhandene Verbindung wurde vom Remotehost geschlossen
bei System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
bei Crunchyroll_Downloader.Main.ProcessRequest(Socket clientSocket) in D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0\Crunchyroll Downloader\Main.vb:Zeile 2541.</p>
</div>
</body>
</html>

Binary file not shown.

View File

@ -90,6 +90,7 @@ Partial Class einstellungen
Me.A720p = New System.Windows.Forms.RadioButton()
Me.A1080p = New System.Windows.Forms.RadioButton()
Me.TabPage1 = New System.Windows.Forms.TabPage()
Me.GroupBox8 = New System.Windows.Forms.GroupBox()
Me.PictureBox6 = New System.Windows.Forms.PictureBox()
Me.GroupBox5 = New System.Windows.Forms.GroupBox()
Me.Server = New System.Windows.Forms.CheckBox()
@ -126,6 +127,7 @@ Partial Class einstellungen
Me.MenuStrip1.SuspendLayout()
Me.GB_Resolution.SuspendLayout()
Me.TabPage1.SuspendLayout()
Me.GroupBox8.SuspendLayout()
CType(Me.PictureBox6, System.ComponentModel.ISupportInitialize).BeginInit()
Me.GroupBox5.SuspendLayout()
Me.GroupBox1.SuspendLayout()
@ -842,7 +844,7 @@ Partial Class einstellungen
'TabPage1
'
Me.TabPage1.BackColor = System.Drawing.Color.FromArgb(CType(CType(243, Byte), Integer), CType(CType(243, Byte), Integer), CType(CType(243, Byte), Integer))
Me.TabPage1.Controls.Add(Me.PictureBox6)
Me.TabPage1.Controls.Add(Me.GroupBox8)
Me.TabPage1.Controls.Add(Me.GroupBox5)
Me.TabPage1.Controls.Add(Me.GroupBox1)
Me.TabPage1.Controls.Add(Me.DL_Count_simultaneous)
@ -853,11 +855,23 @@ Partial Class einstellungen
Me.TabPage1.TabIndex = 0
Me.TabPage1.Text = "Settings"
'
'GroupBox8
'
Me.GroupBox8.BackColor = System.Drawing.Color.Transparent
Me.GroupBox8.Controls.Add(Me.PictureBox6)
Me.GroupBox8.Font = New System.Drawing.Font("Arial", 9.75!)
Me.GroupBox8.ForeColor = System.Drawing.Color.Black
Me.GroupBox8.Location = New System.Drawing.Point(6, 311)
Me.GroupBox8.Name = "GroupBox8"
Me.GroupBox8.Size = New System.Drawing.Size(456, 94)
Me.GroupBox8.TabIndex = 44
Me.GroupBox8.TabStop = False
'
'PictureBox6
'
Me.PictureBox6.Cursor = System.Windows.Forms.Cursors.Hand
Me.PictureBox6.Image = Global.Crunchyroll_Downloader.My.Resources.Resources.main_credits_default
Me.PictureBox6.Location = New System.Drawing.Point(192, 338)
Me.PictureBox6.Location = New System.Drawing.Point(182, 30)
Me.PictureBox6.Name = "PictureBox6"
Me.PictureBox6.Size = New System.Drawing.Size(76, 39)
Me.PictureBox6.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
@ -882,7 +896,7 @@ Partial Class einstellungen
'Server
'
Me.Server.AutoSize = True
Me.Server.Location = New System.Drawing.Point(271, 29)
Me.Server.Location = New System.Drawing.Point(285, 29)
Me.Server.Name = "Server"
Me.Server.Size = New System.Drawing.Size(129, 20)
Me.Server.TabIndex = 42
@ -1069,7 +1083,8 @@ Partial Class einstellungen
Me.GB_Resolution.ResumeLayout(False)
Me.GB_Resolution.PerformLayout()
Me.TabPage1.ResumeLayout(False)
Me.TabPage1.PerformLayout()
Me.GroupBox8.ResumeLayout(False)
Me.GroupBox8.PerformLayout()
CType(Me.PictureBox6, System.ComponentModel.ISupportInitialize).EndInit()
Me.GroupBox5.ResumeLayout(False)
Me.GroupBox5.PerformLayout()
@ -1167,4 +1182,5 @@ Partial Class einstellungen
Public WithEvents CBptBR As CheckBox
Public WithEvents CBdeDE As CheckBox
Public WithEvents CBenUS As CheckBox
Friend WithEvents GroupBox8 As GroupBox
End Class

View File

@ -121,9 +121,9 @@
<value>17, 17</value>
</metadata>
<metadata name="ToolTip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>461, 17</value>
<value>205, 21</value>
</metadata>
<metadata name="MenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>346, 17</value>
<value>105, 19</value>
</metadata>
</root>

View File

@ -8,7 +8,6 @@ Imports System.Threading
Public Class einstellungen
Private Sub einstellungen_Load(sender As Object, e As EventArgs) Handles MyBase.Load
For i As Integer = 0 To Main.SoftSubs.Count - 1
If Main.SoftSubs(i) = "deDE" Then
CBdeDE.Checked = True
@ -630,5 +629,7 @@ Public Class einstellungen
End Sub
#End Region
End Class

View File

@ -47,14 +47,24 @@ Crunchyroll Downloader
Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
</summary>
</member>
<member name="P:Crunchyroll_Downloader.My.Resources.Resources.ads_midroll">
<member name="P:Crunchyroll_Downloader.My.Resources.Resources.ass_template">
<summary>
Sucht eine lokalisierte Zeichenfolge, die &quot;type&quot;:&quot;midroll&quot; ähnelt.
</summary>
</member>
<member name="P:Crunchyroll_Downloader.My.Resources.Resources.ads_preroll">
<summary>
Sucht eine lokalisierte Zeichenfolge, die {&quot;type&quot;:&quot;preroll&quot;,&quot;offset&quot;:0}, ähnelt.
Sucht eine lokalisierte Zeichenfolge, die [Script Info]
; Template for error handling in the Crunchyrol Downloader by hama3254 https://github.com/hama3254/Crunchyroll-Downloader-v3.0
; ass file from https://github.com/Aegisub/Aegisub/blob/master/automation/v4-docs/template-scripting-ideas.ass
; Script generated by Aegisub v2.00 PRE-RELEASE (SVN r939, jfs)
; http://www.aegisub.net
Title: Default Aegisub file
ScriptType: v4.00+
WrapStyle: 0
PlayResX: 640
PlayResY: 480
Video Aspect Ratio: 0
Video Zoom: 6
Video Position: 0
[V4+ Styles]
[Rest der Zeichenfolge wurde abgeschnitten]&quot;; ähnelt.
</summary>
</member>
<member name="P:Crunchyroll_Downloader.My.Resources.Resources.backgroud">