fixes and improvents

fix hybride mode loop issue
changed stream selection funimation see #380
This commit is contained in:
hama3254 2021-11-02 21:49:34 +01:00
parent 08ce84689a
commit e86e864343
12 changed files with 37 additions and 26 deletions

Binary file not shown.

View File

@ -691,10 +691,9 @@ Public Class CRD_List_Item
End Function End Function
Private Sub DownloadTSv4(ByVal DL_URL As String, ByVal DL_Pfad As String, ByVal CurrentSize As Integer, ByVal NewBytes As Integer) Private Sub DownloadTSv4(ByVal DL_URL As String, ByVal DL_Pfad As String, ByVal CurrentSize As Integer, ByVal NewBytes As Integer)
Dim retry As Boolean = True
Dim retryCount As Integer = 3 Dim retryCount As Integer = 3
HybrideLog = HybrideLog + vbNewLine + Date.Now.ToString + ": " + DL_Pfad + " - " + DL_URL + " - " + CurrentSize.ToString HybrideLog = HybrideLog + vbNewLine + Date.Now.ToString + ": " + DL_Pfad + " - " + DL_URL + " - " + CurrentSize.ToString
While retry While CBool(retryCount > 0)
Try Try
@ -721,20 +720,22 @@ Public Class CRD_List_Item
retry = False retryCount = 0
Catch ex As Exception Catch ex As Exception
If retryCount > 0 Then If retryCount > 0 Then
retryCount = retryCount - 1 retryCount = retryCount - 1
Me.Invoke(New Action(Function() As Object Me.Invoke(New Action(Function() As Object
Label_percent.Text = "Access Error - retrying" 'Label_percent.Text = "Access Error - retrying"
Debug.WriteLine(ex.ToString) Debug.WriteLine(ex.ToString)
Debug.WriteLine("retrying...")
Return Nothing Return Nothing
End Function)) End Function))
Else Else
Me.Invoke(New Action(Function() As Object Me.Invoke(New Action(Function() As Object
Label_percent.Text = "Access Error - download canceled" 'Label_percent.Text = "Access Error - download canceled"
Debug.WriteLine(ex.ToString) Debug.WriteLine(ex.ToString)
Debug.WriteLine("retrying failed...")
Return Nothing Return Nothing
End Function)) End Function))

View File

