mirror of
https://github.com/hama3254/Crunchyroll-Downloader-v3.0.git
synced 2025-01-25 22:51:23 +01:00
hybride mode improvents
hybride mode performence improvents Hybride mode display improvents
This commit is contained in:
parent
4bc91db2fa
commit
a8dd770a9c
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -42,7 +42,13 @@ Public Class CRD_List_Item
|
|||||||
Dim TargetReso As Integer = 1080
|
Dim TargetReso As Integer = 1080
|
||||||
Dim HybrideLog As String = Nothing
|
Dim HybrideLog As String = Nothing
|
||||||
Dim Service As String = "CR"
|
Dim Service As String = "CR"
|
||||||
|
Dim ServiceSleep As Integer = 0
|
||||||
|
|
||||||
|
Dim LastDate As Date = Date.Now
|
||||||
|
Dim LastSize As Double = 0
|
||||||
|
Dim LastDataRate1 As Double = 0
|
||||||
|
Dim LastDataRate2 As Double = 0
|
||||||
|
Dim LastDataRate3 As Double = 0
|
||||||
|
|
||||||
|
|
||||||
#Region "Remove from list"
|
#Region "Remove from list"
|
||||||
@ -384,7 +390,7 @@ Public Class CRD_List_Item
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Function TS_StatusAsync(ByVal prozent As Integer, ByVal di As IO.DirectoryInfo, ByVal Filename As String, ByVal pausetime As Integer)
|
Private Function TS_StatusAsync(ByVal prozent As Integer, ByVal di As IO.DirectoryInfo, ByVal Filename As String, ByVal pausetime As Integer)
|
||||||
Dim Now As Date = Date.Now
|
'Dim Now As Date = Date.Now
|
||||||
|
|
||||||
Dim FinishedSize As Double = 0
|
Dim FinishedSize As Double = 0
|
||||||
Dim AproxFinalSize As Double = 0
|
Dim AproxFinalSize As Double = 0
|
||||||
@ -394,21 +400,46 @@ Public Class CRD_List_Item
|
|||||||
Dim aryFi As IO.FileInfo() = di.GetFiles("*.ts")
|
Dim aryFi As IO.FileInfo() = di.GetFiles("*.ts")
|
||||||
Dim fi As IO.FileInfo
|
Dim fi As IO.FileInfo
|
||||||
For Each fi In aryFi
|
For Each fi In aryFi
|
||||||
FinishedSize = FinishedSize + Math.Round(fi.Length / 1048576, 2, MidpointRounding.AwayFromZero).ToString()
|
FinishedSize = FinishedSize + fi.Length 'Math.Round(fi.Length / 1048576, 2, MidpointRounding.AwayFromZero).ToString()
|
||||||
Next
|
Next
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
End Try
|
End Try
|
||||||
'Thread.Sleep(1000)
|
''Thread.Sleep(1000)
|
||||||
'Pause(1)
|
''Pause(1)
|
||||||
|
|
||||||
If prozent > 0 Then
|
If prozent > 0 Then
|
||||||
AproxFinalSize = Math.Round(FinishedSize * 100 / prozent, 2, MidpointRounding.AwayFromZero).ToString() ' Math.Round( / 1048576, 2, MidpointRounding.AwayFromZero).ToString()
|
AproxFinalSize = Math.Round((FinishedSize / 1048576) * 100 / prozent, 2, MidpointRounding.AwayFromZero).ToString() ' Math.Round( / 1048576, 2, MidpointRounding.AwayFromZero).ToString()
|
||||||
End If
|
End If
|
||||||
Dim duration As TimeSpan = Date.Now - di.CreationTime
|
|
||||||
Dim TimeinSeconds As Integer = duration.Hours * 3600 + duration.Minutes * 60 + duration.Seconds
|
'Dim duration As TimeSpan = Date.Now - di.CreationTime
|
||||||
TimeinSeconds = TimeinSeconds - pausetime
|
'Dim TimeinSeconds As Integer = duration.Hours * 3600 + duration.Minutes * 60 + duration.Seconds
|
||||||
Dim DataRate As Double = FinishedSize / TimeinSeconds
|
'TimeinSeconds = TimeinSeconds - pausetime
|
||||||
Dim DataRateString As String = Math.Round(DataRate, 2, MidpointRounding.AwayFromZero).ToString()
|
'Dim DataRate As Double = FinishedSize / TimeinSeconds
|
||||||
|
'Dim DataRateString As String = Math.Round(DataRate, 2, MidpointRounding.AwayFromZero).ToString()
|
||||||
|
Dim duration As TimeSpan = Date.Now - LastDate
|
||||||
|
Dim TimeinMilliSeconds As Integer = duration.Seconds * 1000 + duration.Milliseconds
|
||||||
|
|
||||||
|
If FinishedSize = LastSize Then
|
||||||
|
ElseIf TimeinMilliSeconds < 250 Then
|
||||||
|
Else
|
||||||
|
|
||||||
|
|
||||||
|
LastDate = Date.Now
|
||||||
|
'TimeinSeconds = TimeinSeconds - pausetime
|
||||||
|
Dim SinceLast = FinishedSize - LastSize
|
||||||
|
LastSize = FinishedSize
|
||||||
|
|
||||||
|
Dim DataRate As Double = (SinceLast / 1048576) / (TimeinMilliSeconds / 1000)
|
||||||
|
Dim DataRateFinal As Double = (DataRate + LastDataRate1 + LastDataRate2 + LastDataRate3) / 4
|
||||||
|
LastDataRate3 = LastDataRate2
|
||||||
|
LastDataRate2 = LastDataRate1
|
||||||
|
LastDataRate1 = DataRate
|
||||||
|
Dim DataRateString As String = Math.Round(DataRateFinal, 2, MidpointRounding.AwayFromZero).ToString()
|
||||||
|
|
||||||
|
Debug.WriteLine("----------------")
|
||||||
|
Debug.WriteLine(SinceLast)
|
||||||
|
Debug.WriteLine(TimeinMilliSeconds)
|
||||||
|
Debug.WriteLine(DataRate)
|
||||||
If prozent > 100 Then
|
If prozent > 100 Then
|
||||||
prozent = 100
|
prozent = 100
|
||||||
ElseIf prozent < 0 Then
|
ElseIf prozent < 0 Then
|
||||||
@ -418,12 +449,13 @@ Public Class CRD_List_Item
|
|||||||
Me.Invoke(New Action(Function()
|
Me.Invoke(New Action(Function()
|
||||||
|
|
||||||
ProgressBar1.Value = prozent
|
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 + "%"
|
Label_percent.Text = DataRateString + "MB\s " + Math.Round(FinishedSize / 1048576, 2, MidpointRounding.AwayFromZero).ToString + "MB/" + Math.Round(AproxFinalSize, 2, MidpointRounding.AwayFromZero).ToString + "MB " + prozent.ToString + "%"
|
||||||
|
|
||||||
Return Nothing
|
Return Nothing
|
||||||
End Function))
|
End Function))
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
End Try
|
End Try
|
||||||
|
End If
|
||||||
'RaiseEvent UpdateUI(Filename, prozent, FinishedSize, AproxFinalSize, Color.FromArgb(247, 140, 37), DataRateString + "MB\s")
|
'RaiseEvent UpdateUI(Filename, prozent, FinishedSize, AproxFinalSize, Color.FromArgb(247, 140, 37), DataRateString + "MB\s")
|
||||||
|
|
||||||
Return Nothing
|
Return Nothing
|
||||||
@ -547,6 +579,7 @@ Public Class CRD_List_Item
|
|||||||
If Threads < 2 Then
|
If Threads < 2 Then
|
||||||
Threads = 2
|
Threads = 2
|
||||||
End If
|
End If
|
||||||
|
'Threads = 16
|
||||||
Dim di As New IO.DirectoryInfo(Pfad2)
|
Dim di As New IO.DirectoryInfo(Pfad2)
|
||||||
For i As Integer = 0 To textLenght.Length - 1
|
For i As Integer = 0 To textLenght.Length - 1
|
||||||
If InStr(textLenght(i), ".ts") Then
|
If InStr(textLenght(i), ".ts") Then
|
||||||
@ -557,7 +590,7 @@ Public Class CRD_List_Item
|
|||||||
Thread.Sleep(5000)
|
Thread.Sleep(5000)
|
||||||
PauseTime = PauseTime + 5
|
PauseTime = PauseTime + 5
|
||||||
ElseIf ThreadList.Count > Threads Then
|
ElseIf ThreadList.Count > Threads Then
|
||||||
Thread.Sleep(125)
|
Thread.Sleep(50)
|
||||||
ElseIf Canceld = True Then
|
ElseIf Canceld = True Then
|
||||||
For www As Integer = 0 To Integer.MaxValue
|
For www As Integer = 0 To Integer.MaxValue
|
||||||
If ThreadList.Count > 0 Then
|
If ThreadList.Count > 0 Then
|
||||||
@ -582,7 +615,7 @@ Public Class CRD_List_Item
|
|||||||
' Thread.Sleep(2000)
|
' Thread.Sleep(2000)
|
||||||
' Exit For
|
' Exit For
|
||||||
Else
|
Else
|
||||||
Thread.Sleep(1000)
|
Thread.Sleep(ServiceSleep)
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
@ -613,8 +646,11 @@ Public Class CRD_List_Item
|
|||||||
Evaluator.Start()
|
Evaluator.Start()
|
||||||
ThreadList.Add(Evaluator)
|
ThreadList.Add(Evaluator)
|
||||||
m3u8FFmpeg = m3u8FFmpeg + Pfad2 + nummer4D + ".ts" + vbLf '+ "#" + curi + vbLf
|
m3u8FFmpeg = m3u8FFmpeg + Pfad2 + nummer4D + ".ts" + vbLf '+ "#" + curi + vbLf
|
||||||
Dim FragmentsFinised = (ThreadList.Count + nummerint) / FragmentsInt * 100
|
|
||||||
TS_StatusAsync(FragmentsFinised, di, Filename, PauseTime)
|
Dim FragmentsFinised = nummerint / FragmentsInt * 100 '(ThreadList.Count + nummerint) / FragmentsInt * 100
|
||||||
|
Dim Update = New Thread(Sub() Me.TS_StatusAsync(FragmentsFinised, di, Filename, PauseTime))
|
||||||
|
Update.Start()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ElseIf textLenght(i) = "#EXT-X-PLAYLIST-TYPE:VOD" Then
|
ElseIf textLenght(i) = "#EXT-X-PLAYLIST-TYPE:VOD" Then
|
||||||
@ -1135,6 +1171,7 @@ Public Class CRD_List_Item
|
|||||||
|
|
||||||
If Service = "AoD" Then
|
If Service = "AoD" Then
|
||||||
MetroStyleManager1.Style = MetroColorStyle.LightGreen
|
MetroStyleManager1.Style = MetroColorStyle.LightGreen
|
||||||
|
ServiceSleep = 1000
|
||||||
ElseIf Service = "FM" Then
|
ElseIf Service = "FM" Then
|
||||||
MetroStyleManager1.Style = MetroColorStyle.DarkPurple
|
MetroStyleManager1.Style = MetroColorStyle.DarkPurple
|
||||||
Else
|
Else
|
||||||
|
@ -1859,7 +1859,7 @@ Public Class Main
|
|||||||
Try
|
Try
|
||||||
For s As Integer = 0 To ListView1.Items.Count - 1
|
For s As Integer = 0 To ListView1.Items.Count - 1
|
||||||
Dim r As Rectangle = ListView1.Items.Item(s).Bounds
|
Dim r As Rectangle = ListView1.Items.Item(s).Bounds
|
||||||
ItemList(s).SetBounds(r.X, r.Y, ListView1.Width - 2, r.Height)
|
ItemList(s).SetBounds(r.X, r.Y, ListView1.Width, r.Height)
|
||||||
|
|
||||||
If ItemList(s).GetToDispose() = True Then
|
If ItemList(s).GetToDispose() = True Then
|
||||||
ItemList(s).DisposeItem(ItemList(s).GetToDispose())
|
ItemList(s).DisposeItem(ItemList(s).GetToDispose())
|
||||||
|
@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
|||||||
' übernehmen, indem Sie "*" eingeben:
|
' übernehmen, indem Sie "*" eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("3.6.5")>
|
<Assembly: AssemblyVersion("3.6.6")>
|
||||||
<Assembly: AssemblyFileVersion("3.6.5")>
|
<Assembly: AssemblyFileVersion("3.6.6")>
|
||||||
<Assembly: NeutralResourcesLanguage("en")>
|
<Assembly: NeutralResourcesLanguage("en")>
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user