fixes + version checker

fix funimation hardsub dfxp issue
fix download count wrong
fix unicode characters
added version checker in about via github releases
This commit is contained in:
hama3254 2021-01-14 18:06:42 +01:00
parent c66f9702ad
commit 6b41f2571b
20 changed files with 297 additions and 176 deletions

Binary file not shown.

View File

@ -604,9 +604,9 @@ Public Class Anime_Add
If GroupBox3.Visible = True Then If GroupBox3.Visible = True Then
If InStr(ListBox1.GetItemText(ListBox1.Items(0)), "funimation.com") Then If InStr(ListBox1.GetItemText(ListBox1.Items(0)), "funimation.com") Then
If Main.Funimation_Grapp_RDY = True Then If Main.Funimation_Grapp_RDY = True Then
Main.Funimation_Grapp_RDY = False
GeckoFX.WebBrowser1.Navigate(ListBox1.GetItemText(ListBox1.Items(0))) GeckoFX.WebBrowser1.Navigate(ListBox1.GetItemText(ListBox1.Items(0)))
ListBox1.Items.Remove(ListBox1.Items(0)) ListBox1.Items.Remove(ListBox1.Items(0))
Main.Funimation_Grapp_RDY = False
Main.b = False Main.b = False
StatusLabel.Text = "Status: loading ..." StatusLabel.Text = "Status: loading ..."
Main.Text = "Status: loading ..." Main.Text = "Status: loading ..."
@ -615,9 +615,9 @@ Public Class Anime_Add
Else Else
If Main.Grapp_RDY = True Then If Main.Grapp_RDY = True Then
Main.Grapp_RDY = False
GeckoFX.WebBrowser1.Navigate(ListBox1.GetItemText(ListBox1.Items(0))) GeckoFX.WebBrowser1.Navigate(ListBox1.GetItemText(ListBox1.Items(0)))
ListBox1.Items.Remove(ListBox1.Items(0)) ListBox1.Items.Remove(ListBox1.Items(0))
Main.Grapp_RDY = False
Main.b = False Main.b = False
StatusLabel.Text = "Status: loading ..." StatusLabel.Text = "Status: loading ..."
Main.Text = "Status: loading ..." Main.Text = "Status: loading ..."
@ -822,6 +822,7 @@ Public Class Anime_Add
Dim AoDTitle00() As String = AoDTitle0(ii + 1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) Dim AoDTitle00() As String = AoDTitle0(ii + 1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim AoD_EpisodeSplit() As String = AoDTitle00(0).Split(New String() {" - "}, System.StringSplitOptions.RemoveEmptyEntries) Dim AoD_EpisodeSplit() As String = AoDTitle00(0).Split(New String() {" - "}, System.StringSplitOptions.RemoveEmptyEntries)
If AoD_EpisodeSplit.Count > 2 Then If AoD_EpisodeSplit.Count > 2 Then
AoD_Episode_Title = Nothing
For i3 As Integer = 1 To AoD_EpisodeSplit.Count - 1 For i3 As Integer = 1 To AoD_EpisodeSplit.Count - 1
If AoD_Episode_Title = Nothing Then If AoD_Episode_Title = Nothing Then
AoD_Episode_Title = System.Text.RegularExpressions.Regex.Replace(AoD_EpisodeSplit(i3), "[^\w\\-]", " ").Trim(" ") AoD_Episode_Title = System.Text.RegularExpressions.Regex.Replace(AoD_EpisodeSplit(i3), "[^\w\\-]", " ").Trim(" ")
@ -1203,6 +1204,7 @@ Public Class Anime_Add
Private Sub Anime_Add_Resize(sender As Object, e As EventArgs) Handles Me.Resize Private Sub Anime_Add_Resize(sender As Object, e As EventArgs) Handles Me.Resize
Btn_Close.Location = New Point(Me.Width - 40, 1) Btn_Close.Location = New Point(Me.Width - 40, 1)
Btn_min.Location = New Point(Me.Width - 68, 10) Btn_min.Location = New Point(Me.Width - 68, 10)
Me.WindowState = System.Windows.Forms.FormWindowState.Normal
End Sub End Sub
Private Sub Btn_min_Click(sender As Object, e As EventArgs) Handles Btn_min.Click Private Sub Btn_min_Click(sender As Object, e As EventArgs) Handles Btn_min.Click
@ -1277,4 +1279,8 @@ Public Class Anime_Add
End Try End Try
End If End If
End Sub End Sub
Private Sub Anime_Add_DoubleClick(sender As Object, e As EventArgs) Handles Me.DoubleClick
'
End Sub
End Class End Class

View File

@ -53,6 +53,7 @@ Namespace My
GeckoPreferences.Default("plugin.state.flash") = 0 GeckoPreferences.Default("plugin.state.flash") = 0
GeckoPreferences.Default("zoom.maxPercent") = 100 GeckoPreferences.Default("zoom.maxPercent") = 100
GeckoPreferences.Default("zoom.minPercent") = 100 GeckoPreferences.Default("zoom.minPercent") = 100
GeckoPreferences.Default("layers.geometry.d3d11.enabled") = False
'GeckoPreferences.Default("network.proxy.http") = "51.159.26.44" 'GeckoPreferences.Default("network.proxy.http") = "51.159.26.44"
'GeckoPreferences.Default("network.proxy.http_port") = 3128 'GeckoPreferences.Default("network.proxy.http_port") = 3128
'GeckoPreferences.Default("network.proxy.ssl") = "51.159.26.44" 'GeckoPreferences.Default("network.proxy.ssl") = "51.159.26.44"

View File

@ -897,9 +897,9 @@ Public Class CRD_List_Item
DL_URL = DL_URL.Replace("-headers " + My.Resources.ffmpeg_user_agend, "") DL_URL = DL_URL.Replace("-headers " + My.Resources.ffmpeg_user_agend, "")
End If End If
Using sink3 As New StreamWriter(Path.GetDirectoryName(DL_Pfad.Replace(Chr(34), "")) + "\hybridelog.log", False, utf8WithoutBom) 'Using sink3 As New StreamWriter(Path.GetDirectoryName(DL_Pfad.Replace(Chr(34), "")) + "\hybridelog.log", False, utf8WithoutBom)
sink3.WriteLine(HybrideLog) ' sink3.WriteLine(HybrideLog)
End Using 'End Using
'MsgBox(DL_URL) 'MsgBox(DL_URL)
@ -1016,112 +1016,118 @@ Public Class CRD_List_Item
End Try End Try
#Region "Detect Auto resolution" #Region "Detect Auto resolution"
If MergeSubstoMP4 = False Then Try
If CBool(InStr(e.Data, "Stream #")) And CBool(InStr(e.Data, "Video")) = True Then
'MsgBox(True.ToString + vbNewLine + e.Data)
'MsgBox(InStr(e.Data, "Stream #").ToString + vbNewLine + InStr(e.Data, "Video").ToString)
'MsgBox("with CBool" + vbNewLine + CBool(InStr(e.Data, "Stream #")).ToString + vbNewLine + CBool(InStr(e.Data, "Video")).ToString)
ListOfStreams.Add(e.Data) If MergeSubstoMP4 = False Then
End If If CBool(InStr(e.Data, "Stream #")) And CBool(InStr(e.Data, "Video")) = True Then
If InStr(e.Data, "Stream #") And InStr(e.Data, " -> ") Then 'MsgBox(True.ToString + vbNewLine + e.Data)
'UsesStreams.Add(e.Data) 'MsgBox(InStr(e.Data, "Stream #").ToString + vbNewLine + InStr(e.Data, "Video").ToString)
'MsgBox(e.Data)
Dim StreamSearch() As String = e.Data.Split(New String() {" -> "}, System.StringSplitOptions.RemoveEmptyEntries) 'MsgBox("with CBool" + vbNewLine + CBool(InStr(e.Data, "Stream #")).ToString + vbNewLine + CBool(InStr(e.Data, "Video")).ToString)
Dim StreamSearch2 As String = StreamSearch(0) + ":"
For i As Integer = 0 To ListOfStreams.Count - 1 ListOfStreams.Add(e.Data)
If CBool(InStr(ListOfStreams(i), StreamSearch2)) Then 'And CBool(InStr(ListOfStreams(i), " Video:")) Then End If
'MsgBox(ListOfStreams(i)) If InStr(e.Data, "Stream #") And InStr(e.Data, " -> ") Then
Dim ResoSearch() As String = ListOfStreams(i).Split(New String() {"x"}, System.StringSplitOptions.RemoveEmptyEntries) 'UsesStreams.Add(e.Data)
'MsgBox(ResoSearch(1)) 'MsgBox(e.Data)
If CBool(InStr(ResoSearch(2), " [")) = True Then Dim StreamSearch() As String = e.Data.Split(New String() {" -> "}, System.StringSplitOptions.RemoveEmptyEntries)
Dim ResoSearch2() As String = ResoSearch(2).Split(New String() {" ["}, System.StringSplitOptions.RemoveEmptyEntries) Dim StreamSearch2 As String = StreamSearch(0) + ":"
Me.Invoke(New Action(Function() For i As Integer = 0 To ListOfStreams.Count - 1
Label_Reso.Text = ResoSearch2(0) + "p" If CBool(InStr(ListOfStreams(i), StreamSearch2)) Then 'And CBool(InStr(ListOfStreams(i), " Video:")) Then
Return Nothing 'MsgBox(ListOfStreams(i))
End Function)) Dim ResoSearch() As String = ListOfStreams(i).Split(New String() {"x"}, System.StringSplitOptions.RemoveEmptyEntries)
'MsgBox(ResoSearch(1))
If CBool(InStr(ResoSearch(2), " [")) = True Then
Dim ResoSearch2() As String = ResoSearch(2).Split(New String() {" ["}, System.StringSplitOptions.RemoveEmptyEntries)
Me.Invoke(New Action(Function()
Label_Reso.Text = ResoSearch2(0) + "p"
Return Nothing
End Function))
End If
End If End If
End If Next
Next
End If
End If
#End Region
If InStr(e.Data, "Duration: N/A, bitrate: N/A") Then
ElseIf InStr(e.Data, "Duration: ") Then
Dim ZeitGesamt As String() = e.Data.Split(New String() {"Duration: "}, System.StringSplitOptions.RemoveEmptyEntries)
Dim ZeitGesamt2 As String() = ZeitGesamt(1).Split(New [Char]() {System.Convert.ToChar(".")})
Dim ZeitGesamtSplit() As String = ZeitGesamt2(0).Split(New [Char]() {System.Convert.ToChar(":")})
'MsgBox(ZeitGesamt2(0))
ZeitGesamtInteger = CInt(ZeitGesamtSplit(0)) * 3600 + CInt(ZeitGesamtSplit(1)) * 60 + CInt(ZeitGesamtSplit(2))
ElseIf InStr(e.Data, " time=") Then
'MsgBox(e.Data)
Dim ZeitFertig As String() = e.Data.Split(New String() {" time="}, System.StringSplitOptions.RemoveEmptyEntries)
Dim ZeitFertig2 As String() = ZeitFertig(1).Split(New [Char]() {System.Convert.ToChar(".")})
Dim ZeitFertigSplit() As String = ZeitFertig2(0).Split(New [Char]() {System.Convert.ToChar(":")})
Dim ZeitFertigInteger As Integer = CInt(ZeitFertigSplit(0)) * 3600 + CInt(ZeitFertigSplit(1)) * 60 + CInt(ZeitFertigSplit(2))
Dim bitrate3 As String = 0
If InStr(e.Data, "bitrate=") Then
Dim bitrate As String() = e.Data.Split(New String() {"bitrate="}, System.StringSplitOptions.RemoveEmptyEntries)
Dim bitrate2 As String() = bitrate(1).Split(New String() {"kbits/s"}, System.StringSplitOptions.RemoveEmptyEntries)
If InStr(bitrate2(0), ".") Then
Dim bitrateTemo As String() = bitrate2(0).Split(New String() {"."}, System.StringSplitOptions.RemoveEmptyEntries)
bitrate3 = bitrateTemo(0)
ElseIf InStr(bitrate2(0), ",") Then
Dim bitrateTemo As String() = bitrate2(0).Split(New String() {","}, System.StringSplitOptions.RemoveEmptyEntries)
bitrate3 = bitrateTemo(0)
End If End If
End If End If
Dim bitrateInt As Double = CInt(bitrate3) / 1024 #End Region
Dim FileSize As Double = ZeitGesamtInteger * bitrateInt / 8
Dim DownloadFinished As Double = ZeitFertigInteger * bitrateInt / 8
Dim percent As Integer = ZeitFertigInteger / ZeitGesamtInteger * 100
Me.Invoke(New Action(Function()
If percent > 100 Then
percent = 100
End If
ProgressBar1.Value = percent
Label_percent.Text = Math.Round(DownloadFinished, 2, MidpointRounding.AwayFromZero).ToString + "MB/" + Math.Round(FileSize, 2, MidpointRounding.AwayFromZero).ToString + "MB " + percent.ToString + "%"
Return Nothing
End Function))
ElseIf InStr(e.Data, "Failed to open segment") Then
FailedCount = FailedCount + 1
If Item_ErrorTolerance = 0 Then
ElseIf FailedCount >= Item_ErrorTolerance Then If InStr(e.Data, "Duration: N/A, bitrate: N/A") Then
Failed = True
StatusRunning = False ElseIf InStr(e.Data, "Duration: ") Then
bt_pause.BackgroundImage = My.Resources.main_pause_play Dim ZeitGesamt As String() = e.Data.Split(New String() {"Duration: "}, System.StringSplitOptions.RemoveEmptyEntries)
SuspendProcess(proc) Dim ZeitGesamt2 As String() = ZeitGesamt(1).Split(New [Char]() {System.Convert.ToChar(".")})
Dim ZeitGesamtSplit() As String = ZeitGesamt2(0).Split(New [Char]() {System.Convert.ToChar(":")})
'MsgBox(ZeitGesamt2(0))
ZeitGesamtInteger = CInt(ZeitGesamtSplit(0)) * 3600 + CInt(ZeitGesamtSplit(1)) * 60 + CInt(ZeitGesamtSplit(2))
ElseIf InStr(e.Data, " time=") Then
'MsgBox(e.Data)
Dim ZeitFertig As String() = e.Data.Split(New String() {" time="}, System.StringSplitOptions.RemoveEmptyEntries)
Dim ZeitFertig2 As String() = ZeitFertig(1).Split(New [Char]() {System.Convert.ToChar(".")})
Dim ZeitFertigSplit() As String = ZeitFertig2(0).Split(New [Char]() {System.Convert.ToChar(":")})
Dim ZeitFertigInteger As Integer = CInt(ZeitFertigSplit(0)) * 3600 + CInt(ZeitFertigSplit(1)) * 60 + CInt(ZeitFertigSplit(2))
Dim bitrate3 As String = 0
If InStr(e.Data, "bitrate=") Then
Dim bitrate As String() = e.Data.Split(New String() {"bitrate="}, System.StringSplitOptions.RemoveEmptyEntries)
Dim bitrate2 As String() = bitrate(1).Split(New String() {"kbits/s"}, System.StringSplitOptions.RemoveEmptyEntries)
If InStr(bitrate2(0), ".") Then
Dim bitrateTemo As String() = bitrate2(0).Split(New String() {"."}, System.StringSplitOptions.RemoveEmptyEntries)
bitrate3 = bitrateTemo(0)
ElseIf InStr(bitrate2(0), ",") Then
Dim bitrateTemo As String() = bitrate2(0).Split(New String() {","}, System.StringSplitOptions.RemoveEmptyEntries)
bitrate3 = bitrateTemo(0)
End If
End If
Dim bitrateInt As Double = CInt(bitrate3) / 1024
Dim FileSize As Double = ZeitGesamtInteger * bitrateInt / 8
Dim DownloadFinished As Double = ZeitFertigInteger * bitrateInt / 8
Dim percent As Integer = ZeitFertigInteger / ZeitGesamtInteger * 100
Me.Invoke(New Action(Function() Me.Invoke(New Action(Function()
If percent > 100 Then
Label_percent.Text = "Missing segment detected, retry or resume with the play button" percent = 100
End If
ProgressBar1.Value = percent
Label_percent.Text = Math.Round(DownloadFinished, 2, MidpointRounding.AwayFromZero).ToString + "MB/" + Math.Round(FileSize, 2, MidpointRounding.AwayFromZero).ToString + "MB " + percent.ToString + "%"
Return Nothing Return Nothing
End Function)) End Function))
ElseIf InStr(e.Data, "Failed to open segment") Then
FailedCount = FailedCount + 1
If Item_ErrorTolerance = 0 Then
ElseIf FailedCount >= Item_ErrorTolerance Then
Failed = True
StatusRunning = False
bt_pause.BackgroundImage = My.Resources.main_pause_play
SuspendProcess(proc)
Me.Invoke(New Action(Function()
Label_percent.Text = "Missing segment detected, retry or resume with the play button"
Return Nothing
End Function))
End If
ElseIf InStr(e.Data, "muxing overhead:") Then
Finished = True
Me.Invoke(New Action(Function()
Dim Done As String() = Label_percent.Text.Split(New String() {"MB"}, System.StringSplitOptions.RemoveEmptyEntries)
Label_percent.Text = "Finished - " + Done(0) + "MB"
Return Nothing
End Function))
If HybridMode = True Then
Thread.Sleep(5000)
Try
System.IO.Directory.Delete(HybridModePath, True)
Catch ex As Exception
End Try
End If
End If End If
ElseIf InStr(e.Data, "muxing overhead:") Then Catch ex As Exception
Finished = True Debug.WriteLine(ex.ToString)
Me.Invoke(New Action(Function() End Try
Dim Done As String() = Label_percent.Text.Split(New String() {"MB"}, System.StringSplitOptions.RemoveEmptyEntries)
Label_percent.Text = "Finished - " + Done(0) + "MB"
Return Nothing
End Function))
If HybridMode = True Then
Thread.Sleep(5000)
Try
System.IO.Directory.Delete(HybridModePath, True)
Catch ex As Exception
End Try
End If
End If
End Sub End Sub

View File

@ -226,7 +226,7 @@ Public Class GeckoFX
Dim SubtitleName As String = Main.WebbrowserTitle.Replace(" - Watch on VRV", "").Replace("Free Streaming", "").Replace("Tubi", "") Dim SubtitleName As String = Main.WebbrowserTitle.Replace(" - Watch on VRV", "").Replace("Free Streaming", "").Replace("Tubi", "")
SubtitleName = Main.RemoveExtraSpaces(System.Text.RegularExpressions.Regex.Replace(SubtitleName, "[^\w\\-]", " ")) SubtitleName = Main.RemoveExtraSpaces(String.Join(" ", SubtitleName.Split(Main.invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c)) 'System.Text.RegularExpressions.Regex.Replace(SubtitleName, "[^\w\\-]", " "))
Dim SubtitlePfad As String = Main.Pfad + "\" + SubtitleName Dim SubtitlePfad As String = Main.Pfad + "\" + SubtitleName
Dim logFileStream As FileStream = New FileStream(Main.GeckoLogFile, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite) Dim logFileStream As FileStream = New FileStream(Main.GeckoLogFile, FileMode.Open, FileAccess.ReadWrite, FileShare.ReadWrite)
@ -542,7 +542,7 @@ Public Class GeckoFX
End If End If
End If End If
Next Next
NameDLFinal = System.Text.RegularExpressions.Regex.Replace(NameDLFinal, "[^\w\\-]", " ") NameDLFinal = String.Join(" ", NameDLFinal.Split(Main.invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c) ''System.Text.RegularExpressions.Regex.Replace(NameDLFinal, "[^\w\\-]", " ")
If Main.Debug2 = True Then If Main.Debug2 = True Then
MsgBox(NameDLFinal) MsgBox(NameDLFinal)
End If End If

View File

@ -149,7 +149,6 @@ Partial Class Main
' '
'Timer3 'Timer3
' '
Me.Timer3.Enabled = True
Me.Timer3.Interval = 1000 Me.Timer3.Interval = 1000
' '
'TheTextBox 'TheTextBox

View File

@ -16,7 +16,7 @@ Public Class Main
Public Manager As New MetroStyleManager Public Manager As New MetroStyleManager
Public DarkModeValue As Boolean = False Public DarkModeValue As Boolean = False
Public invalids As Char() = System.IO.Path.GetInvalidFileNameChars()
@ -329,6 +329,7 @@ Public Class Main
End Try End Try
If StartServer = True Then If StartServer = True Then
Timer3.Enabled = True
Dim t As New Thread(AddressOf ServerStart) Dim t As New Thread(AddressOf ServerStart)
t.Priority = ThreadPriority.Normal t.Priority = ThreadPriority.Normal
t.IsBackground = True t.IsBackground = True
@ -907,17 +908,25 @@ Public Class Main
CR_Name_Staffel0_Folge1 = CR_Name_2(0).Split(New [Char]() {System.Convert.ToChar(",")}, System.StringSplitOptions.RemoveEmptyEntries) CR_Name_Staffel0_Folge1 = CR_Name_2(0).Split(New [Char]() {System.Convert.ToChar(",")}, System.StringSplitOptions.RemoveEmptyEntries)
CR_Anime_Staffel = CR_Name_Staffel0_Folge1(0).Trim() CR_Anime_Staffel = CR_Name_Staffel0_Folge1(0).Trim()
CR_Anime_Folge = CR_Name_Staffel0_Folge1(1).Trim() CR_Anime_Folge = CR_Name_Staffel0_Folge1(1).Trim()
CR_Anime_Folge = System.Text.RegularExpressions.Regex.Replace(CR_Anime_Folge, "[^\w\\-]", " ") 'CR_Anime_Folge = System.Text.RegularExpressions.Regex.Replace(CR_Anime_Folge, "[^\w\\-]", " ")
CR_Anime_Folge = String.Join(" ", CR_Anime_Folge.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c)
'MsgBox(CR_Anime_Folge)
Else Else
CR_Anime_Staffel = Nothing CR_Anime_Staffel = Nothing
CR_Anime_Folge = CR_Name_2(0).Trim() CR_Anime_Folge = CR_Name_2(0).Trim()
CR_Anime_Folge = System.Text.RegularExpressions.Regex.Replace(CR_Anime_Folge, "[^\w\\-]", " ") 'CR_Anime_Folge = System.Text.RegularExpressions.Regex.Replace(CR_Anime_Folge, "[^\w\\-]", " ")
CR_Anime_Folge = String.Join(" ", CR_Anime_Folge.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c)
'MsgBox(CR_Anime_Folge)
End If End If
Dim CR_Name_4 As String() = CR_Name_1(0).Split(New String() {"class=" + Chr(34) + "text-link" + Chr(34) + ">"}, System.StringSplitOptions.RemoveEmptyEntries) '(New [Char]() {"-"}) Dim CR_Name_4 As String() = CR_Name_1(0).Split(New String() {"class=" + Chr(34) + "text-link" + Chr(34) + ">"}, System.StringSplitOptions.RemoveEmptyEntries) '(New [Char]() {"-"})
Dim CR_Name_Anime0 As String() = CR_Name_4(CR_Name_4.Length - 1).Split(New String() {"</a>"}, System.StringSplitOptions.RemoveEmptyEntries) Dim CR_Name_Anime0 As String() = CR_Name_4(CR_Name_4.Length - 1).Split(New String() {"</a>"}, System.StringSplitOptions.RemoveEmptyEntries)
CR_Name_Anime0(0) = System.Text.RegularExpressions.Regex.Replace(CR_Name_Anime0(0), "[^\w\\-]", " ") 'CR_Name_Anime0(0) = System.Text.RegularExpressions.Regex.Replace(CR_Name_Anime0(0), "[^\w\\-]", " ")
CR_Name_Anime0(0) = HtmlDecode(CR_Name_Anime0(0))
CR_Name_Anime0(0) = String.Join(" ", CR_Name_Anime0(0).Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c)
CR_Anime_Titel = CR_Name_Anime0(0).Trim CR_Anime_Titel = CR_Name_Anime0(0).Trim
If CR_Anime_Staffel = Nothing Then If CR_Anime_Staffel = Nothing Then
CR_FilenName = CR_Anime_Titel + " " + CR_Anime_Folge CR_FilenName = CR_Anime_Titel + " " + CR_Anime_Folge
@ -930,7 +939,7 @@ Public Class Main
End If End If
#End Region #End Region
CR_FilenName = System.Text.RegularExpressions.Regex.Replace(CR_FilenName, "[^\w\\-]", " ") CR_FilenName = String.Join(" ", CR_FilenName.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c) 'System.Text.RegularExpressions.Regex.Replace(CR_FilenName, "[^\w\\-]", " ")
CR_FilenName = RemoveExtraSpaces(CR_FilenName) CR_FilenName = RemoveExtraSpaces(CR_FilenName)
Pfad2 = UseSubfolder(CR_Anime_Titel, CR_Anime_Staffel, Pfad) Pfad2 = UseSubfolder(CR_Anime_Titel, CR_Anime_Staffel, Pfad)
@ -1354,18 +1363,19 @@ Public Class Main
If CBool(InStr(CR_Name_2(0), ",")) Then If CBool(InStr(CR_Name_2(0), ",")) Then
CR_Name_Staffel0_Folge1 = CR_Name_2(0).Split(New [Char]() {System.Convert.ToChar(",")}, System.StringSplitOptions.RemoveEmptyEntries) CR_Name_Staffel0_Folge1 = CR_Name_2(0).Split(New [Char]() {System.Convert.ToChar(",")}, System.StringSplitOptions.RemoveEmptyEntries)
CR_Anime_Staffel = CR_Name_Staffel0_Folge1(0).Trim() CR_Anime_Staffel = CR_Name_Staffel0_Folge1(0).Trim()
CR_Anime_Folge = CR_Name_Staffel0_Folge1(1).Trim() CR_Anime_Folge = CR_Name_Staffel0_Folge1(1)
CR_Anime_Folge = System.Text.RegularExpressions.Regex.Replace(CR_Anime_Folge, "[^\w\\-]", " ") CR_Anime_Folge = String.Join(" ", CR_Anime_Folge.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c) 'System.Text.RegularExpressions.Regex.Replace(CR_Anime_Folge, "[^\w\\-]", " ")
Else Else
CR_Anime_Staffel = Nothing CR_Anime_Staffel = Nothing
CR_Anime_Folge = CR_Name_2(0).Trim() CR_Anime_Folge = CR_Name_2(0).Trim()
CR_Anime_Folge = System.Text.RegularExpressions.Regex.Replace(CR_Anime_Folge, "[^\w\\-]", " ") 'MsgBox(CR_Anime_Folge)
CR_Anime_Folge = String.Join(" ", CR_Anime_Folge.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c) 'System.Text.RegularExpressions.Regex.Replace(CR_Anime_Folge, "[^\w\\-]", " ")
End If End If
Dim CR_Name_4 As String() = CR_Name_1(0).Split(New String() {"class=" + Chr(34) + "text-link" + Chr(34) + ">"}, System.StringSplitOptions.RemoveEmptyEntries) '(New [Char]() {"-"}) Dim CR_Name_4 As String() = CR_Name_1(0).Split(New String() {"class=" + Chr(34) + "text-link" + Chr(34) + ">"}, System.StringSplitOptions.RemoveEmptyEntries) '(New [Char]() {"-"})
Dim CR_Name_Anime0 As String() = CR_Name_4(CR_Name_4.Length - 1).Split(New String() {"</a>"}, System.StringSplitOptions.RemoveEmptyEntries) Dim CR_Name_Anime0 As String() = CR_Name_4(CR_Name_4.Length - 1).Split(New String() {"</a>"}, System.StringSplitOptions.RemoveEmptyEntries)
CR_Name_Anime0(0) = System.Text.RegularExpressions.Regex.Replace(CR_Name_Anime0(0), "[^\w\\-]", " ") CR_Name_Anime0(0) = String.Join(" ", CR_Name_Anime0(0).Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c) 'System.Text.RegularExpressions.Regex.Replace(CR_Name_Anime0(0), "[^\w\\-]", " ")
CR_Anime_Titel = CR_Name_Anime0(0).Trim CR_Anime_Titel = CR_Name_Anime0(0).Trim
CR_FilenName_Backup = RemoveExtraSpaces(CR_FilenName) CR_FilenName_Backup = RemoveExtraSpaces(CR_FilenName)
@ -1376,7 +1386,7 @@ Public Class Main
If CBool(InStr(WebbrowserText, My.Resources.CR_MediaName)) = True Then ' And CBool(InStr(WebbrowserText, "&rdquo;</h4>")) If CBool(InStr(WebbrowserText, My.Resources.CR_MediaName)) = True Then ' And CBool(InStr(WebbrowserText, "&rdquo;</h4>"))
Dim CR_Name_1 As String() = WebbrowserText.Split(New String() {My.Resources.CR_MediaName}, System.StringSplitOptions.RemoveEmptyEntries) Dim CR_Name_1 As String() = WebbrowserText.Split(New String() {My.Resources.CR_MediaName}, System.StringSplitOptions.RemoveEmptyEntries)
Dim CR_Name_2 As String() = CR_Name_1(1).Split(New String() {My.Resources.CR_MediaName2}, System.StringSplitOptions.RemoveEmptyEntries) '(New [Char]() {"-"}) Dim CR_Name_2 As String() = CR_Name_1(1).Split(New String() {My.Resources.CR_MediaName2}, System.StringSplitOptions.RemoveEmptyEntries) '(New [Char]() {"-"})
CR_Anime_Name = System.Text.RegularExpressions.Regex.Replace(CR_Name_2(0), "[^\w\\-]", " ") CR_Anime_Name = String.Join(" ", CR_Name_2(0).Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c) 'System.Text.RegularExpressions.Regex.Replace(CR_Name_2(0), "[^\w\\-]", " ")
CR_Anime_Name = RemoveExtraSpaces(CR_Anime_Name) CR_Anime_Name = RemoveExtraSpaces(CR_Anime_Name)
End If End If
@ -1408,13 +1418,16 @@ Public Class Main
If TextBox2_Text = Nothing Or TextBox2_Text = "Name of the Anime" Then If TextBox2_Text = Nothing Or TextBox2_Text = "Name of the Anime" Then
Else Else
CR_FilenName = RemoveExtraSpaces(System.Text.RegularExpressions.Regex.Replace(TextBox2_Text, "[^\w\\-]", " ")) CR_FilenName = RemoveExtraSpaces(String.Join(" ", TextBox2_Text.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c)) 'System.Text.RegularExpressions.Regex.Replace(TextBox2_Text, "[^\w\\-]", " "))
CR_FilenName_Backup = CR_FilenName CR_FilenName_Backup = CR_FilenName
End If End If
CR_FilenName = System.Text.RegularExpressions.Regex.Replace(CR_FilenName, "[^\w\\-]", " ") CR_FilenName = String.Join(" ", CR_FilenName.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c) 'System.Text.RegularExpressions.Regex.Replace(CR_FilenName, "[^\w\\-]", " ")
CR_FilenName = RemoveExtraSpaces(CR_FilenName) CR_FilenName = RemoveExtraSpaces(CR_FilenName)
My.Computer.FileSystem.WriteAllText("log.log", WebbrowserText, False)
Pfad2 = UseSubfolder(CR_Anime_Titel, CR_Anime_Staffel, Pfad) Pfad2 = UseSubfolder(CR_Anime_Titel, CR_Anime_Staffel, Pfad)
If Not Directory.Exists(Path.GetDirectoryName(Pfad2)) Then If Not Directory.Exists(Path.GetDirectoryName(Pfad2)) Then
@ -1560,9 +1573,9 @@ Public Class Main
End If End If
SoftSubMergeMaps = SoftSubMergeMaps + " -map " + (i + 1).ToString SoftSubMergeMaps = SoftSubMergeMaps + " -map " + (i + 1).ToString
If SoftSubMergeMetatata = Nothing Then If SoftSubMergeMetatata = Nothing Then
SoftSubMergeMetatata = " -metadata:s:s:" + i.ToString + " language=" + CCtoMP4CC(SoftSubs2(i)) SoftSubMergeMetatata = " -metadata:s:s:" + i.ToString + " language=" + CCtoMP4CC(SoftSubs2(i)) + " -metadata:s:s:" + i.ToString + " title=" + Chr(34) + HardSubValuesToDisplay(Chr(34) + SoftSubs2(i) + Chr(34)) + Chr(34) + " -metadata:s:s:" + i.ToString + " handler_name=" + Chr(34) + HardSubValuesToDisplay(Chr(34) + SoftSubs2(i) + Chr(34)) + Chr(34)
Else Else
SoftSubMergeMetatata = SoftSubMergeMetatata + " -metadata:s:s:" + i.ToString + " language=" + CCtoMP4CC(SoftSubs2(i)) SoftSubMergeMetatata = SoftSubMergeMetatata + " -metadata:s:s:" + i.ToString + " language=" + CCtoMP4CC(SoftSubs2(i)) + " -metadata:s:s:" + i.ToString + " title=" + Chr(34) + HardSubValuesToDisplay(Chr(34) + SoftSubs2(i) + Chr(34)) + Chr(34) + " -metadata:s:s:" + i.ToString + " handler_name=" + Chr(34) + HardSubValuesToDisplay(Chr(34) + SoftSubs2(i) + Chr(34)) + Chr(34)
End If End If
Next Next
@ -1591,6 +1604,7 @@ Public Class Main
Next Next
End If End If
'SoftSubMergeMetatata = SoftSubMergeMetatata + " -disposition:s:0 default"
End If End If
#End Region #End Region
@ -1727,7 +1741,7 @@ Public Class Main
ResoHTMLDisplay = ResoHTML(0) + "p" ResoHTMLDisplay = ResoHTML(0) + "p"
End If End If
End If End If
Dim L2Name As String = System.Text.RegularExpressions.Regex.Replace(CR_FilenName_Backup, "[^\w\\-]", " ") Dim L2Name As String = String.Join(" ", CR_FilenName_Backup.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c) 'System.Text.RegularExpressions.Regex.Replace(CR_FilenName_Backup, "[^\w\\-]", " ")
If CR_FilenName = Nothing Then If CR_FilenName = Nothing Then
Else Else
L2Name = CR_FilenName L2Name = CR_FilenName
@ -1777,36 +1791,38 @@ Public Class Main
ElseIf CBool(InStr(ex.ToString, Chr(34) + "UserAbort" + Chr(34))) Then ElseIf CBool(InStr(ex.ToString, Chr(34) + "UserAbort" + Chr(34))) Then
MsgBox(ex.ToString, MsgBoxStyle.Information) MsgBox(ex.ToString, MsgBoxStyle.Information)
Else Else
If MessageBox.Show(Error_unknown, "Error!", MessageBoxButtons.YesNo) = DialogResult.Yes Then MsgBox(ex.ToString, MsgBoxStyle.Information)
Dim CCC As String() = WebbrowserText.Split(New String() {My.Resources.CC_String}, System.StringSplitOptions.RemoveEmptyEntries)
Dim CCC1 As String() = CCC(1).Split(New String() {".gif" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim SaveString As String = "Operating System: " + My.Computer.Info.OSFullName + vbNewLine + vbNewLine + "Crunchyroll URL: " + WebbrowserURL + vbNewLine + vbNewLine + "subtitle language: " + SubSprache + vbNewLine + vbNewLine + "video resolution: " + Reso.ToString + vbNewLine + vbNewLine + "error message: " + ex.ToString + vbNewLine + ex.StackTrace.ToString + vbNewLine + vbNewLine + "softsubs enabled?: " + SoftSubs.ToString + vbNewLine + vbNewLine + "Crunchyroll Downloader Version: " + Application.ProductVersion + vbNewLine + vbNewLine + "detected location from Crunchyroll: " + CCC1(0) 'If MessageBox.Show(Error_unknown, "Error!", MessageBoxButtons.YesNo) = DialogResult.Yes Then
' Dim CCC As String() = WebbrowserText.Split(New String() {My.Resources.CC_String}, System.StringSplitOptions.RemoveEmptyEntries)
' Dim CCC1 As String() = CCC(1).Split(New String() {".gif" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
File.WriteAllText("Error " + DateTime.Now.ToString("dd.MM.yyyy HH.mm") + ".txt", SaveString) ' Dim SaveString As String = "Operating System: " + My.Computer.Info.OSFullName + vbNewLine + vbNewLine + "Crunchyroll URL: " + WebbrowserURL + vbNewLine + vbNewLine + "subtitle language: " + SubSprache + vbNewLine + vbNewLine + "video resolution: " + Reso.ToString + vbNewLine + vbNewLine + "error message: " + ex.ToString + vbNewLine + ex.StackTrace.ToString + vbNewLine + vbNewLine + "softsubs enabled?: " + SoftSubs.ToString + vbNewLine + vbNewLine + "Crunchyroll Downloader Version: " + Application.ProductVersion + vbNewLine + vbNewLine + "detected location from Crunchyroll: " + CCC1(0)
Dim Request As HttpWebRequest = CType(WebRequest.Create("https://docs.google.com/forms/d/e/1FAIpQLSdR1QI19Lh-c-XO_iXNkDwsTUZhCMEu84boQkgW5AOBUxyiyA/formResponse"), HttpWebRequest)
Request.Method = "POST" ' File.WriteAllText("Error " + DateTime.Now.ToString("dd.MM.yyyy HH.mm") + ".txt", SaveString)
Request.ContentType = "application/x-www-form-urlencoded" ' Dim Request As HttpWebRequest = CType(WebRequest.Create("https://docs.google.com/forms/d/e/1FAIpQLSdR1QI19Lh-c-XO_iXNkDwsTUZhCMEu84boQkgW5AOBUxyiyA/formResponse"), HttpWebRequest)
Dim Post As String = "entry.240217066=" + My.Computer.Info.OSFullName + "&entry.358200455=" + WebbrowserURL + "&entry.618751432=" + SubSprache + "&entry.924054550=" + Reso.ToString + "&entry.679000538=" + ex.ToString + "&entry.1789515979=" + SoftSubsString + "&entry.683247287=" + Application.ProductVersion + "&entry.377264428=" + CCC1(0) + "&fvv=1&draftResponse=[null,null," + Chr(34) + "-3005021683493723280" + Chr(34) + "] &pageHistory=0&fbzx=-3005021683493723280" ' Request.Method = "POST"
Dim byteArray() As Byte = Encoding.UTF8.GetBytes(Post) ' Request.ContentType = "application/x-www-form-urlencoded"
Request.ContentLength = byteArray.Length ' Dim Post As String = "entry.240217066=" + My.Computer.Info.OSFullName + "&entry.358200455=" + WebbrowserURL + "&entry.618751432=" + SubSprache + "&entry.924054550=" + Reso.ToString + "&entry.679000538=" + ex.ToString + "&entry.1789515979=" + SoftSubsString + "&entry.683247287=" + Application.ProductVersion + "&entry.377264428=" + CCC1(0) + "&fvv=1&draftResponse=[null,null," + Chr(34) + "-3005021683493723280" + Chr(34) + "] &pageHistory=0&fbzx=-3005021683493723280"
Dim DataStream As Stream = Request.GetRequestStream() ' Dim byteArray() As Byte = Encoding.UTF8.GetBytes(Post)
DataStream.Write(byteArray, 0, byteArray.Length) ' Request.ContentLength = byteArray.Length
DataStream.Close() ' Dim DataStream As Stream = Request.GetRequestStream()
Dim Response As HttpWebResponse = Request.GetResponse() ' DataStream.Write(byteArray, 0, byteArray.Length)
DataStream = Response.GetResponseStream() ' DataStream.Close()
Dim reader As New StreamReader(DataStream) ' Dim Response As HttpWebResponse = Request.GetResponse()
Dim ServerResponse As String = reader.ReadToEnd() ' DataStream = Response.GetResponseStream()
reader.Close() ' Dim reader As New StreamReader(DataStream)
DataStream.Close() ' Dim ServerResponse As String = reader.ReadToEnd()
Response.Close() ' reader.Close()
Dim Version_Check As String() = ServerResponse.Split(New String() {"<div class=" + Chr(34) + "freebirdFormviewerViewResponseConfirmationMessage" + Chr(34) + ">"}, System.StringSplitOptions.RemoveEmptyEntries) ' DataStream.Close()
Dim Version_Check2 As String() = Version_Check(1).Split(New String() {"</div>"}, System.StringSplitOptions.RemoveEmptyEntries) ' Response.Close()
'If Application.ProductVersion = Version_Check2(0) Then ' Dim Version_Check As String() = ServerResponse.Split(New String() {"<div class=" + Chr(34) + "freebirdFormviewerViewResponseConfirmationMessage" + Chr(34) + ">"}, System.StringSplitOptions.RemoveEmptyEntries)
'Else ' Dim Version_Check2 As String() = Version_Check(1).Split(New String() {"</div>"}, System.StringSplitOptions.RemoveEmptyEntries)
'MsgBox("A newer version is available: v" + Version_Check2(0)) ' 'If Application.ProductVersion = Version_Check2(0) Then
'End If ' 'Else
End If ' 'MsgBox("A newer version is available: v" + Version_Check2(0))
' 'End If
'End If
End If End If
End Try End Try
@ -2009,7 +2025,7 @@ Public Class Main
Video_Title = RemoveExtraSpaces(Video_Title) Video_Title = RemoveExtraSpaces(Video_Title)
#Region "Name + Pfad" #Region "Name + Pfad"
Dim Video_FilenName As String = Video_Title Dim Video_FilenName As String = Video_Title
Video_FilenName = System.Text.RegularExpressions.Regex.Replace(Video_FilenName, "[^\w\\-]", " ") Video_FilenName = String.Join(" ", Video_FilenName.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c) 'System.Text.RegularExpressions.Regex.Replace(Video_FilenName, "[^\w\\-]", " ")
Video_FilenName = RemoveExtraSpaces(Video_FilenName + ".mp4") Video_FilenName = RemoveExtraSpaces(Video_FilenName + ".mp4")
Pfad_DL = Chr(34) + Pfad + "\" + Video_FilenName + Chr(34) Pfad_DL = Chr(34) + Pfad + "\" + Video_FilenName + Chr(34)
#End Region #End Region
@ -2122,13 +2138,13 @@ Public Class Main
Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick
Try Try
Dim ItemDownloadingCount As Integer = 0 Dim ItemFinshedCount As Integer = 0
For i As Integer = 0 To ListView1.Items.Count - 1 For i As Integer = 0 To ListView1.Items.Count - 1
If ItemList(i).GetIsStatusFinished() = False Then If ItemList(i).GetIsStatusFinished() = True Then
ItemDownloadingCount = ItemDownloadingCount + 1 ItemFinshedCount = ItemFinshedCount + 1
End If End If
Next Next
RunningDownloads = ItemDownloadingCount RunningDownloads = ListView1.Items.Count - ItemFinshedCount
Catch ex As Exception Catch ex As Exception
@ -2164,7 +2180,7 @@ Public Class Main
Dim FunimationTitle1() As String = WebbrowserText.Split(New String() {".showName = '"}, System.StringSplitOptions.RemoveEmptyEntries) Dim FunimationTitle1() As String = WebbrowserText.Split(New String() {".showName = '"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim FunimationTitle2() As String = FunimationTitle1(1).Split(New String() {"';"}, System.StringSplitOptions.RemoveEmptyEntries) Dim FunimationTitle2() As String = FunimationTitle1(1).Split(New String() {"';"}, System.StringSplitOptions.RemoveEmptyEntries)
FunimationTitle = System.Text.RegularExpressions.Regex.Replace(FunimationTitle2(0), "[^\w\\-]", " ").Trim(" ") FunimationTitle = String.Join(" ", FunimationTitle2(0).Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c) 'System.Text.RegularExpressions.Regex.Replace(FunimationTitle2(0), "[^\w\\-]", " ").Trim(" ")
FunimationTitle = RemoveExtraSpaces(FunimationTitle) FunimationTitle = RemoveExtraSpaces(FunimationTitle)
Dim FunimationDub1() As String = WebbrowserText.Split(New String() {".showLanguage = '"}, System.StringSplitOptions.RemoveEmptyEntries) Dim FunimationDub1() As String = WebbrowserText.Split(New String() {".showLanguage = '"}, System.StringSplitOptions.RemoveEmptyEntries)
@ -2173,7 +2189,8 @@ Public Class Main
Dim FunimationEpisodeTitle1() As String = WebbrowserText.Split(New String() {".videoTitle = '"}, System.StringSplitOptions.RemoveEmptyEntries) Dim FunimationEpisodeTitle1() As String = WebbrowserText.Split(New String() {".videoTitle = '"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim FunimationEpisodeTitle2() As String = FunimationEpisodeTitle1(1).Split(New String() {"';"}, System.StringSplitOptions.RemoveEmptyEntries) Dim FunimationEpisodeTitle2() As String = FunimationEpisodeTitle1(1).Split(New String() {"';"}, System.StringSplitOptions.RemoveEmptyEntries)
FunimationEpisodeTitle = System.Text.RegularExpressions.Regex.Replace(FunimationEpisodeTitle2(0), "[^\w\\-]", " ").Trim(" ") FunimationEpisodeTitle2(0) = HtmlDecode(FunimationEpisodeTitle2(0))
FunimationEpisodeTitle = String.Join(" ", FunimationEpisodeTitle2(0).Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c) 'System.Text.RegularExpressions.Regex.Replace(FunimationEpisodeTitle2(0), "[^\w\\-]", " ").Trim(" ")
FunimationEpisodeTitle = RemoveExtraSpaces(FunimationEpisodeTitle) FunimationEpisodeTitle = RemoveExtraSpaces(FunimationEpisodeTitle)
Dim DefaultName As String = RemoveExtraSpaces(FunimationTitle + " " + FunimationSeason + " " + FunimationEpisode) Dim DefaultName As String = RemoveExtraSpaces(FunimationTitle + " " + FunimationSeason + " " + FunimationEpisode)
@ -2536,16 +2553,30 @@ Public Class Main
End If End If
'MsgBox(HardSubSplittString) 'MsgBox(HardSubSplittString)
Dim HardSubTitle() As String = PlayerPage.Split(New String() {HardSubSplittString}, System.StringSplitOptions.RemoveEmptyEntries) Dim HardSubTitle() As String = PlayerPage.Split(New String() {HardSubSplittString}, System.StringSplitOptions.RemoveEmptyEntries)
Dim HardSubTitle2() As String = HardSubTitle(0).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
UsedSub = HardSubTitle2(HardSubTitle2.Count - 1) For i As Integer = 0 To HardSubTitle.Count - 1
Dim HardSubTitle2() As String = HardSubTitle(i).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
If InStr(HardSubTitle2(HardSubTitle2.Count - 1), ".srt") Then
UsedSub = HardSubTitle2(HardSubTitle2.Count - 1)
Exit For
ElseIf InStr(HardSubTitle2(HardSubTitle2.Count - 1), ".vtt") Then
UsedSub = HardSubTitle2(HardSubTitle2.Count - 1)
Exit For
End If
Next
If UsedSub = Nothing Then
Throw New System.Exception("Error - No valid Subtitle for hard-subtiles found")
End If
'MsgBox(UsedSub) 'MsgBox(UsedSub)
Dim SubText As String = client0.DownloadString(UsedSub) Dim SubText As String = client0.DownloadString(UsedSub)
Dim SubtitelFormat As String = ".srt" Dim SubtitelFormat As String = ".srt"
If InStr(UsedSub, ".vtt") Then If InStr(UsedSub, ".vtt") Then
SubtitelFormat = ".vtt" SubtitelFormat = ".vtt"
ElseIf InStr(UsedSub, ".dfxp") Then 'ElseIf InStr(UsedSub, ".dfxp") Then
SubtitelFormat = ".dfxp" ' SubtitelFormat = ".dfxp"
End If End If
UsedSub = einstellungen.GeräteID() + SubtitelFormat UsedSub = einstellungen.GeräteID() + SubtitelFormat
File.WriteAllText(Application.StartupPath + "\" + UsedSub, SubText, Encoding.UTF8) File.WriteAllText(Application.StartupPath + "\" + UsedSub, SubText, Encoding.UTF8)
@ -2625,9 +2656,13 @@ Public Class Main
End If End If
SoftSubMergeMaps = SoftSubMergeMaps + " -map " + (i + 1).ToString SoftSubMergeMaps = SoftSubMergeMaps + " -map " + (i + 1).ToString
If SoftSubMergeMetatata = Nothing Then If SoftSubMergeMetatata = Nothing Then
SoftSubMergeMetatata = " -metadata:s:s:" + i.ToString + " language=" + CCtoMP4CC(SoftSub(1)) 'SoftSubMergeMetatata = " -metadata:s:s:" + i.ToString + " language=" + CCtoMP4CC(SoftSub(1))
SoftSubMergeMetatata = " -metadata:s:s:" + i.ToString + " language=" + CCtoMP4CC(SoftSub(1)) + " -metadata:s:s:" + i.ToString + " title=" + Chr(34) + HardSubValuesToDisplay(Chr(34) + SoftSub(1) + Chr(34)) + Chr(34) + " -metadata:s:s:" + i.ToString + " handler_name=" + Chr(34) + HardSubValuesToDisplay(Chr(34) + SoftSub(1) + Chr(34)) + Chr(34)
Else Else
SoftSubMergeMetatata = SoftSubMergeMetatata + " -metadata:s:s:" + i.ToString + " language=" + CCtoMP4CC(SoftSubs2(i)) SoftSubMergeMetatata = SoftSubMergeMetatata + " -metadata:s:s:" + i.ToString + " language=" + CCtoMP4CC(SoftSub(1)) + " -metadata:s:s:" + i.ToString + " title=" + Chr(34) + HardSubValuesToDisplay(Chr(34) + SoftSub(1) + Chr(34)) + Chr(34) + " -metadata:s:s:" + i.ToString + " handler_name=" + Chr(34) + HardSubValuesToDisplay(Chr(34) + SoftSub(1) + Chr(34)) + Chr(34)
'SoftSubMergeMetatata + " -metadata:s:s:" + i.ToString + " language=" + CCtoMP4CC(SoftSubs2(i))
End If End If
Next Next
@ -2723,6 +2758,7 @@ Public Class Main
End Sub End Sub
Private Sub Timer3_Tick(sender As Object, e As EventArgs) Handles Timer3.Tick Private Sub Timer3_Tick(sender As Object, e As EventArgs) Handles Timer3.Tick
Me.Invalidate() Me.Invalidate()
Try Try
Dim GeckoHTML As String = My.Resources.htmlTop + vbNewLine + My.Resources.htmlTitlel.Replace("Placeholder", Me.Text.Replace("open the add window to continue", "")) Dim GeckoHTML As String = My.Resources.htmlTop + vbNewLine + My.Resources.htmlTitlel.Replace("Placeholder", Me.Text.Replace("open the add window to continue", ""))

View File

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

View File

@ -124,6 +124,7 @@ Partial Class Einstellungen
Me.AoD_576p = New MetroFramework.Controls.MetroRadioButton() Me.AoD_576p = New MetroFramework.Controls.MetroRadioButton()
Me.AoD_1080_Plus = New MetroFramework.Controls.MetroRadioButton() Me.AoD_1080_Plus = New MetroFramework.Controls.MetroRadioButton()
Me.TabPage7 = New System.Windows.Forms.TabPage() Me.TabPage7 = New System.Windows.Forms.TabPage()
Me.LastVersion = New MetroFramework.Controls.MetroLabel()
Me.Label8 = New MetroFramework.Controls.MetroLabel() Me.Label8 = New MetroFramework.Controls.MetroLabel()
Me.Label9 = New MetroFramework.Controls.MetroLabel() Me.Label9 = New MetroFramework.Controls.MetroLabel()
Me.Label7 = New MetroFramework.Controls.MetroLabel() Me.Label7 = New MetroFramework.Controls.MetroLabel()
@ -603,10 +604,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(493, 452) Me.TabPage2.Size = New System.Drawing.Size(493, 461)
Me.TabPage2.TabIndex = 1 Me.TabPage2.TabIndex = 1
Me.TabPage2.Text = "Output" Me.TabPage2.Text = "Output"
Me.TabPage2.VerticalScrollbarBarColor = True Me.TabPage2.VerticalScrollbarBarColor = True
@ -934,10 +935,10 @@ Partial Class Einstellungen
Me.TabPage1.HorizontalScrollbarBarColor = True Me.TabPage1.HorizontalScrollbarBarColor = True
Me.TabPage1.HorizontalScrollbarHighlightOnWheel = False Me.TabPage1.HorizontalScrollbarHighlightOnWheel = False
Me.TabPage1.HorizontalScrollbarSize = 10 Me.TabPage1.HorizontalScrollbarSize = 10
Me.TabPage1.Location = New System.Drawing.Point(4, 35) Me.TabPage1.Location = New System.Drawing.Point(4, 44)
Me.TabPage1.Name = "TabPage1" Me.TabPage1.Name = "TabPage1"
Me.TabPage1.Padding = New System.Windows.Forms.Padding(3) Me.TabPage1.Padding = New System.Windows.Forms.Padding(3)
Me.TabPage1.Size = New System.Drawing.Size(493, 461) Me.TabPage1.Size = New System.Drawing.Size(493, 452)
Me.TabPage1.TabIndex = 0 Me.TabPage1.TabIndex = 0
Me.TabPage1.Text = " Main" Me.TabPage1.Text = " Main"
Me.TabPage1.VerticalScrollbar = True Me.TabPage1.VerticalScrollbar = True
@ -1150,7 +1151,7 @@ Partial Class Einstellungen
Me.TabControl1.FontWeight = MetroFramework.MetroTabControlWeight.Regular Me.TabControl1.FontWeight = MetroFramework.MetroTabControlWeight.Regular
Me.TabControl1.Location = New System.Drawing.Point(22, 60) Me.TabControl1.Location = New System.Drawing.Point(22, 60)
Me.TabControl1.Name = "TabControl1" Me.TabControl1.Name = "TabControl1"
Me.TabControl1.SelectedIndex = 1 Me.TabControl1.SelectedIndex = 5
Me.TabControl1.Size = New System.Drawing.Size(501, 500) Me.TabControl1.Size = New System.Drawing.Size(501, 500)
Me.TabControl1.TabIndex = 38 Me.TabControl1.TabIndex = 38
Me.TabControl1.UseSelectable = True Me.TabControl1.UseSelectable = True
@ -1399,6 +1400,7 @@ Partial Class Einstellungen
'TabPage7 'TabPage7
' '
Me.TabPage7.BackColor = System.Drawing.Color.Transparent Me.TabPage7.BackColor = System.Drawing.Color.Transparent
Me.TabPage7.Controls.Add(Me.LastVersion)
Me.TabPage7.Controls.Add(Me.Label8) Me.TabPage7.Controls.Add(Me.Label8)
Me.TabPage7.Controls.Add(Me.Label9) Me.TabPage7.Controls.Add(Me.Label9)
Me.TabPage7.Controls.Add(Me.Label7) Me.TabPage7.Controls.Add(Me.Label7)
@ -1407,12 +1409,24 @@ Partial Class Einstellungen
Me.TabPage7.Controls.Add(Me.Label4) Me.TabPage7.Controls.Add(Me.Label4)
Me.TabPage7.Controls.Add(Me.Label6) Me.TabPage7.Controls.Add(Me.Label6)
Me.TabPage7.Controls.Add(Me.Label5) Me.TabPage7.Controls.Add(Me.Label5)
Me.TabPage7.Location = New System.Drawing.Point(4, 35) Me.TabPage7.Location = New System.Drawing.Point(4, 44)
Me.TabPage7.Name = "TabPage7" Me.TabPage7.Name = "TabPage7"
Me.TabPage7.Size = New System.Drawing.Size(493, 461) Me.TabPage7.Size = New System.Drawing.Size(493, 452)
Me.TabPage7.TabIndex = 5 Me.TabPage7.TabIndex = 5
Me.TabPage7.Text = "About " Me.TabPage7.Text = "About "
' '
'LastVersion
'
Me.LastVersion.BackColor = System.Drawing.Color.Transparent
Me.LastVersion.FontSize = MetroFramework.MetroLabelSize.Tall
Me.LastVersion.ForeColor = System.Drawing.Color.Black
Me.LastVersion.Location = New System.Drawing.Point(1, 205)
Me.LastVersion.Name = "LastVersion"
Me.LastVersion.Size = New System.Drawing.Size(491, 45)
Me.LastVersion.TabIndex = 48
Me.LastVersion.Text = "last release v3.7.2"
Me.LastVersion.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'Label8 'Label8
' '
Me.Label8.BackColor = System.Drawing.Color.Transparent Me.Label8.BackColor = System.Drawing.Color.Transparent
@ -1468,7 +1482,7 @@ Partial Class Einstellungen
' '
Me.PictureBox7.BackgroundImage = Global.Crunchyroll_Downloader.My.Resources.Resources.about_icon Me.PictureBox7.BackgroundImage = Global.Crunchyroll_Downloader.My.Resources.Resources.about_icon
Me.PictureBox7.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center Me.PictureBox7.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
Me.PictureBox7.Location = New System.Drawing.Point(0, 25) Me.PictureBox7.Location = New System.Drawing.Point(0, 50)
Me.PictureBox7.Name = "PictureBox7" Me.PictureBox7.Name = "PictureBox7"
Me.PictureBox7.Size = New System.Drawing.Size(493, 137) Me.PictureBox7.Size = New System.Drawing.Size(493, 137)
Me.PictureBox7.TabIndex = 43 Me.PictureBox7.TabIndex = 43
@ -1479,7 +1493,7 @@ Partial Class Einstellungen
Me.Label4.BackColor = System.Drawing.Color.Transparent Me.Label4.BackColor = System.Drawing.Color.Transparent
Me.Label4.FontSize = MetroFramework.MetroLabelSize.Tall Me.Label4.FontSize = MetroFramework.MetroLabelSize.Tall
Me.Label4.ForeColor = System.Drawing.Color.Black Me.Label4.ForeColor = System.Drawing.Color.Black
Me.Label4.Location = New System.Drawing.Point(1, 190) Me.Label4.Location = New System.Drawing.Point(1, -5)
Me.Label4.Name = "Label4" Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(491, 45) Me.Label4.Size = New System.Drawing.Size(491, 45)
Me.Label4.TabIndex = 40 Me.Label4.TabIndex = 40
@ -1491,7 +1505,7 @@ Partial Class Einstellungen
Me.Label6.BackColor = System.Drawing.Color.Transparent Me.Label6.BackColor = System.Drawing.Color.Transparent
Me.Label6.FontSize = MetroFramework.MetroLabelSize.Tall Me.Label6.FontSize = MetroFramework.MetroLabelSize.Tall
Me.Label6.ForeColor = System.Drawing.Color.Black Me.Label6.ForeColor = System.Drawing.Color.Black
Me.Label6.Location = New System.Drawing.Point(1, 240) Me.Label6.Location = New System.Drawing.Point(1, 255)
Me.Label6.Name = "Label6" Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(491, 45) Me.Label6.Size = New System.Drawing.Size(491, 45)
Me.Label6.TabIndex = 37 Me.Label6.TabIndex = 37
@ -1503,7 +1517,7 @@ Partial Class Einstellungen
Me.Label5.BackColor = System.Drawing.Color.Transparent Me.Label5.BackColor = System.Drawing.Color.Transparent
Me.Label5.FontSize = MetroFramework.MetroLabelSize.Tall Me.Label5.FontSize = MetroFramework.MetroLabelSize.Tall
Me.Label5.ForeColor = System.Drawing.Color.Black Me.Label5.ForeColor = System.Drawing.Color.Black
Me.Label5.Location = New System.Drawing.Point(1, 290) Me.Label5.Location = New System.Drawing.Point(1, 305)
Me.Label5.Name = "Label5" Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(491, 45) Me.Label5.Size = New System.Drawing.Size(491, 45)
Me.Label5.TabIndex = 38 Me.Label5.TabIndex = 38
@ -1691,4 +1705,5 @@ Partial Class Einstellungen
Friend WithEvents CB_Fun_HardSubs As MetroFramework.Controls.MetroComboBox Friend WithEvents CB_Fun_HardSubs As MetroFramework.Controls.MetroComboBox
Friend WithEvents Fun_Dub_Over As MetroFramework.Controls.MetroComboBox Friend WithEvents Fun_Dub_Over As MetroFramework.Controls.MetroComboBox
Friend WithEvents CR_Filename As MetroFramework.Controls.MetroComboBox Friend WithEvents CR_Filename As MetroFramework.Controls.MetroComboBox
Public WithEvents LastVersion As MetroFramework.Controls.MetroLabel
End Class End Class

View File

@ -126,6 +126,9 @@
<metadata name="MenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="MenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>118, 20</value> <value>118, 20</value>
</metadata> </metadata>
<metadata name="MenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>118, 20</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>60</value> <value>60</value>
</metadata> </metadata>

View File

@ -14,7 +14,55 @@ Public Class Einstellungen
Dim Manager As MetroStyleManager = Main.Manager Dim Manager As MetroStyleManager = Main.Manager
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 = "Version " + Application.ProductVersion.ToString
Label6.Text = "You have: v" + Application.ProductVersion.ToString
Try
Dim client0 As New WebClient
client0.Encoding = Encoding.UTF8
client0.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), ""))
Dim str0 As String = client0.DownloadString("https://api.github.com/repos/hama3254/Crunchyroll-Downloader-v3.0/releases")
Dim GitHubLastIsPre() As String = str0.Split(New String() {Chr(34) + "prerelease" + Chr(34) + ": "}, System.StringSplitOptions.RemoveEmptyEntries)
Dim LastNonPreRelase As Integer = 0
For i As Integer = 1 To GitHubLastIsPre.Count - 1
Dim GitHubLastIsPre1() As String = GitHubLastIsPre(i).Split(New String() {","}, System.StringSplitOptions.RemoveEmptyEntries)
If GitHubLastIsPre1(0) = "false" Then
LastNonPreRelase = i
Exit For
End If
Next
Dim GitHubLastTag() As String = str0.Split(New String() {Chr(34) + "tag_name" + Chr(34) + ": " + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim GitHubLastTag1() As String = GitHubLastTag(LastNonPreRelase).Split(New String() {Chr(34) + ","}, System.StringSplitOptions.RemoveEmptyEntries)
LastVersion.Text = "last release: " + GitHubLastTag1(0)
'Dim v1 As String = Application.ProductVersion
'Dim v2 As String = GitHubLastTag1(0)
'Dim version1 = New Version(v1)
'Dim version2 = New Version(v2)
'Dim result = version1.CompareTo(version2)
'If result > 0 Then
' Console.WriteLine("version1 is greater")
'ElseIf result < 0 Then
' 'Console.WriteLine("version2 is greater")
'Else
' 'Console.WriteLine("versions are equal")
'End If
Catch ex As Exception
Debug.WriteLine(ex.ToString)
End Try
'CR_Anime_Folge = CR_Name_Staffel0_Folge1(1)
'If GitHubLastTag1(0)
Manager.Owner = Me Manager.Owner = Me
Me.StyleManager = Manager Me.StyleManager = Manager
@ -850,6 +898,13 @@ Public Class Einstellungen
End Sub End Sub
Private Sub Server_Click(sender As Object, e As EventArgs) Handles Server.Click
If Server.Checked = True Then
MsgBox("This feature requires a restart of the downloader", MsgBoxStyle.Information)
End If
End Sub

View File

@ -209,7 +209,7 @@ Public Class network_scan
pictureBox4.Image = My.Resources.main_button_download_deactivate pictureBox4.Image = My.Resources.main_button_download_deactivate
Dim FileName As String = Main.WebbrowserTitle.Replace(" - Watch on VRV", "").Replace("Free Streaming", "").Replace("Tubi", "") Dim FileName As String = Main.WebbrowserTitle.Replace(" - Watch on VRV", "").Replace("Free Streaming", "").Replace("Tubi", "")
FileName = Main.RemoveExtraSpaces(System.Text.RegularExpressions.Regex.Replace(FileName, "[^\w\\-]", " ")) FileName = Main.RemoveExtraSpaces(String.Join(" ", FileName.Split(Main.invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c)) 'System.Text.RegularExpressions.Regex.Replace(FileName, "[^\w\\-]", " "))
Dim FilePfad As String = Main.Pfad + "\" + FileName Dim FilePfad As String = Main.Pfad + "\" + FileName
Dim client0 As New WebClient Dim client0 As New WebClient