fix ES-LA hardsub issue

change 'esLA' to 'es-419' due to #644
set dub value to 'ja-JP' if more than 2 subs are avalible
This commit is contained in:
hama3254 2022-12-28 23:27:32 +01:00
parent 190964aa81
commit 586a12d94d
5 changed files with 36 additions and 13 deletions

Binary file not shown.

View File

@ -153,8 +153,10 @@ Public Class ErrorDialog
Return "en-US"
ElseIf HardSub = "Português (Brasil)" Then
Return "pt-BR"
ElseIf HardSub = "Español (LA)" Then
ElseIf HardSub = "Español (LA)" Then '"(LA)-Español"
Return "es-LA"
ElseIf HardSub = "Español" Then
Return "es-419"
ElseIf HardSub = "Français (France)" Then
Return "fr-FR"
ElseIf HardSub = "العربية (Arabic)" Then
@ -205,4 +207,5 @@ Public Class ErrorDialog
PictureBox9.Enabled = True
PictureBox9.Cursor = Cursors.Hand
End Sub
End Class

View File

@ -763,8 +763,10 @@ Public Class Main
Return "English"
ElseIf HardSub = "ptBR" Or HardSub = "pt" Or HardSub = "pt-BR" Then
Return "Português (Brasil)"
ElseIf HardSub = "esLA" Or HardSub = "es" Or HardSub = "es-419" Or HardSub = "es-LA" Then
ElseIf HardSub = "esLA" Or HardSub = "es" Or HardSub = "es-LA" Then
Return "Español (LA)"
ElseIf HardSub = "es-419" Then
Return "Español"
ElseIf HardSub = "frFR" Or HardSub = "fr-FR" Then
Return "Français (France)"
ElseIf HardSub = "arME" Or HardSub = "ar-ME" Then
@ -1727,8 +1729,19 @@ Public Class Main
For Each MetaEntrys As JProperty In item.Values
Select Case MetaEntrys.Name
Case "audio_locale"
Dim AudioTag As String = MetaEntrys.Value.ToString
CR_audio_locale = String.Join(" ", AudioTag.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c).Replace(Chr(34), "").Replace("\", "").Replace("/", "").Replace(":", "")
If CR_audio_locale IsNot "ja-JP" Then
Dim AudioTag As String = MetaEntrys.Value.ToString
CR_audio_locale = String.Join(" ", AudioTag.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c).Replace(Chr(34), "").Replace("\", "").Replace("/", "").Replace(":", "")
End If
Case "subtitles"
Dim SubtitleSubData As List(Of JToken) = MetaEntrys.Children().ToList
For Each SubtitleSubItem As JObject In SubtitleSubData
'MsgBox(SubtitleSubItem.Children().ToList.Count.ToString)
If SubtitleSubItem.Children().ToList.Count > 2 Then
CR_audio_locale = "ja-JP"
End If
Exit For
Next
End Select
Next
@ -1765,9 +1778,10 @@ Public Class Main
If UserCloseDialog = True Then
Throw New System.Exception(Chr(34) + "UserAbort" + Chr(34))
Else
'MsgBox(CR_HardSubLang)
CR_HardSubLang = ResoBackString
ResoBackString = Nothing
'MsgBox(CR_Streams.Count.ToString)
For i As Integer = 0 To CR_Streams.Count - 1
Debug.WriteLine(CR_Streams.Item(i).subLang)
If CR_Streams.Item(i).subLang = CR_HardSubLang Then

View File

@ -867,10 +867,10 @@ Partial Class Einstellungen
Me.TabPage1.HorizontalScrollbarBarColor = True
Me.TabPage1.HorizontalScrollbarHighlightOnWheel = False
Me.TabPage1.HorizontalScrollbarSize = 10
Me.TabPage1.Location = New System.Drawing.Point(4, 44)
Me.TabPage1.Location = New System.Drawing.Point(4, 35)
Me.TabPage1.Name = "TabPage1"
Me.TabPage1.Padding = New System.Windows.Forms.Padding(3)
Me.TabPage1.Size = New System.Drawing.Size(501, 519)
Me.TabPage1.Size = New System.Drawing.Size(501, 528)
Me.TabPage1.TabIndex = 0
Me.TabPage1.Text = " Main"
Me.TabPage1.VerticalScrollbar = True
@ -1125,7 +1125,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(509, 567)
Me.TabControl1.TabIndex = 0
Me.TabControl1.UseSelectable = True
@ -1139,9 +1139,9 @@ Partial Class Einstellungen
Me.MetroTabPage2.HorizontalScrollbarBarColor = True
Me.MetroTabPage2.HorizontalScrollbarHighlightOnWheel = False
Me.MetroTabPage2.HorizontalScrollbarSize = 10
Me.MetroTabPage2.Location = New System.Drawing.Point(4, 35)
Me.MetroTabPage2.Location = New System.Drawing.Point(4, 44)
Me.MetroTabPage2.Name = "MetroTabPage2"
Me.MetroTabPage2.Size = New System.Drawing.Size(501, 528)
Me.MetroTabPage2.Size = New System.Drawing.Size(501, 519)
Me.MetroTabPage2.TabIndex = 8
Me.MetroTabPage2.Text = "Naming"
Me.MetroTabPage2.VerticalScrollbarBarColor = True
@ -1338,9 +1338,9 @@ Partial Class Einstellungen
Me.MetroTabPage1.HorizontalScrollbarBarColor = True
Me.MetroTabPage1.HorizontalScrollbarHighlightOnWheel = False
Me.MetroTabPage1.HorizontalScrollbarSize = 10
Me.MetroTabPage1.Location = New System.Drawing.Point(4, 35)
Me.MetroTabPage1.Location = New System.Drawing.Point(4, 44)
Me.MetroTabPage1.Name = "MetroTabPage1"
Me.MetroTabPage1.Size = New System.Drawing.Size(501, 528)
Me.MetroTabPage1.Size = New System.Drawing.Size(501, 519)
Me.MetroTabPage1.TabIndex = 7
Me.MetroTabPage1.Text = "Crunchyroll"
Me.MetroTabPage1.VerticalScrollbarBarColor = True

View File

@ -224,6 +224,8 @@ Public Class Einstellungen
ComboBox1.SelectedItem = "English"
ElseIf Main.SubSprache = "ptBR" Then
ComboBox1.SelectedItem = "Português (Brasil)"
ElseIf Main.SubSprache = "es-419" Then
ComboBox1.SelectedItem = "Español (LA)"
ElseIf Main.SubSprache = "esLA" Then
ComboBox1.SelectedItem = "Español (LA)"
ElseIf Main.SubSprache = "frFR" Then
@ -460,7 +462,7 @@ Public Class Einstellungen
Main.SubSprache = "ptBR"
My.Settings.Subtitle = Main.SubSprache
ElseIf ComboBox1.SelectedItem.ToString = "Español (LA)" Then
Main.SubSprache = "esLA"
Main.SubSprache = "es-419"
My.Settings.Subtitle = Main.SubSprache
ElseIf ComboBox1.SelectedItem.ToString = "Français (France)" Then
Main.SubSprache = "frFR"
@ -1280,6 +1282,10 @@ Public Class Einstellungen
End Sub
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
End Sub