small changes

changed startup error message
added user notification for funimation hardsub
added check for running download in the loop
fix tcp listener issue
This commit is contained in:
hama3254 2021-01-22 22:45:01 +01:00
parent 8e907e05d0
commit bec0ecaada
15 changed files with 56 additions and 35 deletions

Binary file not shown.

View File

@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Crunchyroll Downloader Addon",
"version": "0.2.0",
"version": "0.3.0",
"description": "A Firefox Addon for my Crunchyroll Downloader",

View File

@ -34,7 +34,7 @@ Namespace My
Try
Dim sUserAgent As String = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0"
Dim sUserAgent As String = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0"
'sUserAgent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36"
Xpcom.Initialize("Firefox")
'MsgBox(Xpcom.XulRunnerVersion)
@ -48,22 +48,17 @@ Namespace My
'Xpcom.Initialize("C:\Program Files\Mozilla Firefox")
GeckoPreferences.Default("browser.cache.disk.enable") = False
GeckoPreferences.Default("network.cookie.thirdparty.sessionOnly") = False
'GeckoPreferences.Default("extensions.blocklist.enabled") = False
GeckoPreferences.Default("Services.sync.prefs.sync.privacy.clearOnShutdown.cookies") = False
GeckoPreferences.Default("plugin.state.flash") = 0
GeckoPreferences.Default("zoom.maxPercent") = 100
GeckoPreferences.Default("zoom.minPercent") = 100
GeckoPreferences.Default("layers.geometry.d3d11.enabled") = False
'GeckoPreferences.Default("network.proxy.http") = "51.159.26.44"
'GeckoPreferences.Default("network.proxy.http_port") = 3128
'GeckoPreferences.Default("network.proxy.ssl") = "51.159.26.44"
'GeckoPreferences.Default("network.proxy.ssl_port") = 3128
'GeckoPreferences.Default("network.proxy.type") = 1
Return True
Catch ex As Exception
MsgBox(ex.ToString)
MsgBox(ex.ToString + vbNewLine + "this is usual fixed by installing the x86 version from the Visual C++ redistributable" + vbNewLine + "https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads")
Return False
End Try

View File

@ -763,6 +763,19 @@ Public Class Main
'FontLabel.Visible = True
'FontLabel.Text = RunningDownloads
If Grapp_RDY = True Then
Try
Dim ItemFinshedCount As Integer = 0
For i2 As Integer = 0 To ListView1.Items.Count - 1
If ItemList(i2).GetIsStatusFinished() = True Then
ItemFinshedCount = ItemFinshedCount + 1
End If
Next
RunningDownloads = ListView1.Items.Count - ItemFinshedCount
Catch ex As Exception
RunningDownloads = ListView1.Items.Count
End Try
If RunningDownloads < MaxDL Then
Exit For
Else
@ -1817,15 +1830,21 @@ Public Class Main
For i As Integer = 0 To ListView1.Items.Count - 1
ItemList(i).KillRunningTask()
Next
'RunServer = False
tcpListener.Stop()
Try
tcpListener.Stop()
Catch ex As Exception
End Try
RemoveTempFiles()
Me.Close()
End If
Else
'RunServer = False
Try
tcpListener.Stop()
Catch ex As Exception
End Try
tcpListener.Stop()
Timer3.Enabled = False
RemoveTempFiles()
Me.Close()
@ -2132,7 +2151,7 @@ Public Class Main
RunningDownloads = ListView1.Items.Count - ItemFinshedCount
Catch ex As Exception
RunningDownloads = ListView1.Items.Count
End Try
'FontLabel2.Text = RunningDownloads.ToString
End Sub

View File

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

View File

@ -1152,7 +1152,7 @@ Partial Class Einstellungen
Me.TabControl1.FontWeight = MetroFramework.MetroTabControlWeight.Regular
Me.TabControl1.Location = New System.Drawing.Point(22, 60)
Me.TabControl1.Name = "TabControl1"
Me.TabControl1.SelectedIndex = 5
Me.TabControl1.SelectedIndex = 3
Me.TabControl1.Size = New System.Drawing.Size(501, 500)
Me.TabControl1.TabIndex = 38
Me.TabControl1.UseSelectable = True
@ -1167,10 +1167,10 @@ Partial Class Einstellungen
Me.TabPage6.HorizontalScrollbarBarColor = True
Me.TabPage6.HorizontalScrollbarHighlightOnWheel = False
Me.TabPage6.HorizontalScrollbarSize = 10
Me.TabPage6.Location = New System.Drawing.Point(4, 35)
Me.TabPage6.Location = New System.Drawing.Point(4, 44)
Me.TabPage6.Name = "TabPage6"
Me.TabPage6.Padding = New System.Windows.Forms.Padding(3)
Me.TabPage6.Size = New System.Drawing.Size(493, 461)
Me.TabPage6.Size = New System.Drawing.Size(493, 452)
Me.TabPage6.TabIndex = 4
Me.TabPage6.Text = "Funimation"
Me.TabPage6.VerticalScrollbarBarColor = True
@ -1410,9 +1410,9 @@ Partial Class Einstellungen
Me.TabPage7.Controls.Add(Me.Label4)
Me.TabPage7.Controls.Add(Me.Label6)
Me.TabPage7.Controls.Add(Me.Label5)
Me.TabPage7.Location = New System.Drawing.Point(4, 44)
Me.TabPage7.Location = New System.Drawing.Point(4, 35)
Me.TabPage7.Name = "TabPage7"
Me.TabPage7.Size = New System.Drawing.Size(493, 452)
Me.TabPage7.Size = New System.Drawing.Size(493, 461)
Me.TabPage7.TabIndex = 5
Me.TabPage7.Text = "About "
'

View File

@ -783,21 +783,7 @@ Public Class Einstellungen
End Sub
Private Sub FunimationHardsub_Click(sender As Object, e As EventArgs)
If FFMPEG_CommandP1.Text = "-c copy" Then
If CB_Fun_HardSubs.SelectedItem = "Disabled" Then
Else
If MessageBox.Show("This feature does not work with the current output setting." + vbNewLine + "Do you want to ignore the output settings?", "Settings incompatible", MessageBoxButtons.YesNo) = DialogResult.Yes Then
'FunimationHardsub.Checked = True
Else
CB_Fun_HardSubs.SelectedItem = "Disabled"
End If
End If
Else
End If
End Sub
Private Sub Label7_Click(sender As Object, e As EventArgs)
Process.Start("https://bitbucket.org/geckofx/geckofx-60.0/src/default/")
@ -900,6 +886,27 @@ Public Class Einstellungen
Private Sub CB_Fun_HardSubs_SelectedIndexChanged(sender As Object, e As EventArgs) Handles CB_Fun_HardSubs.SelectedIndexChanged
If CB_Fun_HardSubs.SelectedIndex = 0 Then
Else
If Main.HardSubFunimation = "Disabled" Then
If FFMPEG_CommandP1.Text = "-c copy" Then
If MessageBox.Show("Funimation hard subtitle are post-processed." + vbNewLine + "This cost a lot of performance and it should not more than one download run at the time!", "Prepare for unforeseen consequences.", MessageBoxButtons.YesNo) = DialogResult.Yes Then
Else
CB_Fun_HardSubs.SelectedIndex = 0
End If
End If
End If
End If
End Sub