fix error handling hardsub

fix error handling hardsub #945
This commit is contained in:
hama3254 2024-05-04 13:24:54 +02:00
parent afd5f06a17
commit b94628dfc3
4 changed files with 14 additions and 16 deletions

Binary file not shown.

View File

@ -40,22 +40,14 @@ Public Class ErrorDialog
Debug.WriteLine(Main.ResoNotFoundString)
Debug.WriteLine("ResoNotFoundString")
Dim lang_avalibe As String() = Main.ResoNotFoundString.Split(New String() {"hardsub_locale" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim lang_avalibe As String() = Main.ResoNotFoundString.Split(New String() {";"}, System.StringSplitOptions.RemoveEmptyEntries)
For i As Integer = 1 To lang_avalibe.Count - 1
If CBool(InStr(lang_avalibe(i), "https://")) Then
Else
Continue For
End If
If lang_avalibe(i).Substring(0, 1) = Chr(34) Then
ComboBox1.Items.Add("No Hardsubs")
Continue For 'Chr(34) +
End If
'MsgBox(lang_avalibe(i))
Dim langsplit As String() = lang_avalibe(i).Split(New String() {Chr(34) + ","}, System.StringSplitOptions.RemoveEmptyEntries)
ComboBox1.Items.Add(Main.ConvertSubValue(langsplit(0), ConvertSubsEnum.DisplayText))
For i As Integer = 0 To lang_avalibe.Count - 1
ComboBox1.Items.Add(Main.ConvertSubValue(lang_avalibe(i), ConvertSubsEnum.DisplayText))
Next
SurroundingSub()
ElseIf Main.DialogTaskString = "Resolution" Then
StatusLabel.Text = Main.LabelResoNotFoundText
Dim Reso_avaible1 As String() = Main.ResoNotFoundString.Split(New String() {"RESOLUTION="}, System.StringSplitOptions.RemoveEmptyEntries)

View File

@ -1230,12 +1230,18 @@ Public Class Main
CR_URI_Master.AddRange(RawStream)
ElseIf CR_URI_Master.Count = 0 Then
Dim ListOfStreams As String = ""
For i As Integer = 0 To CR_Streams.Count - 1 'fill back the streams to a string to use it for the error handling
ListOfStreams = ListOfStreams + CR_Streams(i).subLang + ";"
Next
Me.Invoke(New Action(Function() As Object
ResoNotFoundString = VideoJSON_New
ResoNotFoundString = ListOfStreams
DialogTaskString = "Language_CR_Beta"
ErrorDialog.ShowDialog()
Return Nothing
End Function))
If UserCloseDialog = True Then
Throw New System.Exception(Chr(34) + "UserAbort" + Chr(34))
Else

View File

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