funimation fixes

removed unsued sub format funimation
added fallback subs for funimation
set vtt as defaul subtitle format for funimation
fix subfolder name bug for funimation
fix display bug for funimation dub language
This commit is contained in:
hama3254 2021-11-14 22:06:06 +01:00
parent 6aa8142b00
commit 8e8c836a04
12 changed files with 113 additions and 136 deletions

Binary file not shown.

View File

@ -146,7 +146,6 @@ Public Class Main
Public DubFunimation As String = "Disabled" Public DubFunimation As String = "Disabled"
Public Funimation_srt As Boolean = False Public Funimation_srt As Boolean = False
Public Funimation_vtt As Boolean = False Public Funimation_vtt As Boolean = False
Public Funimation_dfxp As Boolean = False
Public SubFunimationString As String = "en" Public SubFunimationString As String = "en"
Public SubFunimation As New List(Of String) Public SubFunimation As New List(Of String)
Public DefaultSubFunimation As String = "Disabled" Public DefaultSubFunimation As String = "Disabled"
@ -698,12 +697,7 @@ Public Class Main
Catch ex As Exception Catch ex As Exception
End Try End Try
Try
Dim rkg As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\CRDownloader")
Funimation_dfxp = CBool(Integer.Parse(rkg.GetValue("Funimation_dfxp").ToString))
Catch ex As Exception
End Try
Try Try
Dim rkg As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\CRDownloader") Dim rkg As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\CRDownloader")
'HardSubFunimation = rkg.GetValue("FunimationHardsub").ToString 'HardSubFunimation = rkg.GetValue("FunimationHardsub").ToString
@ -4177,7 +4171,6 @@ Public Class Main
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)
Dim Subs_in_dfxp As New List(Of String)
Dim SoftSubs2 As New List(Of String) Dim SoftSubs2 As New List(Of String)
@ -4255,8 +4248,6 @@ Public Class Main
Dim SubtitelFormat As String = ".srt" Dim SubtitelFormat As String = ".srt"
If CBool(InStr(UsedSub, ".vtt")) Then If CBool(InStr(UsedSub, ".vtt")) Then
SubtitelFormat = ".vtt" SubtitelFormat = ".vtt"
'ElseIf CBool(InStr(UsedSub, ".dfxp") Then
' SubtitelFormat = ".dfxp"
End If End If
UsedSub = GeräteID() + SubtitelFormat UsedSub = GeräteID() + SubtitelFormat
File.WriteAllText(Application.StartupPath + "\" + UsedSub, SubText, Encoding.UTF8) File.WriteAllText(Application.StartupPath + "\" + UsedSub, SubText, Encoding.UTF8)
@ -4269,7 +4260,6 @@ Public Class Main
For iii As Integer = 0 To SubTitle2.Count - 1 For iii As Integer = 0 To SubTitle2.Count - 1
If CBool(InStr(SubTitle2(iii), ".srt" + Chr(34))) Then If CBool(InStr(SubTitle2(iii), ".srt" + Chr(34))) Then
ElseIf CBool(InStr(SubTitle2(iii), ".vtt" + Chr(34))) Then ElseIf CBool(InStr(SubTitle2(iii), ".vtt" + Chr(34))) Then
ElseIf CBool(InStr(SubTitle2(iii), ".dfxp" + Chr(34))) Then
ElseIf CBool(InStr(SubTitle2(iii), ".srt")) Then ElseIf CBool(InStr(SubTitle2(iii), ".srt")) Then
If Subs_in_srt.Contains(SubTitle2(iii)) Then If Subs_in_srt.Contains(SubTitle2(iii)) Then
Else Else
@ -4280,11 +4270,7 @@ Public Class Main
Else Else
Subs_in_vtt.Add(SubTitle2(iii)) Subs_in_vtt.Add(SubTitle2(iii))
End If End If
ElseIf CBool(InStr(SubTitle2(iii), ".dfxp")) Then
If Subs_in_dfxp.Contains(SubTitle2(iii)) Then
Else
Subs_in_dfxp.Add(SubTitle2(iii))
End If
End If End If
Next Next
@ -4305,12 +4291,7 @@ Public Class Main
Catch ex As Exception Catch ex As Exception
End Try End Try
Try
If Funimation_dfxp = True Then
UsedSubs.Add(Subs_in_dfxp.Item(0) + " , " + SoftSubs2.Item(i).Replace(My.Resources.Funimation_Subtitle_String, "").Replace(My.Resources.Funimation_Subtitle_String2, "").Replace(My.Resources.Funimation_Subtitle_String3, ""))
End If
Catch ex As Exception
End Try
If TempCount = UsedSubs.Count Then If TempCount = UsedSubs.Count Then
@ -4318,14 +4299,12 @@ Public Class Main
UsedSubs.Add(Subs_in_srt.Item(0) + " , " + SoftSubs2.Item(i).Replace(My.Resources.Funimation_Subtitle_String, "").Replace(My.Resources.Funimation_Subtitle_String2, "").Replace(My.Resources.Funimation_Subtitle_String3, "")) UsedSubs.Add(Subs_in_srt.Item(0) + " , " + SoftSubs2.Item(i).Replace(My.Resources.Funimation_Subtitle_String, "").Replace(My.Resources.Funimation_Subtitle_String2, "").Replace(My.Resources.Funimation_Subtitle_String3, ""))
ElseIf Subs_in_vtt.Count > 0 Then ElseIf Subs_in_vtt.Count > 0 Then
UsedSubs.Add(Subs_in_vtt.Item(0) + " , " + SoftSubs2.Item(i).Replace(My.Resources.Funimation_Subtitle_String, "").Replace(My.Resources.Funimation_Subtitle_String2, "").Replace(My.Resources.Funimation_Subtitle_String3, "")) UsedSubs.Add(Subs_in_vtt.Item(0) + " , " + SoftSubs2.Item(i).Replace(My.Resources.Funimation_Subtitle_String, "").Replace(My.Resources.Funimation_Subtitle_String2, "").Replace(My.Resources.Funimation_Subtitle_String3, ""))
ElseIf Subs_in_dfxp.Count > 0 Then
UsedSubs.Add(Subs_in_dfxp.Item(0) + " , " + SoftSubs2.Item(i).Replace(My.Resources.Funimation_Subtitle_String, "").Replace(My.Resources.Funimation_Subtitle_String2, "").Replace(My.Resources.Funimation_Subtitle_String3, ""))
End If End If
End If End If
Subs_in_srt.Clear() Subs_in_srt.Clear()
Subs_in_vtt.Clear() Subs_in_vtt.Clear()
Subs_in_dfxp.Clear()
Next Next
End If End If
@ -4393,8 +4372,6 @@ Public Class Main
Dim SubtitelFormat As String = "srt" Dim SubtitelFormat As String = "srt"
If CBool(InStr(SoftSub_3, ".vtt")) Then If CBool(InStr(SoftSub_3, ".vtt")) Then
SubtitelFormat = "vtt" SubtitelFormat = "vtt"
ElseIf CBool(InStr(SoftSub_3, ".dfxp")) Then
SubtitelFormat = "dfxp"
End If End If
Dim FN As String = Path.ChangeExtension(Path.Combine(Path.GetFileNameWithoutExtension(Pfad3) + " " + SoftSub(1) + Path.GetExtension(Pfad3)), SubtitelFormat) Dim FN As String = Path.ChangeExtension(Path.Combine(Path.GetFileNameWithoutExtension(Pfad3) + " " + SoftSub(1) + Path.GetExtension(Pfad3)), SubtitelFormat)
@ -4811,8 +4788,10 @@ Public Class Main
Return "Spanish (Latin Am)" Return "Spanish (Latin Am)"
ElseIf Dub = "portuguese(Brazil)" Then ElseIf Dub = "portuguese(Brazil)" Then
Return "Portuguese (Brazil)" Return "Portuguese (Brazil)"
Else ElseIf Dub = "japanese" Then
Return "Japanese" Return "Japanese"
Else
Return "N/A"
End If End If
End Function End Function
Private Function ConvertFunimationDubToJson(ByVal Dub As String) As String Private Function ConvertFunimationDubToJson(ByVal Dub As String) As String
@ -4835,8 +4814,10 @@ Public Class Main
Return "spanish(Mexico)" Return "spanish(Mexico)"
ElseIf Dub = "pt" Then ElseIf Dub = "pt" Then
Return "portuguese(Brazil)" Return "portuguese(Brazil)"
ElseIf Dub = "ja" Then
Return "japanese"
Else Else
Return "ja" Return "N/A"
End If End If
End Function End Function
Public Sub GetFunimationNewJS_VideoProxy(Optional ByVal v1JsonURL As String = Nothing, Optional ByVal v1JsonData As String = Nothing) Public Sub GetFunimationNewJS_VideoProxy(Optional ByVal v1JsonURL As String = Nothing, Optional ByVal v1JsonData As String = Nothing)
@ -4907,7 +4888,7 @@ Public Class Main
Exit Sub Exit Sub
End Try End Try
End If End If
Debug.WriteLine("v1Json: " + v1Json) 'Debug.WriteLine("v1Json: " + v1Json)
If v1Json = Nothing Then If v1Json = Nothing Then
Me.Invoke(New Action(Function() As Object Me.Invoke(New Action(Function() As Object
@ -5083,7 +5064,7 @@ Public Class Main
End Select End Select
Next Next
FunimationTitle = String.Join(" ", FunimationTitle.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c) FunimationTitle = RemoveExtraSpaces(String.Join(" ", FunimationTitle.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c))
FunimationEpisodeTitle = String.Join(" ", FunimationEpisodeTitle.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c) FunimationEpisodeTitle = String.Join(" ", FunimationEpisodeTitle.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c)
FunimationDub = ConvertFunimationDub(DubFunimation) 'FunimationDub2(0) FunimationDub = ConvertFunimationDub(DubFunimation) 'FunimationDub2(0)
@ -5127,20 +5108,20 @@ Public Class Main
DefaultName = DefaultName.Replace(":", "") DefaultName = DefaultName.Replace(":", "")
DownloadPfad = UseSubfolder(FunimationTitle, FunimationSeason, Pfad) DownloadPfad = RemoveExtraSpaces(UseSubfolder(FunimationTitle, FunimationSeason, Pfad))
If Not Directory.Exists(Path.GetDirectoryName(DownloadPfad)) Then If Not Directory.Exists(Path.GetDirectoryName(DownloadPfad)) Then
' Nein! Jetzt erstellen... ' Nein! Jetzt erstellen...
Try Try
Directory.CreateDirectory(Path.GetDirectoryName(DownloadPfad)) Directory.CreateDirectory(Path.GetDirectoryName(DownloadPfad))
DownloadPfad = Chr(34) + DownloadPfad + DefaultName + VideoFormat + Chr(34) DownloadPfad = RemoveExtraSpaces(Chr(34) + DownloadPfad + DefaultName + VideoFormat + Chr(34))
Catch ex As Exception Catch ex As Exception
' Ordner wurde nich erstellt ' Ordner wurde nich erstellt
DownloadPfad = Chr(34) + Pfad + DefaultName + VideoFormat + Chr(34) DownloadPfad = RemoveExtraSpaces(Chr(34) + Pfad + DefaultName + VideoFormat + Chr(34))
End Try End Try
Else Else
DownloadPfad = Chr(34) + DownloadPfad + DefaultName + VideoFormat + Chr(34) DownloadPfad = RemoveExtraSpaces(Chr(34) + DownloadPfad + DefaultName + VideoFormat + Chr(34))
End If End If
@ -5194,16 +5175,19 @@ Public Class Main
PlayerClient.Headers.Add(HttpRequestHeader.Referer, "https://www.funimation.com/") PlayerClient.Headers.Add(HttpRequestHeader.Referer, "https://www.funimation.com/")
Dim BaseUrl As String = "https://playback.prd.funimationsvc.com/v1/play/" Dim BaseUrl As String = "https://playback.prd.funimationsvc.com/v1/play/"
Debug.WriteLine(PlayerClient.Headers.ToString)
If FunimationToken = Nothing Then If FunimationToken = Nothing Then
Debug.WriteLine("FunimationToken: false")
BaseUrl = "https://playback.prd.funimationsvc.com/v1/play/anonymous/" BaseUrl = "https://playback.prd.funimationsvc.com/v1/play/anonymous/"
Else Else
Debug.WriteLine("FunimationToken: true")
PlayerClient.Headers.Add(HttpRequestHeader.Authorization, FunimationToken) PlayerClient.Headers.Add(HttpRequestHeader.Authorization, FunimationToken)
End If End If
'FunimationToken 'FunimationToken
'MsgBox(WebbrowserCookie) 'MsgBox(WebbrowserCookie)
'BaseUrl + FunimationEpisodeJson + FunimationDeviceRegion 'BaseUrl + FunimationEpisodeJson + FunimationDeviceRegion
Debug.WriteLine(PlayerClient.Headers.ToString)
If FunimationDeviceRegion = Nothing Then If FunimationDeviceRegion = Nothing Then
FunimationDeviceRegion = "?deviceType=web" FunimationDeviceRegion = "?deviceType=web"
End If End If
@ -5256,6 +5240,11 @@ Public Class Main
Dim EpisodeJson As JObject = JObject.Parse(EpisodeJsonString) Dim EpisodeJson As JObject = JObject.Parse(EpisodeJsonString)
Dim EpisodeJsonData As List(Of JToken) = EpisodeJson.Children().ToList Dim EpisodeJsonData As List(Of JToken) = EpisodeJson.Children().ToList
Dim PrimaryVersion As String = Nothing ' item.Item("version").ToString
Dim PrimaryaudioLanguage As String = Nothing ' item.Item("audioLanguage").ToString
Dim PrimarymanifesUrl As String = Nothing 'item.Item("manifestPath").ToString
For Each item As JProperty In EpisodeJsonData For Each item As JProperty In EpisodeJsonData
item.CreateReader() item.CreateReader()
Select Case item.Name Select Case item.Name
@ -5268,14 +5257,17 @@ Public Class Main
Dim SubData2 As List(Of JToken) = item.Values.ToList Dim SubData2 As List(Of JToken) = item.Values.ToList
'MsgBox(SubData2.Count.ToString) 'MsgBox(SubData2.Count.ToString)
For i As Integer = 0 To SubData2.Count - 1 For i As Integer = 0 To SubData2.Count - 1
Dim audioLanguage As String = Nothing
Dim Format As String = Nothing
Try Try
Dim Version As String = SubData2(i).Item("version").ToString Dim Version As String = SubData2(i).Item("version").ToString
Dim audioLanguage As String = SubData2(i).Item("audioLanguage").ToString audioLanguage = SubData2(i).Item("audioLanguage").ToString
Dim Url As String = SubData2(i).Item("manifestPath").ToString Dim Url As String = SubData2(i).Item("manifestPath").ToString
Debug.WriteLine(Version) Debug.WriteLine(Version)
Debug.WriteLine(audioLanguage) Debug.WriteLine(audioLanguage)
Debug.WriteLine(Url) Debug.WriteLine(Url)
Dim Format As String = SubData2(i).Item("fileExt").ToString Format = SubData2(i).Item("fileExt").ToString
If Format = "m3u8" Then If Format = "m3u8" Then
VideoStreams.Add(New FunimationStream(audioLanguage, Version, Url, False)) VideoStreams.Add(New FunimationStream(audioLanguage, Version, Url, False))
@ -5285,6 +5277,29 @@ Public Class Main
End Try End Try
Try
Dim SubData3 As List(Of JToken) = SubData2(i).Item("subtitles").Children.ToList
'MsgBox(SubData2.Count.ToString)
For i3 As Integer = 0 To SubData2.Count - 1
Try
Dim LangCode As String = SubData3(i3).Item("languageCode").ToString
Dim CCFormat As String = SubData3(i3).Item("fileExt").ToString
Dim Url As String = SubData3(i3).Item("filePath").ToString
If audioLanguage = "ja" And Format = "m3u8" Then
SubsFiles.Add(New FunimationSubs(LangCode, CCFormat, Url))
End If
Catch ex As Exception
End Try
Next
Catch ex As Exception
End Try
Next Next
@ -5294,15 +5309,8 @@ Public Class Main
Case "primary" 'each record is inside the entries array Case "primary" 'each record is inside the entries array
Dim Version As String = Nothing ' item.Item("version").ToString
Dim audioLanguage As String = Nothing ' item.Item("audioLanguage").ToString
Dim manifesUrl As String = Nothing 'item.Item("manifestPath").ToString
'Dim Format As String = SubData2(i).Item("fileExt").ToString
Dim SubData As List(Of JToken) = item.Values.ToList() Dim SubData As List(Of JToken) = item.Values.ToList()
For Each SubItem As JProperty In SubData For Each SubItem As JProperty In SubData
Select Case SubItem.Name Select Case SubItem.Name
@ -5310,11 +5318,11 @@ Public Class Main
' Funimation_m3u8_Main = SubItem.Value.ToString ' Funimation_m3u8_Main = SubItem.Value.ToString
'' MsgBox() '' MsgBox()
Case "version" Case "version"
Version = SubItem.Value.ToString PrimaryVersion = SubItem.Value.ToString
Case "audioLanguage" Case "audioLanguage"
audioLanguage = SubItem.Value.ToString PrimaryaudioLanguage = SubItem.Value.ToString
Case "manifestPath" Case "manifestPath"
manifesUrl = SubItem.Value.ToString PrimarymanifesUrl = SubItem.Value.ToString
Case "subtitles" Case "subtitles"
' MsgBox(SubItem.Value.ToString()) ' MsgBox(SubItem.Value.ToString())
@ -5330,20 +5338,15 @@ Public Class Main
Catch ex As Exception Catch ex As Exception
End Try End Try
Next Next
End Select End Select
Next Next
Debug.WriteLine("primary version: " + PrimaryVersion)
Debug.WriteLine("primary audioLanguage: " + PrimaryaudioLanguage)
Debug.WriteLine("primary manifesUrl: " + PrimarymanifesUrl)
Debug.WriteLine("primary version: " + Version) VideoStreams.Add(New FunimationStream(PrimaryaudioLanguage, PrimaryVersion, PrimarymanifesUrl, True))
Debug.WriteLine("primary audioLanguage: " + audioLanguage)
Debug.WriteLine("primary manifesUrl: " + manifesUrl)
' If Format = "m3u8" Then
VideoStreams.Add(New FunimationStream(audioLanguage, Version, manifesUrl, True))
' End If
End Select End Select
Next Next
@ -5357,7 +5360,11 @@ 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_MainVersion As String = Nothing
Dim Funimation_m3u8_Primary_Version As String = Nothing
Dim Funimation_m3u8_Primary As String = Nothing Dim Funimation_m3u8_Primary As String = Nothing
Dim Funimation_m3u8_Primary_audioLanguage 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
@ -5368,6 +5375,8 @@ Public Class Main
If VideoStreams(i).Primary = True Then If VideoStreams(i).Primary = True Then
Funimation_m3u8_Primary = VideoStreams(i).Url Funimation_m3u8_Primary = VideoStreams(i).Url
Funimation_m3u8_Primary_Version = VideoStreams(i).version
Funimation_m3u8_Primary_audioLanguage = VideoStreams(i).audioLanguage
End If End If
If VideoStreams(i).audioLanguage = ConvertFunimationDubToJson(DubFunimation) And Funimation_m3u8_Main = Nothing Then If VideoStreams(i).audioLanguage = ConvertFunimationDubToJson(DubFunimation) And Funimation_m3u8_Main = Nothing Then
@ -5382,6 +5391,8 @@ Public Class Main
If Funimation_m3u8_Main = Nothing Then If Funimation_m3u8_Main = Nothing Then
Funimation_m3u8_Main = Funimation_m3u8_Primary Funimation_m3u8_Main = Funimation_m3u8_Primary
Funimation_m3u8_MainVersion = Funimation_m3u8_Primary_Version
FunimationDub = ConvertFunimationDub(ConvertJsonToFunimationDub(Funimation_m3u8_Primary_audioLanguage))
End If End If
If Funimation_m3u8_Main = Nothing Then If Funimation_m3u8_Main = Nothing Then
@ -5603,15 +5614,17 @@ Public Class Main
Dim UsedSubs As New List(Of String) Dim UsedSubs As New List(Of String)
Dim ffmpeg_hardsub As String = Nothing Dim ffmpeg_hardsub As String = Nothing
For i As Integer = 0 To SubsFiles.Count - 1 For i As Integer = 0 To SubsFiles.Count - 1
Debug.WriteLine(SubsFiles(i).LangugageCode + "-" + SubsFiles(i).Format)
If SubFunimation.Count = 0 Then If SubFunimation.Count = 0 Then
Exit For Exit For
End If End If
If Funimation_dfxp = True And SubsFiles(i).Format = "dfxp" And CBool(InStr(SubFunimationString, SubsFiles(i).LangugageCode)) Then If Funimation_vtt = True And SubsFiles(i).Format = "vtt" And CBool(InStr(SubFunimationString, SubsFiles(i).LangugageCode)) Then
UsedSubs.Add(SubsFiles(i).Url + " , " + SubsFiles(i).LangugageCode)
ElseIf Funimation_vtt = True And SubsFiles(i).Format = "vtt" And CBool(InStr(SubFunimationString, SubsFiles(i).LangugageCode)) Then
UsedSubs.Add(SubsFiles(i).Url + " , " + SubsFiles(i).LangugageCode) UsedSubs.Add(SubsFiles(i).Url + " , " + SubsFiles(i).LangugageCode)
ElseIf Funimation_srt = True And SubsFiles(i).Format = "srt" And CBool(InStr(SubFunimationString, SubsFiles(i).LangugageCode)) Then ElseIf Funimation_srt = True And SubsFiles(i).Format = "srt" And CBool(InStr(SubFunimationString, SubsFiles(i).LangugageCode)) Then
@ -5691,8 +5704,6 @@ Public Class Main
Dim SubtitelFormat As String = "srt" Dim SubtitelFormat As String = "srt"
If CBool(InStr(SoftSub_3, ".vtt")) Then If CBool(InStr(SoftSub_3, ".vtt")) Then
SubtitelFormat = "vtt" SubtitelFormat = "vtt"
ElseIf CBool(InStr(SoftSub_3, ".dfxp")) Then
SubtitelFormat = "dfxp"
End If End If
Dim FN As String = Path.ChangeExtension(Path.Combine(Path.GetFileNameWithoutExtension(Pfad3) + " " + SoftSub(1) + Path.GetExtension(Pfad3)), SubtitelFormat) Dim FN As String = Path.ChangeExtension(Path.Combine(Path.GetFileNameWithoutExtension(Pfad3) + " " + SoftSub(1) + Path.GetExtension(Pfad3)), SubtitelFormat)
@ -5758,7 +5769,7 @@ Public Class Main
If SubsOnly = True Then If SubsOnly = True Then
Funimation_m3u8_final = "-i [Subtitles only]" Funimation_m3u8_final = "-i [Subtitles only]"
End If End If
DownloadPfad = RemoveExtraSpaces(DownloadPfad)
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
@ -6460,7 +6471,6 @@ Public Class Main
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)
Dim Subs_in_dfxp As New List(Of String)
Dim SoftSubs2 As New List(Of String) Dim SoftSubs2 As New List(Of String)
@ -6542,8 +6552,6 @@ Public Class Main
Dim SubtitelFormat As String = ".srt" Dim SubtitelFormat As String = ".srt"
If CBool(InStr(UsedSub, ".vtt")) Then If CBool(InStr(UsedSub, ".vtt")) Then
SubtitelFormat = ".vtt" SubtitelFormat = ".vtt"
'ElseIf CBool(InStr(UsedSub, ".dfxp") Then
' SubtitelFormat = ".dfxp"
End If End If
UsedSub = GeräteID() + SubtitelFormat UsedSub = GeräteID() + SubtitelFormat
File.WriteAllText(Application.StartupPath + "\" + UsedSub, SubText, Encoding.UTF8) File.WriteAllText(Application.StartupPath + "\" + UsedSub, SubText, Encoding.UTF8)
@ -6556,7 +6564,6 @@ Public Class Main
For iii As Integer = 0 To SubTitle2.Count - 1 For iii As Integer = 0 To SubTitle2.Count - 1
If CBool(InStr(SubTitle2(iii), ".srt" + Chr(34))) Then If CBool(InStr(SubTitle2(iii), ".srt" + Chr(34))) Then
ElseIf CBool(InStr(SubTitle2(iii), ".vtt" + Chr(34))) Then ElseIf CBool(InStr(SubTitle2(iii), ".vtt" + Chr(34))) Then
ElseIf CBool(InStr(SubTitle2(iii), ".dfxp" + Chr(34))) Then
ElseIf CBool(InStr(SubTitle2(iii), ".srt")) Then ElseIf CBool(InStr(SubTitle2(iii), ".srt")) Then
If Subs_in_srt.Contains(SubTitle2(iii)) Then If Subs_in_srt.Contains(SubTitle2(iii)) Then
Else Else
@ -6567,12 +6574,6 @@ Public Class Main
Else Else
Subs_in_vtt.Add(SubTitle2(iii)) Subs_in_vtt.Add(SubTitle2(iii))
End If End If
ElseIf CBool(InStr(SubTitle2(iii), ".dfxp")) Then
If Subs_in_dfxp.Contains(SubTitle2(iii)) Then
Else
Subs_in_dfxp.Add(SubTitle2(iii))
End If
End If End If
Next Next
@ -6592,12 +6593,7 @@ Public Class Main
Catch ex As Exception Catch ex As Exception
End Try End Try
Try
If Funimation_dfxp = True Then
UsedSubs.Add(Subs_in_dfxp.Item(0) + " , " + SoftSubs2.Item(i).Replace(My.Resources.Funimation_Subtitle_String, "").Replace(My.Resources.Funimation_Subtitle_String2, "").Replace(My.Resources.Funimation_Subtitle_String3, ""))
End If
Catch ex As Exception
End Try
If TempCount = UsedSubs.Count Then If TempCount = UsedSubs.Count Then
@ -6605,14 +6601,12 @@ Public Class Main
UsedSubs.Add(Subs_in_srt.Item(0) + " , " + SoftSubs2.Item(i).Replace(My.Resources.Funimation_Subtitle_String, "").Replace(My.Resources.Funimation_Subtitle_String2, "").Replace(My.Resources.Funimation_Subtitle_String3, "")) UsedSubs.Add(Subs_in_srt.Item(0) + " , " + SoftSubs2.Item(i).Replace(My.Resources.Funimation_Subtitle_String, "").Replace(My.Resources.Funimation_Subtitle_String2, "").Replace(My.Resources.Funimation_Subtitle_String3, ""))
ElseIf Subs_in_vtt.Count > 0 Then ElseIf Subs_in_vtt.Count > 0 Then
UsedSubs.Add(Subs_in_vtt.Item(0) + " , " + SoftSubs2.Item(i).Replace(My.Resources.Funimation_Subtitle_String, "").Replace(My.Resources.Funimation_Subtitle_String2, "").Replace(My.Resources.Funimation_Subtitle_String3, "")) UsedSubs.Add(Subs_in_vtt.Item(0) + " , " + SoftSubs2.Item(i).Replace(My.Resources.Funimation_Subtitle_String, "").Replace(My.Resources.Funimation_Subtitle_String2, "").Replace(My.Resources.Funimation_Subtitle_String3, ""))
ElseIf Subs_in_dfxp.Count > 0 Then
UsedSubs.Add(Subs_in_dfxp.Item(0) + " , " + SoftSubs2.Item(i).Replace(My.Resources.Funimation_Subtitle_String, "").Replace(My.Resources.Funimation_Subtitle_String2, "").Replace(My.Resources.Funimation_Subtitle_String3, ""))
End If End If
End If End If
Subs_in_srt.Clear() Subs_in_srt.Clear()
Subs_in_vtt.Clear() Subs_in_vtt.Clear()
Subs_in_dfxp.Clear()
Next Next
End If End If
@ -6680,8 +6674,6 @@ Public Class Main
Dim SubtitelFormat As String = "srt" Dim SubtitelFormat As String = "srt"
If CBool(InStr(SoftSub_3, ".vtt")) Then If CBool(InStr(SoftSub_3, ".vtt")) Then
SubtitelFormat = "vtt" SubtitelFormat = "vtt"
ElseIf CBool(InStr(SoftSub_3, ".dfxp")) Then
SubtitelFormat = "dfxp"
End If End If
Dim FN As String = Path.ChangeExtension(Path.Combine(Path.GetFileNameWithoutExtension(Pfad3) + " " + SoftSub(1) + Path.GetExtension(Pfad3)), SubtitelFormat) Dim FN As String = Path.ChangeExtension(Path.Combine(Path.GetFileNameWithoutExtension(Pfad3) + " " + SoftSub(1) + Path.GetExtension(Pfad3)), SubtitelFormat)
@ -7349,8 +7341,6 @@ Public Class Main
' txtList.Add(requesturl) ' txtList.Add(requesturl)
' ElseIf CBool(InStr(requesturl, ".ssa") Then ' ElseIf CBool(InStr(requesturl, ".ssa") Then
' txtList.Add(requesturl) ' txtList.Add(requesturl)
' ElseIf CBool(InStr(requesturl, ".dfxp") Then
' txtList.Add(requesturl)
' End If ' End If
'End If 'End If

View File

@ -116,7 +116,6 @@ Partial Class Einstellungen
Me.GroupBox11 = New System.Windows.Forms.GroupBox() Me.GroupBox11 = New System.Windows.Forms.GroupBox()
Me.CB_srt = New MetroFramework.Controls.MetroCheckBox() Me.CB_srt = New MetroFramework.Controls.MetroCheckBox()
Me.CB_vtt = New MetroFramework.Controls.MetroCheckBox() Me.CB_vtt = New MetroFramework.Controls.MetroCheckBox()
Me.CB_dfxp = New MetroFramework.Controls.MetroCheckBox()
Me.GroupBox10 = New System.Windows.Forms.GroupBox() Me.GroupBox10 = New System.Windows.Forms.GroupBox()
Me.Fun_Dub_Over = New MetroFramework.Controls.MetroComboBox() Me.Fun_Dub_Over = New MetroFramework.Controls.MetroComboBox()
Me.GroupBox7 = New System.Windows.Forms.GroupBox() Me.GroupBox7 = New System.Windows.Forms.GroupBox()
@ -390,10 +389,10 @@ Partial Class Einstellungen
Me.TabPage2.HorizontalScrollbarBarColor = True Me.TabPage2.HorizontalScrollbarBarColor = True
Me.TabPage2.HorizontalScrollbarHighlightOnWheel = False Me.TabPage2.HorizontalScrollbarHighlightOnWheel = False
Me.TabPage2.HorizontalScrollbarSize = 10 Me.TabPage2.HorizontalScrollbarSize = 10
Me.TabPage2.Location = New System.Drawing.Point(4, 44) Me.TabPage2.Location = New System.Drawing.Point(4, 35)
Me.TabPage2.Name = "TabPage2" Me.TabPage2.Name = "TabPage2"
Me.TabPage2.Padding = New System.Windows.Forms.Padding(3) Me.TabPage2.Padding = New System.Windows.Forms.Padding(3)
Me.TabPage2.Size = New System.Drawing.Size(501, 519) Me.TabPage2.Size = New System.Drawing.Size(501, 528)
Me.TabPage2.TabIndex = 1 Me.TabPage2.TabIndex = 1
Me.TabPage2.Text = "Output" Me.TabPage2.Text = "Output"
Me.TabPage2.VerticalScrollbarBarColor = True Me.TabPage2.VerticalScrollbarBarColor = True
@ -1126,9 +1125,9 @@ Partial Class Einstellungen
Me.MetroTabPage1.HorizontalScrollbarBarColor = True Me.MetroTabPage1.HorizontalScrollbarBarColor = True
Me.MetroTabPage1.HorizontalScrollbarHighlightOnWheel = False Me.MetroTabPage1.HorizontalScrollbarHighlightOnWheel = False
Me.MetroTabPage1.HorizontalScrollbarSize = 10 Me.MetroTabPage1.HorizontalScrollbarSize = 10
Me.MetroTabPage1.Location = New System.Drawing.Point(4, 44) Me.MetroTabPage1.Location = New System.Drawing.Point(4, 35)
Me.MetroTabPage1.Name = "MetroTabPage1" Me.MetroTabPage1.Name = "MetroTabPage1"
Me.MetroTabPage1.Size = New System.Drawing.Size(501, 519) Me.MetroTabPage1.Size = New System.Drawing.Size(501, 528)
Me.MetroTabPage1.TabIndex = 7 Me.MetroTabPage1.TabIndex = 7
Me.MetroTabPage1.Text = "Crunchyroll" Me.MetroTabPage1.Text = "Crunchyroll"
Me.MetroTabPage1.VerticalScrollbarBarColor = True Me.MetroTabPage1.VerticalScrollbarBarColor = True
@ -1218,7 +1217,6 @@ Partial Class Einstellungen
Me.GroupBox11.BackColor = System.Drawing.Color.Transparent Me.GroupBox11.BackColor = System.Drawing.Color.Transparent
Me.GroupBox11.Controls.Add(Me.CB_srt) Me.GroupBox11.Controls.Add(Me.CB_srt)
Me.GroupBox11.Controls.Add(Me.CB_vtt) Me.GroupBox11.Controls.Add(Me.CB_vtt)
Me.GroupBox11.Controls.Add(Me.CB_dfxp)
Me.GroupBox11.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.GroupBox11.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.GroupBox11.Location = New System.Drawing.Point(5, 182) Me.GroupBox11.Location = New System.Drawing.Point(5, 182)
Me.GroupBox11.Name = "GroupBox11" Me.GroupBox11.Name = "GroupBox11"
@ -1232,7 +1230,7 @@ Partial Class Einstellungen
Me.CB_srt.AutoSize = True Me.CB_srt.AutoSize = True
Me.CB_srt.FontSize = MetroFramework.MetroCheckBoxSize.Medium Me.CB_srt.FontSize = MetroFramework.MetroCheckBoxSize.Medium
Me.CB_srt.ForeColor = System.Drawing.Color.Black Me.CB_srt.ForeColor = System.Drawing.Color.Black
Me.CB_srt.Location = New System.Drawing.Point(66, 41) Me.CB_srt.Location = New System.Drawing.Point(139, 42)
Me.CB_srt.Name = "CB_srt" Me.CB_srt.Name = "CB_srt"
Me.CB_srt.Size = New System.Drawing.Size(41, 19) Me.CB_srt.Size = New System.Drawing.Size(41, 19)
Me.CB_srt.TabIndex = 36 Me.CB_srt.TabIndex = 36
@ -1244,25 +1242,13 @@ Partial Class Einstellungen
Me.CB_vtt.AutoSize = True Me.CB_vtt.AutoSize = True
Me.CB_vtt.FontSize = MetroFramework.MetroCheckBoxSize.Medium Me.CB_vtt.FontSize = MetroFramework.MetroCheckBoxSize.Medium
Me.CB_vtt.ForeColor = System.Drawing.Color.Black Me.CB_vtt.ForeColor = System.Drawing.Color.Black
Me.CB_vtt.Location = New System.Drawing.Point(188, 41) Me.CB_vtt.Location = New System.Drawing.Point(261, 42)
Me.CB_vtt.Name = "CB_vtt" Me.CB_vtt.Name = "CB_vtt"
Me.CB_vtt.Size = New System.Drawing.Size(42, 19) Me.CB_vtt.Size = New System.Drawing.Size(42, 19)
Me.CB_vtt.TabIndex = 37 Me.CB_vtt.TabIndex = 37
Me.CB_vtt.Text = "vtt" Me.CB_vtt.Text = "vtt"
Me.CB_vtt.UseSelectable = True Me.CB_vtt.UseSelectable = True
' '
'CB_dfxp
'
Me.CB_dfxp.AutoSize = True
Me.CB_dfxp.FontSize = MetroFramework.MetroCheckBoxSize.Medium
Me.CB_dfxp.ForeColor = System.Drawing.Color.Black
Me.CB_dfxp.Location = New System.Drawing.Point(302, 41)
Me.CB_dfxp.Name = "CB_dfxp"
Me.CB_dfxp.Size = New System.Drawing.Size(51, 19)
Me.CB_dfxp.TabIndex = 38
Me.CB_dfxp.Text = "dfxp"
Me.CB_dfxp.UseSelectable = True
'
'GroupBox10 'GroupBox10
' '
Me.GroupBox10.BackColor = System.Drawing.Color.Transparent Me.GroupBox10.BackColor = System.Drawing.Color.Transparent
@ -1716,7 +1702,6 @@ Partial Class Einstellungen
Friend WithEvents CB_fun_eng As MetroFramework.Controls.MetroCheckBox Friend WithEvents CB_fun_eng As MetroFramework.Controls.MetroCheckBox
Friend WithEvents CB_srt As MetroFramework.Controls.MetroCheckBox Friend WithEvents CB_srt As MetroFramework.Controls.MetroCheckBox
Friend WithEvents CB_vtt As MetroFramework.Controls.MetroCheckBox Friend WithEvents CB_vtt As MetroFramework.Controls.MetroCheckBox
Friend WithEvents CB_dfxp As MetroFramework.Controls.MetroCheckBox
Friend WithEvents AAuto As MetroFramework.Controls.MetroRadioButton Friend WithEvents AAuto As MetroFramework.Controls.MetroRadioButton
Friend WithEvents A480p As MetroFramework.Controls.MetroRadioButton Friend WithEvents A480p As MetroFramework.Controls.MetroRadioButton
Friend WithEvents A360p As MetroFramework.Controls.MetroRadioButton Friend WithEvents A360p As MetroFramework.Controls.MetroRadioButton

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-#389" Label6.Text = "You have: v" + Application.ProductVersion.ToString + " Chromium-U9"
BackgroundWorker1.RunWorkerAsync() BackgroundWorker1.RunWorkerAsync()
@ -132,11 +132,6 @@ Public Class Einstellungen
CB_vtt.Checked = False CB_vtt.Checked = False
End If End If
If Main.Funimation_dfxp = True Then
CB_dfxp.Checked = True
Else
CB_dfxp.Checked = False
End If
If Main.HardSubFunimation = "en" Then If Main.HardSubFunimation = "en" Then
CB_Fun_HardSubs.SelectedItem = "English" CB_Fun_HardSubs.SelectedItem = "English"
@ -570,27 +565,7 @@ Public Class Einstellungen
End If End If
#Region "funimation" #Region "funimation"
If CB_srt.Checked = True Then
Main.Funimation_srt = True
rk.SetValue("Funimation_srt", "1", RegistryValueKind.String)
Else
Main.Funimation_srt = False
rk.SetValue("Funimation_srt", "0", RegistryValueKind.String)
End If
If CB_vtt.Checked = True Then
Main.Funimation_vtt = True
rk.SetValue("Funimation_vtt", "1", RegistryValueKind.String)
Else
Main.Funimation_vtt = False
rk.SetValue("Funimation_vtt", "0", RegistryValueKind.String)
End If
If CB_dfxp.Checked = True Then
Main.Funimation_dfxp = True
rk.SetValue("Funimation_dfxp", "1", RegistryValueKind.String)
Else
Main.Funimation_dfxp = False
rk.SetValue("Funimation_dfxp", "0", RegistryValueKind.String)
End If
Main.DubFunimation = Fun_Dub_Over.SelectedItem.ToString Main.DubFunimation = Fun_Dub_Over.SelectedItem.ToString
@ -638,14 +613,37 @@ Public Class Einstellungen
If CB_fun_eng.Checked = True Then If CB_fun_eng.Checked = True Then
Main.SubFunimation.Add("en") Main.SubFunimation.Add("en")
End If End If
If CB_fun_es.Checked = True Then If CB_fun_es.Checked = True Then
Main.SubFunimation.Add("es") Main.SubFunimation.Add("es")
End If End If
If CB_fun_ptbr.Checked = True Then If CB_fun_ptbr.Checked = True Then
Main.SubFunimation.Add("pt") Main.SubFunimation.Add("pt")
End If End If
If Main.SubFunimation.Count > 0 And CB_vtt.Checked = False And CB_srt.Checked = False Then
CB_vtt.Checked = True
End If
If CB_srt.Checked = True Then
Main.Funimation_srt = True
rk.SetValue("Funimation_srt", "1", RegistryValueKind.String)
Else
Main.Funimation_srt = False
rk.SetValue("Funimation_srt", "0", RegistryValueKind.String)
End If
If CB_vtt.Checked = True Then
Main.Funimation_vtt = True
rk.SetValue("Funimation_vtt", "1", RegistryValueKind.String)
Else
Main.Funimation_vtt = False
rk.SetValue("Funimation_vtt", "0", RegistryValueKind.String)
End If
Dim FunimationSaveString As String = Nothing Dim FunimationSaveString As String = Nothing
For ii As Integer = 0 To Main.SubFunimation.Count - 1 For ii As Integer = 0 To Main.SubFunimation.Count - 1
If FunimationSaveString = Nothing Then If FunimationSaveString = Nothing Then
@ -1213,6 +1211,10 @@ Public Class Einstellungen
End If End If
End Sub End Sub
Private Sub TabPage6_Click(sender As Object, e As EventArgs) Handles TabPage6.Click
End Sub