funimation processing improvments

funimation processing improvments
This commit is contained in:
hama3254 2021-10-10 21:38:46 +02:00
parent 1ab8b7e319
commit 596c6e4438
14 changed files with 86 additions and 42 deletions

Binary file not shown.

View File

@ -5025,21 +5025,6 @@ Public Class Main
End If End If
'DownloadPfad = UseSubfolder(FunimationTitle, FunimationSeason, Pfad)
'If Not Directory.Exists(Path.GetDirectoryName(DownloadPfad)) Then
' ' Nein! Jetzt erstellen...
' Try
' Directory.CreateDirectory(Path.GetDirectoryName(DownloadPfad))
' Catch ex As Exception
' ' Ordner wurde nich erstellt
' DownloadPfad = Pfad '+ "\" + DefaultName + VideoFormat
' End Try
'End If
'DownloadPfad = DownloadPfad + DefaultName + VideoFormat
#Region "lösche doppel download" #Region "lösche doppel download"
Dim Pfad5 As String = DownloadPfad.Replace(Chr(34), "") Dim Pfad5 As String = DownloadPfad.Replace(Chr(34), "")
@ -5126,28 +5111,31 @@ Public Class Main
End Function)) End Function))
Dim showexperience As String = Nothing Dim showexperience As String = Nothing
Try 'Try
'Throw New System.Exception("Test") ' 'Throw New System.Exception("Test")
Using client As New WebClient() ' Using client As New WebClient()
client.Encoding = System.Text.Encoding.UTF8 ' client.Encoding = System.Text.Encoding.UTF8
client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), "")) ' client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), ""))
showexperience = client.DownloadString("https://www.funimation.com/api/showexperience/" + ExperienceID + "/?pinst_id=fzQc9p9f") ' showexperience = client.DownloadString("https://www.funimation.com/api/showexperience/" + ExperienceID + "/?pinst_id=fzQc9p9f")
End Using ' End Using
Catch ex As Exception 'Catch ex As Exception
Debug.WriteLine("error- getting funimation showexperience data") Debug.WriteLine("showexperience data via browser")
Me.Invoke(New Action(Function() As Object Me.Invoke(New Action(Function() As Object
'Me.Text = "Status: Resolution not found!" Me.Text = "Status: Resolution not found!"
'Me.Invalidate() Me.Invalidate()
ErrorBrowserString = "Funimation_showexperience" ErrorBrowserString = "Funimation_showexperience"
ErrorBrowserUrl = "https://www.funimation.com/api/showexperience/" + ExperienceID + "/?pinst_id=fzQc9p9f" ErrorBrowserUrl = "https://www.funimation.com/api/showexperience/" + ExperienceID + "/?pinst_id=fzQc9p9f"
ErrorBrowser.ShowDialog() Debug.WriteLine("2-showexperience data via browser")
Return Nothing ErrorBrowser.ShowDialog()
End Function)) Debug.WriteLine("3-showexperience data via browser")
showexperience = ErrorBrowserBackString showexperience = ErrorBrowserBackString
Return Nothing
End Function))
End Try
'End Try
@ -5425,7 +5413,36 @@ Public Class Main
ElseIf Not SystemWebBrowserCookie = Nothing Then ElseIf Not SystemWebBrowserCookie = Nothing Then
SubsClient.Headers.Add(HttpRequestHeader.Cookie, SystemWebBrowserCookie) SubsClient.Headers.Add(HttpRequestHeader.Cookie, SystemWebBrowserCookie)
End If End If
Dim PlayerPage As String = SubsClient.DownloadString("https://www.funimation.com/player/" + ExperienceID + "/?bdub=0&qid=") ' Dim PlayerPage As String = SubsClient.DownloadString("https://www.funimation.com/player/" + ExperienceID + "/?bdub=0&qid=")
Dim PlayerPage As String = Nothing
Try
'Throw New System.Exception("Test")
Using client As New WebClient()
client.Encoding = System.Text.Encoding.UTF8
client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), ""))
PlayerPage = SubsClient.DownloadString("https://www.funimation.com/player/" + ExperienceID + "/?bdub=0&qid=")
End Using
Catch ex As Exception
Debug.WriteLine("error- getting funimation PlayerPage")
Me.Invoke(New Action(Function() As Object
'Me.Text = "Status: Resolution not found!"
'Me.Invalidate()
ErrorBrowserString = "Funimation_showexperience"
ErrorBrowserUrl = "https://www.funimation.com/player/" + ExperienceID + "/?bdub=0&qid="
Debug.WriteLine("error-2-getting funimation PlayerPage")
ErrorBrowser.ShowDialog()
Debug.WriteLine("error-3-getting funimation PlayerPage")
PlayerPage = ErrorBrowserBackString
Return Nothing
End Function))
End Try
Dim Subs_in_srt As New List(Of String) Dim Subs_in_srt As New List(Of String)
Dim Subs_in_vtt As New List(Of String) Dim Subs_in_vtt As New List(Of String)
@ -5446,13 +5463,17 @@ Public Class Main
Next Next
If SoftSubs2.Count = 0 Then If SoftSubs2.Count = 0 Then
Me.Invoke(New Action(Function() As Object Me.Invoke(New Action(Function() As Object
Me.Text = "No Subtitles found..." Me.Text = "No Subtitles found..."
Me.Invalidate() Me.Invalidate()
Return Nothing Return Nothing
End Function)) End Function))
File.WriteAllText(DownloadPfad.Replace(VideoFormat, "-subtitle_error.log"), PlayerPage, Encoding.UTF8) Try
File.WriteAllText(DownloadPfad.Replace(Chr(34), "").Replace(VideoFormat, "-subtitle_error.log"), PlayerPage, Encoding.UTF8)
Catch ex As Exception
Debug.WriteLine("Error writing 'subtitle_error.log'")
End Try
End If End If
End If End If
@ -6859,9 +6880,13 @@ Public Class Main
End Sub End Sub
Private Sub TestDownloadToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles TestDownloadToolStripMenuItem.Click Private Sub TestDownloadToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles TestDownloadToolStripMenuItem.Click
For i2 As Integer = 0 To LoadedUrls.Count - 1 'For i2 As Integer = 0 To LoadedUrls.Count - 1
Debug.WriteLine(LoadedUrls.Item(i2)) ' Debug.WriteLine(LoadedUrls.Item(i2))
Next 'Next
'ErrorBrowserString = "Funimation_showexperience"
'ErrorBrowserUrl = "beta.crunchyroll.com"
'ErrorBrowser.Show()
End Sub End Sub
#End Region #End Region

View File

@ -33,5 +33,5 @@ Imports System.Runtime.InteropServices
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("3.8")> <Assembly: AssemblyVersion("3.8")>
<Assembly: AssemblyFileVersion("3.8")> <Assembly: AssemblyFileVersion("3.8.0.2")>
<Assembly: NeutralResourcesLanguage("en")> <Assembly: NeutralResourcesLanguage("en")>

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="lib" />
<dependentAssembly>
<assemblyIdentity name="CefSharp" publicKeyToken="40c4b6fc221f4138" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-93.1.140.0" newVersion="93.1.140.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="CefSharp.Core" publicKeyToken="40c4b6fc221f4138" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-93.1.140.0" newVersion="93.1.140.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

View File

@ -18,7 +18,7 @@ Public Class Einstellungen
Private Sub Einstellungen_Load(sender As Object, e As EventArgs) Handles MyBase.Load Private Sub Einstellungen_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Label6.Text = "You have: v" + Application.ProductVersion.ToString + " Chromium-Hotfix-#357_2" Label6.Text = "You have: v" + Application.ProductVersion.ToString + " Chromium-Hotfix-#357_4"
BackgroundWorker1.RunWorkerAsync() BackgroundWorker1.RunWorkerAsync()