@ -4822,8 +4822,10 @@ Public Class Main
Return "es" Return "es"
ElseIf Dub = "portuguese(Brazil)" Then ElseIf Dub = "portuguese(Brazil)" Then
Return "pt" Return "pt"
Else ElseIf Dub = "japanese" Then 'japanese
Return "ja" Return "ja"
Else
Return "N/A"
End If End If
End Function End Function
Private Function ConvertJsonToFunimationDub(ByVal Dub As String) As String Private Function ConvertJsonToFunimationDub(ByVal Dub As String) As String
@ -5222,9 +5224,10 @@ Public Class Main
Pause(2) Pause(2)
Debug.WriteLine("showexperience data via browser") Debug.WriteLine("showexperience data via browser")
'Me.Invoke(New Action(Function() As Object 'Me.Invoke(New Action(Function() As Object
PlayerClient.Headers.Add(HttpRequestHeader.AcceptEncoding, "gzip") 'PlayerClient.Headers.Add(HttpRequestHeader.AcceptEncoding, "gzip")
EpisodeJsonString = DecompressString(PlayerClient.DownloadData(BaseUrl + FunimationEpisodeJson + FunimationDeviceRegion)) 'EpisodeJsonString = DecompressString(PlayerClient.DownloadData(BaseUrl + FunimationEpisodeJson + FunimationDeviceRegion))
EpisodeJsonString = PlayerClient.DownloadString(BaseUrl + FunimationEpisodeJson + FunimationDeviceRegion)
'Debug.WriteLine("Thread Name: " + Thread.CurrentThread.Name) 'Debug.WriteLine("Thread Name: " + Thread.CurrentThread.Name)
@ -5347,7 +5350,8 @@ Public Class Main
#Region "m3u8 URL" #Region "m3u8 URL"
Dim Funimation_m3u8_Main As String = Nothing Dim Funimation_m3u8_Main As String = Nothing
Dim Funimation_m3u8_MainVersion As String = Nothing
Dim Funimation_m3u8_Primary As String = Nothing
Dim Funimation_m3u8_final As String = Nothing Dim Funimation_m3u8_final As String = Nothing
Dim client0 As New WebClient Dim client0 As New WebClient
client0.Encoding = Encoding.UTF8 client0.Encoding = Encoding.UTF8
@ -5355,19 +5359,25 @@ Public Class Main
If SubsOnly = False Then If SubsOnly = False Then
For i As Integer = 0 To VideoStreams.Count - 1 For i As Integer = 0 To VideoStreams.Count - 1
If DubFunimation = "Disabled" Then
If VideoStreams(i).Primary = True Then If VideoStreams(i).Primary = True Then
Funimation_m3u8_Main = VideoStreams(i).Url Funimation_m3u8_Primary = VideoStreams(i).Url
Exit For
End If
Else
If VideoStreams(i).audioLanguage = ConvertFunimationDubToJson(DubFunimation) Then
Funimation_m3u8_Main = VideoStreams(i).Url
Exit For
End If
End If End If
If VideoStreams(i).audioLanguage = ConvertFunimationDubToJson(DubFunimation) And Funimation_m3u8_Main = Nothing Then
Funimation_m3u8_Main = VideoStreams(i).Url
Funimation_m3u8_MainVersion = VideoStreams(i).version
ElseIf VideoStreams(i).audioLanguage = ConvertFunimationDubToJson(DubFunimation) And VideoStreams(i).version = "uncut" Then
Funimation_m3u8_Main = VideoStreams(i).Url
Funimation_m3u8_MainVersion = VideoStreams(i).version
End If
Next Next
If Funimation_m3u8_Main = Nothing Then
Funimation_m3u8_Main = Funimation_m3u8_Primary
End If
If Funimation_m3u8_Main = Nothing Then If Funimation_m3u8_Main = Nothing Then
If MessageBox.Show("No media matching your settings." + vbNewLine + "Avalible: Not implimentented, press 'Yes' to copy the data into the clipboard.", "No media", MessageBoxButtons.YesNo) = DialogResult.Yes Then If MessageBox.Show("No media matching your settings." + vbNewLine + "Avalible: Not implimentented, press 'Yes' to copy the data into the clipboard.", "No media", MessageBoxButtons.YesNo) = DialogResult.Yes Then
@ -5382,11 +5392,11 @@ Public Class Main
Exit Sub Exit Sub
Else Else
Funimation_Grapp_RDY = True Funimation_Grapp_RDY = True
Exit Sub Exit Sub
End If
End If End If
Me.Invoke(New Action(Function() As Object
End If
Me.Invoke(New Action(Function() As Object
Me.Text = "Status: Video found!" Me.Text = "Status: Video found!"
Me.Invalidate() Me.Invalidate()
Return Nothing Return Nothing
@ -5746,7 +5756,7 @@ Public Class Main
Dim L1Name_Split As String() = WebbrowserURL.Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries) Dim L1Name_Split As String() = WebbrowserURL.Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim L1Name As String = L1Name_Split(1).Replace("www.", "") + " | Dub : " + FunimationDub Dim L1Name As String = L1Name_Split(1).Replace("www.", "") + " | Dub : " + FunimationDub
Me.Invoke(New Action(Function() As Object Me.Invoke(New Action(Function() As Object
ListItemAdd(Pfad_DL, L1Name, DefaultName, ResoHTMLDisplay, "Unknown", SubValuesToDisplay(), thumbnail4, Funimation_m3u8_final, DownloadPfad, "FM") ListItemAdd(Pfad_DL, L1Name, DefaultName, ResoHTMLDisplay, Funimation_m3u8_MainVersion, SubValuesToDisplay(), thumbnail4, Funimation_m3u8_final, DownloadPfad, "FM")
Return Nothing Return Nothing
End Function)) End Function))
liList.Add(My.Resources.htmlvorThumbnail + thumbnail4 + My.Resources.htmlnachTumbnail + FunimationTitle + " <br> " + FunimationSeason + " " + FunimationEpisode + My.Resources.htmlvorAufloesung + ResoHTMLDisplay + My.Resources.htmlvorSoftSubs + vbNewLine + SubValuesToDisplay() + My.Resources.htmlvorHardSubs + "null" + My.Resources.htmlnachHardSubs + "<!-- " + DefaultName + "-->") liList.Add(My.Resources.htmlvorThumbnail + thumbnail4 + My.Resources.htmlnachTumbnail + FunimationTitle + " <br> " + FunimationSeason + " " + FunimationEpisode + My.Resources.htmlvorAufloesung + ResoHTMLDisplay + My.Resources.htmlvorSoftSubs + vbNewLine + SubValuesToDisplay() + My.Resources.htmlvorHardSubs + "null" + My.Resources.htmlnachHardSubs + "<!-- " + DefaultName + "-->")

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.0.7")> <Assembly: AssemblyFileVersion("3.8.0.9")>
<Assembly: NeutralResourcesLanguage("en")> <Assembly: NeutralResourcesLanguage("en")>

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-U6.1" Label6.Text = "You have: v" + Application.ProductVersion.ToString + " Chromium-U8"
BackgroundWorker1.RunWorkerAsync() BackgroundWorker1.RunWorkerAsync()