drwaing replaced with item

drwaing replaced with item
This commit is contained in:
hama3254 2020-09-09 21:41:47 +02:00
parent ec3f0b3bbe
commit c16e1b7938
23 changed files with 232 additions and 14 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.groupBox1)
Me.Controls.Add(Me.GroupBox3)
Me.Controls.Add(Me.groupBox2)
Me.Controls.Add(Me.groupBox1)
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
Me.Name = "Anime_Add"
Me.Text = "Add"

View File

@ -33,6 +33,7 @@ Partial Class CRD_List_Item
Me.Label_percent = New System.Windows.Forms.Label()
Me.ProgressBar1 = New System.Windows.Forms.ProgressBar()
Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
CType(Me.PB_Thumbnail, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.bt_pause, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.bt_del, System.ComponentModel.ISupportInitialize).BeginInit()
@ -51,7 +52,7 @@ Partial Class CRD_List_Item
'
'bt_pause
'
Me.bt_pause.BackgroundImage = Global.Crunchyroll_Downloader.My.Resources.main_pause
Me.bt_pause.BackgroundImage = Global.Crunchyroll_Downloader.My.Resources.Resources.main_pause
Me.bt_pause.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
Me.bt_pause.Location = New System.Drawing.Point(740, 15)
Me.bt_pause.Name = "bt_pause"
@ -128,6 +129,10 @@ Partial Class CRD_List_Item
Me.ProgressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous
Me.ProgressBar1.TabIndex = 8
'
'Timer1
'
Me.Timer1.Enabled = True
'
'CRD_List_Item
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@ -162,4 +167,5 @@ Partial Class CRD_List_Item
Friend WithEvents Label_percent As Label
Friend WithEvents ProgressBar1 As ProgressBar
Friend WithEvents ToolTip1 As ToolTip
Friend WithEvents Timer1 As Timer
End Class

View File

@ -120,4 +120,7 @@
<metadata name="ToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>19, 12</value>
</metadata>
<metadata name="Timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>118, 12</value>
</metadata>
</root>

View File

@ -1,6 +1,7 @@
Imports System.Net
Imports System.Text
Imports System.IO
Imports System.Threading
Imports Microsoft.Win32
Imports System.ComponentModel
@ -8,6 +9,7 @@ Public Class CRD_List_Item
Dim ZeitGesamtInteger As Integer = 0
Dim ListOfStreams As New List(Of String)
Dim proc As New Process
Dim ThreadList As New List(Of Thread)
Dim StatusRunning As Boolean = True
Dim UsedMap As String = Nothing
@ -187,6 +189,50 @@ Public Class CRD_List_Item
End Sub
#Region "Download + Update UI"
Private Sub tsDownloadAsync(ByVal DL_URL As String, ByVal DL_Pfad As String)
Dim wc_ts As New WebClient
wc_ts.DownloadFile(New Uri(DL_URL), DL_Pfad)
End Sub
Private Function tsStatusAsync(ByVal prozent As Integer, ByVal di As IO.DirectoryInfo, ByVal Filename As String, ByVal pausetime As Integer)
Dim Now As Date = Date.Now
Dim FinishedSize As Double = 0
Dim AproxFinalSize As Double = 0
Try
Dim aryFi As IO.FileInfo() = di.GetFiles("*.ts")
Dim fi As IO.FileInfo
For Each fi In aryFi
FinishedSize = FinishedSize + Math.Round(fi.Length / 1048576, 2, MidpointRounding.AwayFromZero).ToString()
Next
Catch ex As Exception
End Try
'Thread.Sleep(1000)
'Pause(1)
If prozent > 0 Then
AproxFinalSize = Math.Round(FinishedSize * 100 / prozent, 2, MidpointRounding.AwayFromZero).ToString() ' Math.Round( / 1048576, 2, MidpointRounding.AwayFromZero).ToString()
End If
Dim duration As TimeSpan = Date.Now - di.CreationTime
Dim TimeinSeconds As Integer = duration.Hours * 3600 + duration.Minutes * 60 + duration.Seconds
TimeinSeconds = TimeinSeconds - pausetime
Dim DataRate As Double = FinishedSize / TimeinSeconds
Dim DataRateString As String = Math.Round(DataRate, 2, MidpointRounding.AwayFromZero).ToString()
If prozent > 100 Then
prozent = 100
End If
Me.Invoke(New Action(Function()
ProgressBar1.Value = prozent
Label_percent.Text = DataRateString + "MB\s " + Math.Round(FinishedSize, 2, MidpointRounding.AwayFromZero).ToString + "MB/" + Math.Round(AproxFinalSize, 2, MidpointRounding.AwayFromZero).ToString + "MB " + prozent.ToString + "%"
Return Nothing
End Function))
'RaiseEvent UpdateUI(Filename, prozent, FinishedSize, AproxFinalSize, Color.FromArgb(247, 140, 37), DataRateString + "MB\s")
Return Nothing
End Function
Public Function DownloadFFMPEG(ByVal DL_URL As String, ByVal DL_Pfad As String, ByVal Filename As String) As String
DownloadPfad = DL_Pfad
@ -194,10 +240,101 @@ Public Class CRD_List_Item
HistoryDL_Pfad = DL_Pfad
HistoryFilename = Filename
If Debug2 = True Then
MsgBox(DL_URL + vbNewLine + DL_Pfad + vbNewLine + Filename)
End If
Dim client0 As New WebClient
client0.Encoding = Encoding.UTF8
Dim text As String = client0.DownloadString(DL_URL)
Dim textLenght() As String = text.Split(New String() {vbLf}, System.StringSplitOptions.RemoveEmptyEntries)
Dim Fragments() As String = text.Split(New String() {"https:"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim FragmentsInt As Integer = Fragments.Count - 2
Dim nummerint As Integer = -1
Dim m3u8FFmpeg As String = Nothing
Dim ts_dl As String = Nothing
Dim Folder As String = einstellungen.GeräteID()
Dim Pfad2 As String = Application.StartupPath + "\" + Folder + "\"
If Debug2 = True Then
MsgBox(Pfad2)
End If
Dim PauseTime As Integer = 0
If Not Directory.Exists(Path.GetDirectoryName(Pfad2)) Then
' Nein! Jetzt erstellen...
Try
Directory.CreateDirectory(Path.GetDirectoryName(Pfad2))
Catch ex As Exception
MsgBox("Temp folder creation failed")
Return Nothing
Exit Function
' Ordner wurde nich erstellt
'Pfad2 = Pfad + "\" + CR_FilenName_Backup + ".mp4"
End Try
End If
Dim di As New IO.DirectoryInfo(Pfad2)
For i As Integer = 0 To textLenght.Length - 1
If InStr(textLenght(i), "https") Then
If nummerint > -1 Then
'MsgBox(" " + DL_Pfad)
For w As Integer = 0 To Integer.MaxValue
If StatusRunning = False Then
'MsgBox(True.ToString)
Thread.Sleep(5000)
PauseTime = PauseTime + 5
ElseIf ThreadList.Count > 7 Then
Thread.Sleep(250)
Else
'Thread.Sleep(250)
Exit For
End If
Next
'dl1
nummerint = nummerint + 1
Dim nummer4D As String = String.Format("{0:0000}", nummerint)
Dim i2weilsVSsowill As Integer = i
Dim Evaluator = New Thread(Sub() Me.tsDownloadAsync(textLenght(i2weilsVSsowill), Pfad2 + nummer4D + ".ts"))
Evaluator.Start()
ThreadList.Add(Evaluator)
m3u8FFmpeg = m3u8FFmpeg + Pfad2 + nummer4D + ".ts" + vbLf
Dim FragmentsFinised = (ThreadList.Count + nummerint) / FragmentsInt * 100
'Dim status = New Thread(Sub() Me.tsStatusAsync(FragmentsFinised, di, Filename))
'status.Start()
tsStatusAsync(FragmentsFinised, di, Filename, PauseTime)
Else
m3u8FFmpeg = m3u8FFmpeg + textLenght(i) + vbLf
nummerint = 0
End If
ElseIf textLenght(i) = "#EXT-X-PLAYLIST-TYPE:VOD" Then
Else
m3u8FFmpeg = m3u8FFmpeg + textLenght(i) + vbLf
End If
Next
Dim utf8WithoutBom As New System.Text.UTF8Encoding(False)
Using sink As New StreamWriter("index" + Folder + ".m3u8", False, utf8WithoutBom)
sink.WriteLine(m3u8FFmpeg)
End Using
For w As Integer = 0 To Integer.MaxValue
If ThreadList.Count > 0 Then
Thread.Sleep(250)
Else
Thread.Sleep(250)
Exit For
End If
Next
tsStatusAsync(100, di, Filename, PauseTime)
DL_URL = "index" + Folder + ".m3u8"
'MsgBox(DL_URL)
Dim exepath As String = Application.StartupPath + "\ffmpeg.exe"
Dim startinfo As New System.Diagnostics.ProcessStartInfo
'Dim cmd As String = "-i " + Chr(34) + URL_DL + Chr(34) + " -c copy -bsf:a aac_adtstoasc " + Pfad_DL 'start ffmpeg with command strFFCMD string
Dim cmd As String = "-i " + Chr(34) + DL_URL + Chr(34) + " " + ffmpeg_command + " " + DL_Pfad 'start ffmpeg with command strFFCMD string
' Dim cmd As String = "-i " + Chr(34) + DL_URL + Chr(34) + " " + ffmpeg_command + " " + DL_Pfad 'start ffmpeg with command strFFCMD string
Dim cmd As String = "-protocol_whitelist file,crypto,http,https,tcp,tls -i " + Chr(34) + DL_URL + Chr(34) + " " + ffmpeg_command + " " + DL_Pfad 'start ffmpeg with command strFFCMD string
If MergeSubstoMP4 = True Then
If CBool(InStr(DL_URL, "-i " + Chr(34))) = True Then
cmd = DL_URL + " " + DL_Pfad
@ -404,5 +541,17 @@ Public Class CRD_List_Item
Next
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Try
For i As Integer = 0 To ThreadList.Count - 1
If ThreadList.Item(i).IsAlive Then
Else
ThreadList.Remove(ThreadList.Item(i))
End If
Next
Catch ex As Exception
End Try
End Sub
End Class

View File

@ -132,11 +132,13 @@ Public Class GeckoFX
Main.MassGrapp()
End If
Else
Main.b = True
MsgBox(Main.No_Stream, MsgBoxStyle.OkOnly)
Anime_Add.StatusLabel.Text = "Status: idle"
End If
Catch ex As Exception
MsgBox(ex.ToString)
Main.LabelUpdate = "Status: idle"
Anime_Add.StatusLabel.Text = "Status: idle"
End Try
ElseIf Main.c = False Then
If CBool(InStr(WebBrowser1.Document.Body.OuterHtml, "hardsub_lang")) Then

View File

@ -3,6 +3,8 @@ Imports System.Text
Imports System.IO
Imports Microsoft.Win32
Imports System.ComponentModel
Imports System.Threading
Public Class Main
Public ListBoxList As New List(Of String)
Dim ItemList As New List(Of CRD_List_Item)
@ -67,7 +69,7 @@ Public Class Main
Dim DL_Path_String As String = "Please choose download directory."
Public CR_Premium_Failed As String = "Can not verify the active premium membership."
Public No_Stream As String = "Please make sure that the URL is correct."
Public No_Stream As String = "Please make sure that the URL is correct or check if the Anime is available in your country."
Dim TaskNotCompleed As String = "Please wait until the current task is completed."
Dim Premium_Stream As String = "Please make sure that you logged in for this premium episode."
Dim Error_Mass_DL As String = "We run into a problem here." + vbNewLine + "You can try to download every episode individually."
@ -322,7 +324,9 @@ Public Class Main
'Item.SetLocations(r.Y)
'MsgBox("test " + r.Y.ToString)
Item.Visible = True
Item.DownloadFFMPEG(URL_DL, Pfad_DL, Pfad_DL)
Dim Evaluator = New Thread(Sub() Item.DownloadFFMPEG(URL_DL, Pfad_DL, Pfad_DL))
Evaluator.Start()
End Sub
#Region "Manga DL"
Public Sub MangaListItemAdd(ByVal NameP2 As String, ByVal ThumbnialURL As String, ByVal BaseURL As String, ByVal SiteList As List(Of String))

View File

@ -0,0 +1,31 @@
Operating System: Microsoft Windows 10 Pro
Crunchyroll URL: https://www.crunchyroll.com/de/rwby/episode-45-world-of-remnant-1-dust-658499
subtitle language: None
video resolution: 1080
error message: System.IO.DirectoryNotFoundException: Ein Teil des Pfades "Z:\Serien\RWBY Staffel 2 Folge 4 5.ass" konnte nicht gefunden werden.
bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
bei System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
bei System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
bei System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
bei System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
bei System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
bei System.IO.File.WriteAllText(String path, String contents, Encoding encoding)
bei Crunchyroll_Downloader.Main.GrappURL() in D:\Projecte\Crunchyroll Downloader - v3.0-final\experimental-Crunchyroll-Downloader-v3.x\Crunchyroll Downloader\Main.vb:Zeile 1329.
bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
bei System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
bei System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
bei System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
bei System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
bei System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost)
bei System.IO.File.WriteAllText(String path, String contents, Encoding encoding)
bei Crunchyroll_Downloader.Main.GrappURL() in D:\Projecte\Crunchyroll Downloader - v3.0-final\experimental-Crunchyroll-Downloader-v3.x\Crunchyroll Downloader\Main.vb:Zeile 1329.
softsubs enabled?: System.Collections.Generic.List`1[System.String]
Crunchyroll Downloader Version: 3.3.1
detected location from Crunchyroll: de

View File

@ -313,7 +313,7 @@ Public Class einstellungen
Private Function GeräteID() As String
Public Function GeräteID() As String
Dim rnd As New Random
Dim possible As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
Dim HWID As String = Nothing

View File

@ -1 +1 @@
0db4032339f4d8d75cab06e12a54a2b08d757c23
75a45bf6386027b5ab23a1fcfbdf5eb2842e692d

View File

@ -65,3 +65,26 @@ D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0 - Ko
D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0 - Kopie\Crunchyroll Downloader\bin\x86\Debug\Geckofx-Core.dll
D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0 - Kopie\Crunchyroll Downloader\bin\x86\Debug\Geckofx-Winforms.dll
D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0 - Kopie\Crunchyroll Downloader\obj\x86\Debug\Crunchyroll Downloader.vbproj.CopyComplete
D:\Projecte\Crunchyroll Downloader - v3.0-final\experimental-Crunchyroll-Downloader-v3.x\Crunchyroll Downloader\bin\x86\Debug\Crunchyroll Downloader.exe.config
D:\Projecte\Crunchyroll Downloader - v3.0-final\experimental-Crunchyroll-Downloader-v3.x\Crunchyroll Downloader\bin\x86\Debug\Crunchyroll Downloader.exe
D:\Projecte\Crunchyroll Downloader - v3.0-final\experimental-Crunchyroll-Downloader-v3.x\Crunchyroll Downloader\bin\x86\Debug\Crunchyroll Downloader.pdb
D:\Projecte\Crunchyroll Downloader - v3.0-final\experimental-Crunchyroll-Downloader-v3.x\Crunchyroll Downloader\bin\x86\Debug\Crunchyroll Downloader.xml
D:\Projecte\Crunchyroll Downloader - v3.0-final\experimental-Crunchyroll-Downloader-v3.x\Crunchyroll Downloader\bin\x86\Debug\Geckofx-Core.dll
D:\Projecte\Crunchyroll Downloader - v3.0-final\experimental-Crunchyroll-Downloader-v3.x\Crunchyroll Downloader\bin\x86\Debug\Geckofx-Winforms.dll
D:\Projecte\Crunchyroll Downloader - v3.0-final\experimental-Crunchyroll-Downloader-v3.x\Crunchyroll Downloader\obj\x86\Debug\Crunchyroll Downloader.vbprojAssemblyReference.cache
D:\Projecte\Crunchyroll Downloader - v3.0-final\experimental-Crunchyroll-Downloader-v3.x\Crunchyroll Downloader\obj\x86\Debug\Crunchyroll_Downloader.Anime_Add.resources
D:\Projecte\Crunchyroll Downloader - v3.0-final\experimental-Crunchyroll-Downloader-v3.x\Crunchyroll Downloader\obj\x86\Debug\Crunchyroll_Downloader.einstellungen.resources
D:\Projecte\Crunchyroll Downloader - v3.0-final\experimental-Crunchyroll-Downloader-v3.x\Crunchyroll Downloader\obj\x86\Debug\Crunchyroll_Downloader.Debug_Mode.resources
D:\Projecte\Crunchyroll Downloader - v3.0-final\experimental-Crunchyroll-Downloader-v3.x\Crunchyroll Downloader\obj\x86\Debug\Crunchyroll_Downloader.GeckoFX.resources
D:\Projecte\Crunchyroll Downloader - v3.0-final\experimental-Crunchyroll-Downloader-v3.x\Crunchyroll Downloader\obj\x86\Debug\Crunchyroll_Downloader.CRD_List_Item.resources
D:\Projecte\Crunchyroll Downloader - v3.0-final\experimental-Crunchyroll-Downloader-v3.x\Crunchyroll Downloader\obj\x86\Debug\Crunchyroll_Downloader.Login.resources
D:\Projecte\Crunchyroll Downloader - v3.0-final\experimental-Crunchyroll-Downloader-v3.x\Crunchyroll Downloader\obj\x86\Debug\Crunchyroll_Downloader.Startup.resources
D:\Projecte\Crunchyroll Downloader - v3.0-final\experimental-Crunchyroll-Downloader-v3.x\Crunchyroll Downloader\obj\x86\Debug\Crunchyroll_Downloader.Main.resources
D:\Projecte\Crunchyroll Downloader - v3.0-final\experimental-Crunchyroll-Downloader-v3.x\Crunchyroll Downloader\obj\x86\Debug\Crunchyroll_Downloader.Resources.resources
D:\Projecte\Crunchyroll Downloader - v3.0-final\experimental-Crunchyroll-Downloader-v3.x\Crunchyroll Downloader\obj\x86\Debug\Crunchyroll_Downloader.Reso.resources
D:\Projecte\Crunchyroll Downloader - v3.0-final\experimental-Crunchyroll-Downloader-v3.x\Crunchyroll Downloader\obj\x86\Debug\Crunchyroll Downloader.vbproj.GenerateResource.cache
D:\Projecte\Crunchyroll Downloader - v3.0-final\experimental-Crunchyroll-Downloader-v3.x\Crunchyroll Downloader\obj\x86\Debug\Crunchyroll Downloader.vbproj.CoreCompileInputs.cache
D:\Projecte\Crunchyroll Downloader - v3.0-final\experimental-Crunchyroll-Downloader-v3.x\Crunchyroll Downloader\obj\x86\Debug\Crunchyroll Downloader.vbproj.CopyComplete
D:\Projecte\Crunchyroll Downloader - v3.0-final\experimental-Crunchyroll-Downloader-v3.x\Crunchyroll Downloader\obj\x86\Debug\Crunchyroll Downloader.exe
D:\Projecte\Crunchyroll Downloader - v3.0-final\experimental-Crunchyroll-Downloader-v3.x\Crunchyroll Downloader\obj\x86\Debug\Crunchyroll Downloader.xml
D:\Projecte\Crunchyroll Downloader - v3.0-final\experimental-Crunchyroll-Downloader-v3.x\Crunchyroll Downloader\obj\x86\Debug\Crunchyroll Downloader.pdb

BIN
icon.xcf

Binary file not shown.