fixes and error dialog added for crunchyroll beta website

fix coustum name issue
fix base url in mass download
fix singele episode selection in mass download
fix ConvertCC function values
added error handling for unavailable hardsubs
This commit is contained in:
hama3254 2021-05-23 22:27:56 +02:00
parent 1b00b91dca
commit a30ef1814f
17 changed files with 1156 additions and 152 deletions

Binary file not shown.

View File

@ -186,7 +186,15 @@ Public Class Anime_Add
If CBool(InStr(textBox1.Text, "crunchyroll.com")) Or CBool(InStr(textBox1.Text, "funimation.com")) Then 'Or CBool(InStr(textBox1.Text, "anime-on-demand.de")) Then If CBool(InStr(textBox1.Text, "crunchyroll.com")) Or CBool(InStr(textBox1.Text, "funimation.com")) Then 'Or CBool(InStr(textBox1.Text, "anime-on-demand.de")) Then
#Region "Funimation url parameter" #Region "Funimation url parameter"
If InStr(textBox1.Text, "funimation.com") Then If CBool(InStr(textBox1.Text, "funimation.com")) Then
Main.WebbrowserURL = textBox1.Text
If CBool(InStr(Main.FunimationAPIRegion, "?region=")) And CBool(InStr(textBox1.Text, "/shows/")) Then
ProcessFunimationJS(textBox1.Text)
Exit Sub
End If
If Main.DubFunimation = "Disabled" Then If Main.DubFunimation = "Disabled" Then
Else Else
If InStr(textBox1.Text, "?lang=") Then If InStr(textBox1.Text, "?lang=") Then
@ -289,7 +297,7 @@ Public Class Anime_Add
'MsgBox(Main.URL_Invaild, MsgBoxStyle.OkOnly) 'MsgBox(Main.URL_Invaild, MsgBoxStyle.OkOnly)
End If End If
Catch ex As Exception Catch ex As Exception
'MsgBox(ex.ToString) MsgBox(ex.ToString)
Main.b = True Main.b = True
MsgBox(Main.URL_Invaild, MsgBoxStyle.OkOnly) MsgBox(Main.URL_Invaild, MsgBoxStyle.OkOnly)
End Try End Try
@ -304,6 +312,19 @@ Public Class Anime_Add
Main.b = True Main.b = True
groupBox1.Visible = True groupBox1.Visible = True
pictureBox4.Image = My.Resources.main_button_download_default pictureBox4.Image = My.Resources.main_button_download_default
ElseIf CBool(InStr(Main.WebbrowserURL, "funimation.com")) = True Then
StatusLabel.Text = "Status: idle"
pictureBox4.Image = My.Resources.add_mass_running_cancel
Mass_DL_Cancel = True
PictureBox1.Enabled = False
PictureBox1.Visible = False
Main.DownloadFunimationJS_Seasons()
comboBox4.Enabled = False
comboBox3.Enabled = False
ComboBox1.Enabled = False
ElseIf CBool(InStr(Main.WebbrowserURL, "beta.crunchyroll.com")) = True Then ElseIf CBool(InStr(Main.WebbrowserURL, "beta.crunchyroll.com")) = True Then
StatusLabel.Text = "Status: idle" StatusLabel.Text = "Status: idle"
@ -374,6 +395,44 @@ Public Class Anime_Add
pictureBox4.Enabled = True pictureBox4.Enabled = True
End Sub End Sub
Public Sub ProcessFunimationJS(ByVal InputURL As String)
Dim FunUri As String = Nothing
If InStr(InputURL, "?") Then
Dim ClearUri As String() = InputURL.Split(New String() {"?"}, System.StringSplitOptions.RemoveEmptyEntries)
FunUri = ClearUri(0)
Else
FunUri = InputURL
End If
Dim ShowPath As String = Nothing
Dim EpisodePath As String = Nothing
Dim ShowPath1 As String() = FunUri.Split(New String() {"/shows/"}, System.StringSplitOptions.RemoveEmptyEntries)
'If InStr(ShowPath1(1), "/") Then
Dim ShowPath2 As String() = ShowPath1(1).Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
If ShowPath2.Count > 1 Then
ShowPath = ShowPath2(0)
EpisodePath = ShowPath2(1)
Else
ShowPath = ShowPath1(1)
End If
Main.FunimationShowPath = ShowPath
If EpisodePath = Nothing Then 'overview site
Main.GetFunimationJS_Seasons("https://title-api.prd.funimationsvc.com/v2/shows/" + ShowPath + Main.FunimationAPIRegion)
Else 'single episode
End If
Dim FunimationCC As String() = ShowPath1(0).Split(New String() {"funimation.com"}, System.StringSplitOptions.RemoveEmptyEntries)
If FunimationCC.Count > 1 Then
Main.FunimationRegion = FunimationCC(1).Replace("/", "")
End If
End Sub
Public Sub ProcessAoD() Public Sub ProcessAoD()
AoD_DubList.Clear() AoD_DubList.Clear()
@ -531,11 +590,13 @@ Public Class Anime_Add
comboBox4.Items.Clear() comboBox4.Items.Clear()
comboBox3.Enabled = True comboBox3.Enabled = True
comboBox4.Enabled = True comboBox4.Enabled = True
comboBox3.Text = Nothing
comboBox4.Text = Nothing
Dim SeasonSplit() As String = Main.CrBetaMass.Split(New String() {Chr(34) + "id" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) Dim SeasonSplit() As String = Main.CrBetaMass.Split(New String() {Chr(34) + "id" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim SeasonSplit2() As String = SeasonSplit(ComboBox1.SelectedIndex + 1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) Dim SeasonSplit2() As String = SeasonSplit(ComboBox1.SelectedIndex + 1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim EpisodeJsonURL As String = "https://beta-api.crunchyroll.com/cms/v2/DE/M3/crunchyroll/episodes?season_id=" + SeasonSplit2(0) + "&locale=" + Main.CrBetaMassParameters Dim EpisodeJsonURL As String = Main.CrBetaMassBaseURL + "episodes?season_id=" + SeasonSplit2(0) + "&locale=" + Main.CrBetaMassParameters
Dim EpisodeJson As String = Nothing Dim EpisodeJson As String = Nothing
Debug.WriteLine(EpisodeJsonURL) Debug.WriteLine(EpisodeJsonURL)
@ -553,14 +614,70 @@ Public Class Anime_Add
Dim EpisodeNameSplit() As String = EpisodeJson.Split(New String() {Chr(34) + "title" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim EpisodeSplit() As String = EpisodeJson.Split(New String() {Chr(34) + "episode" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) Dim EpisodeSplit() As String = EpisodeJson.Split(New String() {Chr(34) + "episode" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
For i As Integer = 1 To EpisodeSplit.Count - 1
Dim EpisodeSplit2() As String = EpisodeSplit(i).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim EpisodeNameSplit2() As String = EpisodeNameSplit(i).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
If EpisodeSplit(i).Substring(0, 1) = Chr(34) Then
comboBox3.Items.Add(EpisodeNameSplit2(0))
comboBox4.Items.Add(EpisodeNameSplit2(0))
Else
comboBox3.Items.Add("Episode " + EpisodeSplit2(0))
comboBox4.Items.Add("Episode " + EpisodeSplit2(0))
End If
Next
ElseIf main.WebbrowserURL = "funimation.com/js" Then
'MsgBox(Main.FunimtaionAPISeasonID.Item(ComboBox1.SelectedIndex))
comboBox3.Items.Clear()
comboBox4.Items.Clear()
comboBox3.Enabled = True
comboBox4.Enabled = True
comboBox3.Text = Nothing
comboBox4.Text = Nothing
'Dim SeasonSplit() As String = Main.CrBetaMass.Split(New String() {Chr(34) + "id" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
'Dim SeasonSplit2() As String = SeasonSplit(ComboBox1.SelectedIndex + 1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
'
'https://title-api.prd.funimationsvc.com/v1/seasons/1007609?region=US&deviceType=web
Dim EpisodeJsonURL As String = "https://title-api.prd.funimationsvc.com/v1/seasons/" + Main.FunimtaionAPISeasonID.Item(ComboBox1.SelectedIndex) + Main.FunimationAPIRegion
Dim EpisodeJson As String = Nothing
Debug.WriteLine(EpisodeJsonURL)
Try
Using client As New WebClient()
client.Encoding = System.Text.Encoding.UTF8
client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), ""))
EpisodeJson = client.DownloadString(EpisodeJsonURL)
End Using
Catch ex As Exception
Debug.WriteLine("error- getting EpisodeJson data")
Exit Sub
End Try
Main.FunimationEpisodeJSON = EpisodeJson
Dim EpisodeSplit() As String = EpisodeJson.Split(New String() {Chr(34) + "episodeNumber" + Chr(34) + ": " + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
For i As Integer = 1 To EpisodeSplit.Count - 1 For i As Integer = 1 To EpisodeSplit.Count - 1
Dim EpisodeSplit2() As String = EpisodeSplit(i).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) Dim EpisodeSplit2() As String = EpisodeSplit(i).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
comboBox3.Items.Add("Episode " + EpisodeSplit2(0)) comboBox3.Items.Add("Episode " + EpisodeSplit2(0))
comboBox4.Items.Add("Episode " + EpisodeSplit2(0)) comboBox4.Items.Add("Episode " + EpisodeSplit2(0))
Next Next
ElseIf AoD_Mode = False Then ElseIf AoD_Mode = False Then
'MsgBox(Main.WebbrowserURL) 'MsgBox(Main.WebbrowserURL)
@ -1406,4 +1523,6 @@ Public Class Anime_Add
Main.SubsOnly = True Main.SubsOnly = True
End If End If
End Sub End Sub
End Class End Class

View File

@ -27,6 +27,21 @@ Public Class ErrorDialog
ComboBox1.Items.Add(langsplit(0)) ComboBox1.Items.Add(langsplit(0))
Next Next
SurroundingSub() SurroundingSub()
ElseIf Main.DialogTaskString = "Language_CR_Beta" Then
'CheckBox1.Visible = False
StatusLabel.Text = Main.LabelLangNotFoundText
Dim lang_avalibe As String() = Main.ResoNotFoundString.Split(New String() {"hardsub_locale" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
For i As Integer = 1 To lang_avalibe.Count - 1
If lang_avalibe(i).Substring(0, 1) = Chr(34) Then
ComboBox1.Items.Add("No Hardsubs")
Continue For 'Chr(34) +
End If
Dim langsplit As String() = lang_avalibe(i).Split(New String() {Chr(34) + ","}, System.StringSplitOptions.RemoveEmptyEntries)
ComboBox1.Items.Add(Main.HardSubValuesToDisplay(langsplit(0)))
Next
SurroundingSub()
ElseIf Main.DialogTaskString = "Resolution" Then ElseIf Main.DialogTaskString = "Resolution" Then
StatusLabel.Text = Main.LabelResoNotFoundText StatusLabel.Text = Main.LabelResoNotFoundText
Dim Reso_avaible1 As String() = Main.ResoNotFoundString.Split(New String() {"RESOLUTION="}, System.StringSplitOptions.RemoveEmptyEntries) Dim Reso_avaible1 As String() = Main.ResoNotFoundString.Split(New String() {"RESOLUTION="}, System.StringSplitOptions.RemoveEmptyEntries)
@ -125,13 +140,50 @@ Public Class ErrorDialog
Private Sub PictureBox9_Click(sender As Object, e As EventArgs) Handles PictureBox9.Click Private Sub PictureBox9_Click(sender As Object, e As EventArgs) Handles PictureBox9.Click
If ComboBox1.SelectedItem.ToString = Nothing Then If ComboBox1.SelectedItem.ToString = Nothing Then
Else
If Main.DialogTaskString = "Language_CR_Beta" Then
Main.ResoBackString = DisplayToHardSubValues(ComboBox1.SelectedItem.ToString)
Main.UserCloseDialog = False
Me.Close()
Else Else
Main.ResoBackString = ComboBox1.SelectedItem.ToString Main.ResoBackString = ComboBox1.SelectedItem.ToString
Main.UserCloseDialog = False Main.UserCloseDialog = False
Me.Close() Me.Close()
End If End If
End If
End Sub End Sub
Public Function DisplayToHardSubValues(ByVal HardSub As String) As String
Try
If HardSub = "Deutsch" Then
Return "de-DE"
ElseIf HardSub = "English" Then
Return "en-US"
ElseIf HardSub = "Português (Brasil)" Then
Return "pt-BR"
ElseIf HardSub = "Español (LA)" Then
Return "es-LA"
ElseIf HardSub = "Français (France)" Then
Return "fr-FR"
ElseIf HardSub = "العربية (Arabic)" Then
Return "ar-ME"
ElseIf HardSub = "Русский (Russian)" Then
Return "ru-RU"
ElseIf HardSub = "Italiano (Italian)" Then
Return "it-IT"
ElseIf HardSub = "Español (España)" Then
Return "es-ES"
Else
Return Nothing
End If
Catch ex As Exception
Return Nothing
End Try
End Function
Private Sub PictureBox9_MouseEnter(sender As Object, e As EventArgs) Handles PictureBox9.MouseEnter Private Sub PictureBox9_MouseEnter(sender As Object, e As EventArgs) Handles PictureBox9.MouseEnter
PictureBox9.Image = My.Resources.DialogNotFound_Submit_hover PictureBox9.Image = My.Resources.DialogNotFound_Submit_hover
End Sub End Sub

View File

@ -67,7 +67,8 @@ Public Class GeckoFX
End Try End Try
End If End If
ElseIf Main.LoginOnly = "US_UnBlock_Finsihed" And Main.UserBowser = False Then ElseIf Main.LoginOnly = "US_UnBlock_Finsihed" Then
Main.LoginOnly = "ClosedAfterUS_UnBlock"
Main.UserBowser = False Main.UserBowser = False
Me.Close() Me.Close()
Else Else
@ -438,7 +439,13 @@ Public Class GeckoFX
Private Sub ObserveHttpModifyRequest(sender As Object, e As GeckoObserveHttpModifyRequestEventArgs) Handles WebBrowser1.ObserveHttpModifyRequest Private Sub ObserveHttpModifyRequest(sender As Object, e As GeckoObserveHttpModifyRequestEventArgs) Handles WebBrowser1.ObserveHttpModifyRequest
Dim requesturl As String = e.Channel.Uri.ToString() Dim requesturl As String = Nothing
Try
requesturl = e.Channel.Uri.ToString()
Catch ex As Exception
Exit Sub
End Try
Dim url As New Uri(requesturl) Dim url As New Uri(requesturl)
If Main.BlockList.Contains(url.Host) Then If Main.BlockList.Contains(url.Host) Then
@ -469,9 +476,22 @@ Public Class GeckoFX
End If End If
End If End If
'If CBool(InStr(requesturl, "https://beta-api.crunchyroll.com/")) And CBool(InStr(requesturl, "episodes?")) Then
' Debug.WriteLine(requesturl) If CBool(InStr(requesturl, "https://title-api.prd.funimationsvc.com")) And CBool(InStr(requesturl, "?region=")) Then
'End If Dim parms As String() = requesturl.Split(New String() {"?region="}, System.StringSplitOptions.RemoveEmptyEntries)
Main.FunimationAPIRegion = "?region=" + parms(1)
If Main.b = False Then
If CBool(InStr(requesturl, "https://title-api.prd.funimationsvc.com/v1/show")) And CBool(InStr(requesturl, "/episodes/")) Then
Else
MsgBox(Main.WebbrowserURL)
Anime_Add.ProcessFunimationJS(Main.WebbrowserURL)
Main.b = True
End If
End If
End If
If ScanTrue = True Then If ScanTrue = True Then
If InStr(requesturl, ".m3u8") Then If InStr(requesturl, ".m3u8") Then

View File

@ -231,12 +231,6 @@
<data name="&gt;&gt;Btn_Browser.ZOrder" xml:space="preserve"> <data name="&gt;&gt;Btn_Browser.ZOrder" xml:space="preserve">
<value>8</value> <value>8</value>
</data> </data>
<data name="Link.Text" xml:space="preserve">
<value>Link</value>
</data>
<data name="Link.Width" type="System.Int32, mscorlib">
<value>818</value>
</data>
<data name="ListView1.Font" type="System.Drawing.Font, System.Drawing"> <data name="ListView1.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 93pt</value> <value>Microsoft Sans Serif, 93pt</value>
</data> </data>
@ -267,6 +261,12 @@
<data name="&gt;&gt;ListView1.ZOrder" xml:space="preserve"> <data name="&gt;&gt;ListView1.ZOrder" xml:space="preserve">
<value>4</value> <value>4</value>
</data> </data>
<data name="Link.Text" xml:space="preserve">
<value>Link</value>
</data>
<data name="Link.Width" type="System.Int32, mscorlib">
<value>818</value>
</data>
<data name="PictureBox5.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms"> <data name="PictureBox5.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Stretch</value> <value>Stretch</value>
</data> </data>
@ -378,31 +378,6 @@
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing"> <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>842, 630</value> <value>842, 630</value>
</data> </data>
<data name="Btn_min.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
</data>
<data name="Btn_min.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABoAAAAhCAYAAADH97ugAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
xAAADsQBlSsOGwAAAAd0SU1FB+QMDQ03N1b5UIAAAAApSURBVEhL7cyxCQAwDASx339pZ4EUcTC4keDa
CwDMqs/abpOXAGBZcgDKSBvlblfsRgAAAABJRU5ErkJggg==
</value>
</data>
<data name="Btn_min.Location" type="System.Drawing.Point, System.Drawing">
<value>764, 8</value>
</data>
<data name="Btn_min.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="Btn_min.Size" type="System.Drawing.Size, System.Drawing">
<value>25, 25</value>
</data>
<data name="Btn_min.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="Btn_min.TabIndex" type="System.Int32, mscorlib">
<value>71</value>
</data>
<data name="&gt;&gt;Btn_min.Name" xml:space="preserve"> <data name="&gt;&gt;Btn_min.Name" xml:space="preserve">
<value>Btn_min</value> <value>Btn_min</value>
</data> </data>
@ -481,6 +456,43 @@
<data name="&gt;&gt;$this.Type" xml:space="preserve"> <data name="&gt;&gt;$this.Type" xml:space="preserve">
<value>MetroFramework.Forms.MetroForm, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value> <value>MetroFramework.Forms.MetroForm, MetroFramework, Version=1.4.0.0, Culture=neutral, PublicKeyToken=5f91a84759bf584a</value>
</data> </data>
<data name="Btn_min.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
</data>
<data name="Btn_min.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABoAAAAhCAYAAADH97ugAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
xAAADsQBlSsOGwAAAAd0SU1FB+QMDQ03N1b5UIAAAAApSURBVEhL7cyxCQAwDASx339pZ4EUcTC4keDa
CwDMqs/abpOXAGBZcgDKSBvlblfsRgAAAABJRU5ErkJggg==
</value>
</data>
<data name="Btn_min.Location" type="System.Drawing.Point, System.Drawing">
<value>764, 8</value>
</data>
<data name="Btn_min.Margin" type="System.Windows.Forms.Padding, System.Windows.Forms">
<value>0, 0, 0, 0</value>
</data>
<data name="Btn_min.Size" type="System.Drawing.Size, System.Drawing">
<value>25, 25</value>
</data>
<data name="Btn_min.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="Btn_min.TabIndex" type="System.Int32, mscorlib">
<value>71</value>
</data>
<data name="&gt;&gt;Btn_min.Name" xml:space="preserve">
<value>Btn_min</value>
</data>
<data name="&gt;&gt;Btn_min.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;Btn_min.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;Btn_min.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<metadata name="BackgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="BackgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>714, 17</value> <value>714, 17</value>
</metadata> </metadata>

View File

@ -19,15 +19,24 @@ Public Class Main
Public CrBetaMass As String = Nothing Public CrBetaMass As String = Nothing
Public CrBetaMassEpisodes As String = Nothing Public CrBetaMassEpisodes As String = Nothing
Public CrBetaMassParameters As String = Nothing Public CrBetaMassParameters As String = Nothing
Public CrBetaMassBaseURL As String = Nothing
Public BlockList As List(Of String) Public BlockList As List(Of String)
Public FunimationAPIRegion As String = Nothing
Public FunimationRegion As String = Nothing
Public FunimationShowPath As String = Nothing
Public FunimationEpisodeJSON As String = Nothing
Public FunimtaionAPISeasonID As New List(Of String)
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() Public invalids As Char() = System.IO.Path.GetInvalidFileNameChars()
Dim ServerThread As Thread Dim ServerThread As Thread
Public KodiNaming As Boolean = False
Public ErrorTolerance As Integer = 0 Public ErrorTolerance As Integer = 0
Public liList As New List(Of String) Public liList As New List(Of String)
Public HTMLString As String = My.Resources.Startuphtml Public HTMLString As String = My.Resources.Startuphtml
@ -120,7 +129,7 @@ Public Class Main
Dim DL_Path_String As String = "Please choose download directory." Dim DL_Path_String As String = "Please choose download directory."
Public No_Stream As String = "Please make sure that the URL is correct or check if the Anime is available in your country." Public No_Stream As String = "Please make sure that the URL is correct or check if the Anime is available in your country."
Dim TaskNotCompleed As String = "Please wait until the current task is completed." Dim TaskNotCompleed As String = "Please wait until the current task is completed."
Dim Premium_Stream As String = "Please make sure that you logged in for this premium episode." Dim Premium_Stream As String = "For Premium episodes you need a premium membership and be logged in the Downloader."
Public LoginReminder As String = "Please make sure that you logged in." Public LoginReminder As String = "Please make sure that you logged in."
Dim Error_Mass_DL As String = "We run into a problem here." + vbNewLine + "You can try to download every episode individually." Dim Error_Mass_DL As String = "We run into a problem here." + vbNewLine + "You can try to download every episode individually."
@ -427,7 +436,13 @@ 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")
KodiNaming = CBool(Integer.Parse(rkg.GetValue("KodiSupport").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")
ffmpeg_command = rkg.GetValue("ffmpeg_command").ToString ffmpeg_command = rkg.GetValue("ffmpeg_command").ToString
@ -1089,25 +1104,25 @@ Public Class Main
Public Function CCtoMP4CC(ByVal HardSub As String) As String Public Function CCtoMP4CC(ByVal HardSub As String) As String
Try Try
If HardSub = "deDE" Then If HardSub = "deDE" Or HardSub = "de-DE" Then
Return "ger" Return "ger"
ElseIf HardSub = "enUS" Or HardSub = "en" Then ElseIf HardSub = "enUS" Or HardSub = "en-US" Or HardSub = "en" Then
Return "eng" Return "eng"
ElseIf HardSub = "ptBR" Or HardSub = "pt" Then ElseIf HardSub = "ptBR" Or HardSub = "pt-BR" Or HardSub = "pt" Then
Return "por" Return "por"
ElseIf HardSub = "esLA" Or HardSub = "es" Then ElseIf HardSub = "esLA" Or HardSub = "es-LA" Or HardSub = "es" Then
Return "spa" Return "spa"
ElseIf HardSub = "frFR" Then ElseIf HardSub = "frFR" Or HardSub = "fr-FR" Then
Return "fre" Return "fre"
ElseIf HardSub = "arME" Then ElseIf HardSub = "arME" Or HardSub = "ar-ME" Then
Return "ara" Return "ara"
ElseIf HardSub = "ruRU" Then ElseIf HardSub = "ruRU" Or HardSub = "ru-RU" Then
Return "rus" Return "rus"
ElseIf HardSub = "itIT" Then ElseIf HardSub = "itIT" Or HardSub = "it-IT" Then
Return "ita" Return "ita"
ElseIf HardSub = "esES" Then ElseIf HardSub = "esES" Or HardSub = "es-ES" Then
Return "spa" Return "spa"
ElseIf HardSub = "jaJP" Then ElseIf HardSub = "jaJP" Or HardSub = "ja-JP" Then
Return "jpn" Return "jpn"
Else Else
Return "chi" Return "chi"
@ -1184,6 +1199,7 @@ Public Class Main
Dim CR_Episode_1 As String() = WebbrowserText.Split(New String() {My.Resources.CR_Episode_Nr}, System.StringSplitOptions.RemoveEmptyEntries) Dim CR_Episode_1 As String() = WebbrowserText.Split(New String() {My.Resources.CR_Episode_Nr}, System.StringSplitOptions.RemoveEmptyEntries)
Dim CR_Episode_2 As String() = CR_Episode_1(1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) '(New [Char]() {"-"}) Dim CR_Episode_2 As String() = CR_Episode_1(1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) '(New [Char]() {"-"})
CR_Anime_Folge_int = String.Join(" ", CR_Episode_2(0).Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c) 'System.Text.RegularExpressions.Regex.Replace(CR_Name_2(0), "[^\w\\-]", " ") CR_Anime_Folge_int = String.Join(" ", CR_Episode_2(0).Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c) 'System.Text.RegularExpressions.Regex.Replace(CR_Name_2(0), "[^\w\\-]", " ")
CR_Anime_Folge_int = RemoveExtraSpaces(CR_Anime_Folge_int) CR_Anime_Folge_int = RemoveExtraSpaces(CR_Anime_Folge_int)
Dim CleanedNumber As String = Nothing Dim CleanedNumber As String = Nothing
@ -1197,6 +1213,7 @@ Public Class Main
CleanedNumber = CleanedNumber + "." CleanedNumber = CleanedNumber + "."
End If End If
Next Next
If CleanedNumber = Nothing Then If CleanedNumber = Nothing Then
ElseIf InStr(CleanedNumber, ".") Then ElseIf InStr(CleanedNumber, ".") Then
@ -1209,6 +1226,9 @@ Public Class Main
CR_Anime_Folge_int = "0" + CleanedNumber CR_Anime_Folge_int = "0" + CleanedNumber
End If End If
End If End If
If InStr(CR_Anime_Folge_int, ",") Then
CR_Anime_Folge_int = CR_Anime_Folge_int.Replace(",", ".")
End If
End If End If
@ -1279,7 +1299,17 @@ Public Class Main
End If End If
End If End If
If KodiNaming = True Then
Dim KodiString As String = "[S"
If CR_Anime_Staffel_int = "0" Then
CR_Anime_Staffel_int = "01"
Else
CR_Anime_Staffel_int = "0" + CR_Anime_Staffel_int
End If
KodiString = KodiString + CR_Anime_Staffel_int + " E" + CR_Anime_Folge_int
KodiString = KodiString + "] "
CR_FilenName = KodiString + CR_FilenName
End If
'MsgBox(CR_FilenName) 'MsgBox(CR_FilenName)
@ -1681,15 +1711,12 @@ Public Class Main
Dim First As Integer = 0 Dim First As Integer = 0
Dim Last As Integer = 0 Dim Last As Integer = 0
If Anime_Add.comboBox4.SelectedIndex > Anime_Add.comboBox3.SelectedIndex Then If Anime_Add.comboBox4.SelectedIndex > Anime_Add.comboBox3.SelectedIndex Or Anime_Add.comboBox4.SelectedIndex = Anime_Add.comboBox3.SelectedIndex Then
First = Anime_Add.comboBox3.SelectedIndex First = Anime_Add.comboBox3.SelectedIndex
Last = Anime_Add.comboBox4.SelectedIndex Last = Anime_Add.comboBox4.SelectedIndex
ElseIf Anime_Add.comboBox4.SelectedIndex = Anime_Add.comboBox3.SelectedIndex Then ElseIf Anime_Add.comboBox3.SelectedIndex > Anime_Add.comboBox4.SelectedIndex Then
Exit Sub
Else
First = Anime_Add.comboBox4.SelectedIndex First = Anime_Add.comboBox4.SelectedIndex
Last = Anime_Add.comboBox4.SelectedIndex Last = Anime_Add.comboBox3.SelectedIndex
End If End If
@ -1767,7 +1794,7 @@ Public Class Main
Anime_Add.pictureBox4.Image = My.Resources.main_button_download_default Anime_Add.pictureBox4.Image = My.Resources.main_button_download_default
End Sub End Sub
Public Sub GetBetaSeasons(ByVal JsonUrl As String) Public Sub GetBetaSeasons(ByVal JsonUrl As String)
'MsgBox(JsonUrl)
Anime_Add.groupBox2.Visible = True Anime_Add.groupBox2.Visible = True
Anime_Add.PictureBox1.Enabled = True Anime_Add.PictureBox1.Enabled = True
Anime_Add.PictureBox1.Visible = True Anime_Add.PictureBox1.Visible = True
@ -1791,6 +1818,7 @@ Public Class Main
SeasonJson = client.DownloadString(JsonUrl) SeasonJson = client.DownloadString(JsonUrl)
End Using End Using
Catch ex As Exception Catch ex As Exception
Debug.WriteLine("error- getting SeasonJson data") Debug.WriteLine("error- getting SeasonJson data")
End Try End Try
Dim ParameterSplit() As String = JsonUrl.Split(New String() {"&locale="}, System.StringSplitOptions.RemoveEmptyEntries) Dim ParameterSplit() As String = JsonUrl.Split(New String() {"&locale="}, System.StringSplitOptions.RemoveEmptyEntries)
@ -1798,6 +1826,10 @@ Public Class Main
CrBetaMassParameters = ParameterSplit(1) CrBetaMassParameters = ParameterSplit(1)
CrBetaMass = SeasonJson CrBetaMass = SeasonJson
Dim BaseURLBuilder() As String = JsonUrl.Split(New String() {"seasons?"}, System.StringSplitOptions.RemoveEmptyEntries)
CrBetaMassBaseURL = BaseURLBuilder(0)
Dim SeasonSplit() As String = SeasonJson.Split(New String() {Chr(34) + "title" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) Dim SeasonSplit() As String = SeasonJson.Split(New String() {Chr(34) + "title" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
For i As Integer = 1 To SeasonSplit.Count - 1 For i As Integer = 1 To SeasonSplit.Count - 1
Dim SeasonSplit2() As String = SeasonSplit(i).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) Dim SeasonSplit2() As String = SeasonSplit(i).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
@ -1832,7 +1864,7 @@ Public Class Main
Return Nothing Return Nothing
End Function)) End Function))
#Region "Name von Crunchyroll" #Region "Name von Crunchyroll"
If TextBox2_Text = Nothing Or TextBox2_Text = "Name of the Anime" Then
Dim ObjectsURLBuilder() As String = Streams.Split(New String() {"videos"}, System.StringSplitOptions.RemoveEmptyEntries) Dim ObjectsURLBuilder() As String = Streams.Split(New String() {"videos"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim ObjectsURLBuilder2() As String = ObjectsURLBuilder(1).Split(New String() {"/streams"}, System.StringSplitOptions.RemoveEmptyEntries) Dim ObjectsURLBuilder2() As String = ObjectsURLBuilder(1).Split(New String() {"/streams"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim ObjectsURLBuilder3() As String = WebsiteURL.Split(New String() {"watch/"}, System.StringSplitOptions.RemoveEmptyEntries) Dim ObjectsURLBuilder3() As String = WebsiteURL.Split(New String() {"watch/"}, System.StringSplitOptions.RemoveEmptyEntries)
@ -1853,7 +1885,11 @@ Public Class Main
Exit Sub Exit Sub
End Try End Try
My.Computer.Clipboard.SetText(ObjectJson)
If TextBox2_Text = Nothing Or TextBox2_Text = "Name of the Anime" Then
'My.Computer.Clipboard.SetText(ObjectJson)
If CBool(InStr(ObjectJson, Chr(34) + "title")) Then ' false on movie true on series If CBool(InStr(ObjectJson, Chr(34) + "title")) Then ' false on movie true on series
Dim CR_Name_1 As String() = ObjectJson.Split(New String() {Chr(34) + "title" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) Dim CR_Name_1 As String() = ObjectJson.Split(New String() {Chr(34) + "title" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
@ -1996,7 +2032,8 @@ Public Class Main
MsgBox("No download stream avalible", MsgBoxStyle.Critical) MsgBox("No download stream avalible", MsgBoxStyle.Critical)
Exit Sub Exit Sub
End If End If
'My.Computer.Clipboard.SetText(VideoJson)
'MsgBox(SubSprache)
Dim LangNew As String = ConvertCC(SubSprache) Dim LangNew As String = ConvertCC(SubSprache)
@ -2097,6 +2134,7 @@ Public Class Main
Dim CR_VideoJsonHardSubs As String() = CR_VideoJson(1).Split(New String() {"hardsub_locale" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) Dim CR_VideoJsonHardSubs As String() = CR_VideoJson(1).Split(New String() {"hardsub_locale" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Debug.WriteLine(LangNew) Debug.WriteLine(LangNew)
Debug.WriteLine(CR_VideoJsonHardSubs.Count.ToString)
Dim hls_List As New List(Of String) Dim hls_List As New List(Of String)
For i As Integer = 0 To CR_VideoJsonHardSubs.Count - 1 For i As Integer = 0 To CR_VideoJsonHardSubs.Count - 1
If InStr(CR_VideoJsonHardSubs(i), LangNew + Chr(34) + "," + Chr(34) + "url" + Chr(34) + ":" + Chr(34)) Then If InStr(CR_VideoJsonHardSubs(i), LangNew + Chr(34) + "," + Chr(34) + "url" + Chr(34) + ":" + Chr(34)) Then
@ -2104,6 +2142,28 @@ Public Class Main
Exit For Exit For
End If End If
Next Next
If CR_URI_Master = Nothing Then
Me.Invoke(New Action(Function()
ResoNotFoundString = VideoJson
DialogTaskString = "Language_CR_Beta"
ErrorDialog.ShowDialog()
Return Nothing
End Function))
If UserCloseDialog = True Then
Throw New System.Exception(Chr(34) + "UserAbort" + Chr(34))
Else
LangNew = ResoBackString
ResoBackString = Nothing
For i As Integer = 0 To CR_VideoJsonHardSubs.Count - 1
If InStr(CR_VideoJsonHardSubs(i), LangNew + Chr(34) + "," + Chr(34) + "url" + Chr(34) + ":" + Chr(34)) Then
CR_URI_Master = CR_VideoJsonHardSubs(i).Replace(LangNew + Chr(34) + "," + Chr(34) + "url" + Chr(34) + ":" + Chr(34), "").Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)(0)
Exit For
End If
Next
End If
End If
CR_URI_Master = CR_URI_Master.Replace("&amp;", "&").Replace("/u0026", "&").Replace("\u002F", "/").Replace("\u0026", "&") CR_URI_Master = CR_URI_Master.Replace("&amp;", "&").Replace("/u0026", "&").Replace("\u002F", "/").Replace("\u0026", "&")
If CBool(InStr(CR_URI_Master, "master.m3u8")) Then If CBool(InStr(CR_URI_Master, "master.m3u8")) Then
@ -2130,7 +2190,7 @@ Public Class Main
#Region "lösche doppel download" #Region "lösche doppel download"
Dim Pfad5 As String = Pfad2.Replace(Chr(34), "") Dim Pfad5 As String = Pfad2.Replace(Chr(34), "")
If My.Computer.FileSystem.FileExists(Pfad5) Then 'Pfad = Kompeltter Pfad mit Dateinamen + ENdung If My.Computer.FileSystem.FileExists(Pfad5) And SubsOnly = False Then 'Pfad = Kompeltter Pfad mit Dateinamen + ENdung
Me.Invoke(New Action(Function() Me.Invoke(New Action(Function()
Anime_Add.StatusLabel.Text = "Status: The file video already exists." Anime_Add.StatusLabel.Text = "Status: The file video already exists."
@ -2154,10 +2214,10 @@ Public Class Main
If Reso = 42 And HybridMode = False Then If Reso = 42 And HybridMode = False Then
If MergeSubs = True Then If MergeSubs = True Then
URL_DL = "-i " + Chr(34) + CR_URI_Master + Chr(34) + SoftSubMergeURLs + SoftSubMergeMaps + " " + ffmpeg_command + " -c:s " + MergeSubsFormat + SoftSubMergeMetatata + " -metadata:s:a:0 language=" + CCtoMP4CC(ConvertCC(CR_audio_locale)) URL_DL = "-i " + Chr(34) + CR_URI_Master + Chr(34) + SoftSubMergeURLs + SoftSubMergeMaps + " " + ffmpeg_command + " -c:s " + MergeSubsFormat + SoftSubMergeMetatata + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale)
'URL_DL = "-i " + Chr(34) + CR_URI_Master + Chr(34) + " -metadata:s:a:0 language=" + CCtoMP4CC(ConvertCC(CR_audio_locale)) + " " + ffmpeg_command 'URL_DL = "-i " + Chr(34) + CR_URI_Master + Chr(34) + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) + " " + ffmpeg_command
Else Else
URL_DL = "-i " + Chr(34) + CR_URI_Master + Chr(34) + " -metadata:s:a:0 language=" + CCtoMP4CC(ConvertCC(CR_audio_locale)) + " " + ffmpeg_command URL_DL = "-i " + Chr(34) + CR_URI_Master + Chr(34) + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) + " " + ffmpeg_command
End If End If
'MsgBox(URL_DL) 'MsgBox(URL_DL)
Else Else
@ -2199,14 +2259,15 @@ Public Class Main
Dim ffmpeg_url_3 As String() = Nothing Dim ffmpeg_url_3 As String() = Nothing
Dim ffmpeg_url_2 As String() = ffmpeg_url_1(1).Split(New [Char]() {Chr(34)}) Dim ffmpeg_url_2 As String() = ffmpeg_url_1(1).Split(New [Char]() {Chr(34)})
ffmpeg_url_3 = ffmpeg_url_2(2).Split(New [Char]() {System.Convert.ToChar("#")}) ffmpeg_url_3 = ffmpeg_url_2(2).Split(New [Char]() {System.Convert.ToChar("#")})
Debug.WriteLine(CR_audio_locale)
If MergeSubs = True Then If MergeSubs = True Then
Debug.WriteLine(ConvertCC(CR_audio_locale)) Debug.WriteLine(ConvertCC(CR_audio_locale))
URL_DL = "-i " + Chr(34) + ffmpeg_url_3(0).Trim() + Chr(34) + SoftSubMergeURLs + SoftSubMergeMaps + " " + ffmpeg_command + " -c:s " + MergeSubsFormat + SoftSubMergeMetatata + " -metadata:s:a:0 language=" + CCtoMP4CC(ConvertCC(CR_audio_locale)) URL_DL = "-i " + Chr(34) + ffmpeg_url_3(0).Trim() + Chr(34) + SoftSubMergeURLs + SoftSubMergeMaps + " " + ffmpeg_command + " -c:s " + MergeSubsFormat + SoftSubMergeMetatata + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale)
'URL_DL = "-i " + Chr(34) + ffmpeg_url_3(0).Trim() + Chr(34) + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) + " " + ffmpeg_command 'URL_DL = "-i " + Chr(34) + ffmpeg_url_3(0).Trim() + Chr(34) + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) + " " + ffmpeg_command
Else Else
URL_DL = "-i " + Chr(34) + ffmpeg_url_3(0).Trim() + Chr(34) + " -metadata:s:a:0 language=" + CCtoMP4CC(ConvertCC(CR_audio_locale)) + " " + ffmpeg_command URL_DL = "-i " + Chr(34) + ffmpeg_url_3(0).Trim() + Chr(34) + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) + " " + ffmpeg_command
End If End If
End If End If
@ -2295,8 +2356,8 @@ Public Class Main
Try Try
If CC = "deDE" Then If CC = "deDE" Then
Return "de-DE" Return "de-DE"
ElseIf CC = "en-US" Then ElseIf CC = "enUS" Then
Return "enUS" Return "en-US"
ElseIf CC = "ptBR" Then ElseIf CC = "ptBR" Then
Return "pt-BR" Return "pt-BR"
ElseIf CC = "esLA" Then ElseIf CC = "esLA" Then
@ -2310,7 +2371,7 @@ Public Class Main
ElseIf CC = "itIT" Then ElseIf CC = "itIT" Then
Return "it-IT" Return "it-IT"
ElseIf CC = "esES" Then ElseIf CC = "esES" Then
Return "Español (España)" Return "es-ES"
ElseIf CC = "jaJP" Then ElseIf CC = "jaJP" Then
Return "ja-JP" Return "ja-JP"
ElseIf CC = "None" Then ElseIf CC = "None" Then
@ -3335,6 +3396,653 @@ Public Class Main
Funimation_Grapp_RDY = True Funimation_Grapp_RDY = True
End Sub End Sub
#Region "Funimation JS "
Public Sub GetFunimationJS_Seasons(ByVal JsonUrl As String)
Anime_Add.groupBox2.Visible = True
Anime_Add.PictureBox1.Enabled = True
Anime_Add.PictureBox1.Visible = True
Anime_Add.groupBox1.Visible = False
Anime_Add.ComboBox1.Items.Clear()
Anime_Add.comboBox3.Items.Clear()
Anime_Add.comboBox4.Items.Clear()
Anime_Add.ComboBox1.Text = Nothing
Anime_Add.comboBox3.Text = Nothing
Anime_Add.comboBox4.Text = Nothing
Anime_Add.ComboBox1.Enabled = True
Anime_Add.comboBox3.Enabled = True
Anime_Add.comboBox4.Enabled = True
Dim SeasonJson As String = Nothing
Try
Using client As New WebClient()
client.Encoding = System.Text.Encoding.UTF8
client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), ""))
SeasonJson = client.DownloadString(JsonUrl)
End Using
Catch ex As Exception
Debug.WriteLine("error- getting SeasonJson data")
End Try
Dim SeasonSplit() As String = SeasonJson.Split(New String() {Chr(34) + "seasons" + Chr(34) + ":"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim SeasonSplit2() As String = SeasonSplit(1).Split(New String() {Chr(34) + "name" + Chr(34) + ": " + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
For i As Integer = 1 To SeasonSplit2.Count - 1
Dim SeasonSplit3() As String = SeasonSplit2(i).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Anime_Add.ComboBox1.Items.Add(SeasonSplit3(0))
Next
Dim SeasonIDSplit() As String = SeasonSplit(1).Split(New String() {Chr(34) + "id" + Chr(34) + ": "}, System.StringSplitOptions.RemoveEmptyEntries)
For i As Integer = 1 To SeasonSplit2.Count - 1
Dim SeasonIDSplit2() As String = SeasonIDSplit(i).Split(New String() {","}, System.StringSplitOptions.RemoveEmptyEntries)
'Anime_Add.ComboBox1.Items.Add(SeasonIDSplit2(0))
FunimtaionAPISeasonID.Add(SeasonIDSplit2(0))
Next
WebbrowserURL = "funimation.com/js"
End Sub
Public Async Sub DownloadFunimationJS_Seasons()
Try
Dim ListOfEpisodes As New List(Of String)
Dim BaseURL As String = "https://www.funimation.com/shows/"
If FunimationRegion IsNot Nothing Then
BaseURL = "https://www.funimation.com/" + FunimationRegion + "/shows/"
End If
Dim EpisodeSplit() As String = FunimationEpisodeJSON.Split(New String() {Chr(34) + "slug" + Chr(34) + ": " + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
For i As Integer = 1 To EpisodeSplit.Count - 1
Dim EpisodeSplit2() As String = EpisodeSplit(i).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
' ListOfEpisodes.Add("https://title-api.prd.funimationsvc.com/v1/shows/" + FunimationShowPath + "/episodes/" + EpisodeSplit2(0) + FunimationAPIRegion)
ListOfEpisodes.Add(BaseURL + FunimationShowPath + EpisodeSplit2(0)) '+ FunimationAPIRegion)
Next
'https://title-api.prd.funimationsvc.com/v1/shows/aldnoahzero/episodes/princess-of-vers/?region=US&deviceType=web
'https://www.funimation.com/shows/aldnoahzero/princess-of-vers
Dim First As Integer = 0
Dim Last As Integer = 0
If Anime_Add.comboBox4.SelectedIndex > Anime_Add.comboBox3.SelectedIndex Then
First = Anime_Add.comboBox3.SelectedIndex
Last = Anime_Add.comboBox4.SelectedIndex
ElseIf Anime_Add.comboBox4.SelectedIndex = Anime_Add.comboBox3.SelectedIndex Then
Exit Sub
Else
First = Anime_Add.comboBox4.SelectedIndex
Last = Anime_Add.comboBox4.SelectedIndex
End If
Dim Anzahl As Integer = Anime_Add.comboBox4.SelectedIndex - Anime_Add.comboBox3.SelectedIndex
For i As Integer = First To Last
For e As Integer = 0 To Integer.MaxValue
If Funimation_Grapp_RDY = True Then
Try
Dim ItemFinshedCount As Integer = 0
For i2 As Integer = 0 To ListView1.Items.Count - 1
If ItemList(i2).GetIsStatusFinished() = True Then
ItemFinshedCount = ItemFinshedCount + 1
End If
Next
RunningDownloads = ListView1.Items.Count - ItemFinshedCount
Catch ex As Exception
RunningDownloads = ListView1.Items.Count
End Try
If RunningDownloads < MaxDL Then
Exit For
Else
'MsgBox(e)
Await Task.Delay(1000)
End If
Else
Await Task.Delay(5000)
End If
Next
If Anime_Add.Mass_DL_Cancel = False Then
b = True
Exit For
Grapp_Abord = True
'MsgBox("dl_abourd")
End If
If UseQueue = True Then
Anime_Add.ListBox1.Items.Add(ListOfEpisodes(i))
Anime_Add.Add_Display.ForeColor = Color.FromArgb(9248044)
Pause(1)
Anime_Add.Add_Display.ForeColor = Color.Black
Else
Funimation_Grapp_RDY = False
b = False
GeckoFX.WebBrowser1.Navigate(ListOfEpisodes(i))
End If
Anime_Add.Add_Display.Text = (i - First + 1).ToString + " / " + (Last - First + 1).ToString
Next
Catch ex As Exception
If Debug2 = True Then
MsgBox(ex.ToString)
End If
Anime_Add.comboBox4.Items.Clear()
Anime_Add.comboBox3.Items.Clear()
Aktuell = 0.ToString
Gesamt = 0.ToString
Anime_Add.groupBox1.Visible = True
Anime_Add.groupBox2.Visible = False
Anime_Add.GroupBox3.Visible = False
Anime_Add.Mass_DL_Cancel = False
Anime_Add.pictureBox4.Image = My.Resources.main_button_download_default
End Try
Pause(5)
Anime_Add.groupBox1.Visible = True
Anime_Add.groupBox2.Visible = False
Anime_Add.GroupBox3.Visible = False
Anime_Add.Mass_DL_Cancel = False
Anime_Add.pictureBox4.Image = My.Resources.main_button_download_default
End Sub
Public Sub GetFunimationJS_Video(ByVal Streams As String, ByVal WebsiteURL As String)
Try
Funimation_Grapp_RDY = False
Dim CR_series_title As String = Nothing
Dim CR_season_number As String = Nothing
Dim CR_episode As String = Nothing
Dim CR_season_title As String = Nothing
Dim CR_title As String = Nothing
Dim CR_audio_locale As String = Nothing
#Region "Name + Pfad"
Dim Pfad2 As String
Dim TextBox2_Text As String = Nothing
Dim CR_FilenName As String = Nothing
Dim ObjectJson As String = Nothing
Me.Invoke(New Action(Function()
TextBox2_Text = Anime_Add.textBox2.Text
Return Nothing
End Function))
#Region "Name von Funimation"
If TextBox2_Text = Nothing Or TextBox2_Text = "Name of the Anime" Then
Dim ObjectsURLBuilder() As String = Streams.Split(New String() {"videos"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim ObjectsURLBuilder2() As String = ObjectsURLBuilder(1).Split(New String() {"/streams"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim ObjectsURLBuilder3() As String = WebsiteURL.Split(New String() {"watch/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim ObjectsURLBuilder4() As String = ObjectsURLBuilder3(1).Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim ObjectsURL As String = ObjectsURLBuilder(0) + "objects/" + ObjectsURLBuilder4(0) + ObjectsURLBuilder2(1)
Debug.WriteLine(ObjectsURL)
Try
Using client As New WebClient()
client.Encoding = System.Text.Encoding.UTF8
client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), ""))
ObjectJson = client.DownloadString(ObjectsURL)
End Using
Catch ex As Exception
Debug.WriteLine("error- getting name data")
Exit Sub
End Try
'My.Computer.Clipboard.SetText(ObjectJson)
If CBool(InStr(ObjectJson, Chr(34) + "title")) Then ' false on movie true on series
Dim CR_Name_1 As String() = ObjectJson.Split(New String() {Chr(34) + "title" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim CR_Name_2 As String() = CR_Name_1(1).Split(New String() {Chr(34) + ","}, System.StringSplitOptions.RemoveEmptyEntries) '(New [Char]() {"-"})
CR_title = String.Join(" ", CR_Name_2(0).Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c)
End If
If CBool(InStr(ObjectJson, "series_title")) Then ' false on movie true on series
Dim CR_Name_1 As String() = ObjectJson.Split(New String() {"series_title" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim CR_Name_2 As String() = CR_Name_1(1).Split(New String() {Chr(34) + ","}, System.StringSplitOptions.RemoveEmptyEntries) '(New [Char]() {"-"})
CR_series_title = String.Join(" ", CR_Name_2(0).Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c)
End If
If CBool(InStr(ObjectJson, "season_title")) Then ' false on movie true on series
Dim CR_Name_1 As String() = ObjectJson.Split(New String() {"season_title" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim CR_Name_2 As String() = CR_Name_1(1).Split(New String() {Chr(34) + ","}, System.StringSplitOptions.RemoveEmptyEntries) '(New [Char]() {"-"})
CR_season_title = String.Join(" ", CR_Name_2(0).Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c)
End If
If CBool(InStr(ObjectJson, "season_number")) Then ' false on movie true on series
Dim CR_Name_1 As String() = ObjectJson.Split(New String() {"season_number" + Chr(34) + ":"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim CR_Name_2 As String() = CR_Name_1(1).Split(New String() {","}, System.StringSplitOptions.RemoveEmptyEntries) '(New [Char]() {"-"})
CR_season_number = String.Join(" ", CR_Name_2(0).Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c)
End If
If CBool(InStr(ObjectJson, "episode")) Then ' false on movie true on series
Dim CR_Name_1 As String() = ObjectJson.Split(New String() {"episode" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim CR_Name_2 As String() = CR_Name_1(1).Split(New String() {Chr(34) + ","}, System.StringSplitOptions.RemoveEmptyEntries) '(New [Char]() {"-"})
CR_episode = String.Join(" ", CR_Name_2(0).Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c)
End If
'My.Computer.Clipboard.SetText(ObjectJson)
'MsgBox(CR_season_title)
If Season_Prefix = "[default season prefix]" Then
If CR_season_title = CR_series_title Then
CR_season_number = CR_season_title + "Season " + CR_season_number
End If
CR_season_number = CR_season_title
Else
CR_season_number = Season_Prefix + CR_season_number
End If
If Episode_Prefix = "[default episode prefix]" Then
CR_episode = "Episode " + CR_episode
Else
CR_episode = Episode_Prefix + CR_episode
End If
If CR_NameMethode = 0 Then 'nummer
If CR_season_number = Nothing Then
CR_FilenName = CR_series_title + " " + CR_episode
Else
CR_FilenName = CR_season_number + " " + CR_episode
End If
ElseIf CR_NameMethode = 1 Then 'name
If CR_season_number = Nothing Then
CR_FilenName = CR_series_title + " " + CR_title
Else
CR_FilenName = CR_season_number + " " + CR_title
End If
ElseIf CR_NameMethode = 2 Then ' nummer - name
If CR_season_number = Nothing Then
CR_FilenName = CR_series_title + " " + CR_episode + " " + CR_title
Else
CR_FilenName = CR_season_number + " " + CR_episode + " " + CR_title
End If
ElseIf CR_NameMethode = 3 Then ' name - nummer
If CR_season_number = Nothing Then
CR_FilenName = CR_series_title + " " + CR_title + " " + CR_episode
Else
CR_FilenName = CR_series_title + " " + CR_title + " " + CR_season_number + " " + CR_episode
End If
End If
Debug.WriteLine(CR_FilenName)
#End Region
Else
CR_FilenName = RemoveExtraSpaces(String.Join(" ", TextBox2_Text.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c)) 'System.Text.RegularExpressions.Regex.Replace(TextBox2_Text, "[^\w\\-]", " "))
End If
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)
'My.Computer.FileSystem.WriteAllText("log.log", WebbrowserText, False)
Pfad2 = UseSubfolder(CR_series_title, CR_season_title, Pfad)
If Not Directory.Exists(Path.GetDirectoryName(Pfad2)) Then
' Nein! Jetzt erstellen...
Try
Directory.CreateDirectory(Path.GetDirectoryName(Pfad2))
Pfad2 = Chr(34) + Pfad2 + CR_FilenName + VideoFormat + Chr(34)
Catch ex As Exception
' Ordner wurde nich erstellt
Pfad2 = Pfad + "\" + CR_FilenName + VideoFormat
End Try
Else
Pfad2 = Chr(34) + Pfad2 + CR_FilenName + VideoFormat + Chr(34)
End If
#End Region
#Region "VideoJson"
Dim VideoJson As String = Nothing
Try
Using client As New WebClient()
client.Encoding = System.Text.Encoding.UTF8
client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), ""))
VideoJson = client.DownloadString(Streams)
End Using
Catch ex As Exception
Debug.WriteLine("error- getting stream data")
Exit Sub
End Try
Dim hls_type As String = Nothing
If CBool(InStr(VideoJson, Chr(34) + "adaptive_hls")) = True Then
hls_type = "adaptive_hls"
ElseIf CBool(InStr(VideoJson, Chr(34) + "multitrack_adaptive_hls_v2")) = True Then
hls_type = "multitrack_adaptive_hls_v2"
ElseIf CBool(InStr(VideoJson, Chr(34) + "vo_adaptive_hls")) = True Then
hls_type = "vo_adaptive_hls"
Else
MsgBox("No download stream avalible", MsgBoxStyle.Critical)
Exit Sub
End If
Dim LangNew As String = ConvertCC(SubSprache)
#End Region
#Region "Download softsub file or build ffmpeg cmd"
Dim SoftSubs2 As New List(Of String)
If SoftSubs.Count > 0 Then
For i As Integer = 0 To SoftSubs.Count - 1
If CBool(InStr(VideoJson, Chr(34) + "locale" + Chr(34) + ":" + Chr(34) + ConvertCC(SoftSubs(i)) + Chr(34) + "," + Chr(34) + "url" + Chr(34) + ":" + Chr(34))) Then
SoftSubs2.Add(SoftSubs(i))
Else
'MsgBox("Softsubtitle for " + SoftSubs(i) + " is not avalible.", MsgBoxStyle.Information)
End If
Next
End If
Dim SoftSubMergeURLs As String = Nothing
Dim SoftSubMergeMaps As String = " -map 0:v -map 0:a"
Dim SoftSubMergeMetatata As String = Nothing
If SoftSubs2.Count > 0 Then
If MergeSubs = True And SubsOnly = False Then
Dim DispositionIndex As Integer
For i As Integer = 0 To SoftSubs2.Count - 1
Debug.WriteLine(SoftSubs2(i))
If SoftSubs2(i) = DefaultSubCR Then
DispositionIndex = i
End If
Dim SoftSub As String() = VideoJson.Split(New String() {Chr(34) + "locale" + Chr(34) + ":" + Chr(34) + ConvertCC(SoftSubs2(i)) + Chr(34) + "," + Chr(34) + "url" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim SoftSub_2 As String() = SoftSub(1).Split(New [Char]() {Chr(34)})
Dim SoftSub_3 As String = SoftSub_2(0).Replace("&amp;", "&").Replace("/u0026", "&").Replace("\u002F", "/").Replace("\u0026", "&")
If SoftSubMergeURLs = Nothing Then
SoftSubMergeURLs = " -i " + Chr(34) + SoftSub_3 + Chr(34)
Else
SoftSubMergeURLs = SoftSubMergeURLs + " -i " + Chr(34) + SoftSub_3 + Chr(34)
End If
SoftSubMergeMaps = SoftSubMergeMaps + " -map " + (i + 1).ToString
If SoftSubMergeMetatata = Nothing Then
SoftSubMergeMetatata = " -metadata:s:s:" + i.ToString + " language=" + CCtoMP4CC(SoftSubs2(i)) + " -metadata:s:s:" + i.ToString + " title=" + Chr(34) + HardSubValuesToDisplay(SoftSubs2(i)) + Chr(34) + " -metadata:s:s:" + i.ToString + " handler_name=" + Chr(34) + HardSubValuesToDisplay(SoftSubs2(i)) + Chr(34)
Else
SoftSubMergeMetatata = SoftSubMergeMetatata + " -metadata:s:s:" + i.ToString + " language=" + CCtoMP4CC(SoftSubs2(i)) + " -metadata:s:s:" + i.ToString + " title=" + Chr(34) + HardSubValuesToDisplay(SoftSubs2(i)) + Chr(34) + " -metadata:s:s:" + i.ToString + " handler_name=" + Chr(34) + HardSubValuesToDisplay(SoftSubs2(i)) + Chr(34)
End If
Next
If DispositionIndex = Nothing Then
Else
SoftSubMergeMetatata = SoftSubMergeMetatata + " -disposition:s:" + DispositionIndex.ToString + " default"
End If
Else
For i As Integer = 0 To SoftSubs2.Count - 1
Dim i2 As Integer = i
Me.Invoke(New Action(Function()
Anime_Add.StatusLabel.Text = "Status: downloading subtitle file " + HardSubValuesToDisplay(SoftSubs2(i2))
Me.Text = "Status: downloading subtitle file " + HardSubValuesToDisplay(SoftSubs2(i2))
Me.Invalidate()
Return Nothing
End Function))
Dim SoftSub As String() = VideoJson.Split(New String() {Chr(34) + "locale" + Chr(34) + ":" + Chr(34) + ConvertCC(SoftSubs2(i)) + Chr(34) + "," + Chr(34) + "url" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim SoftSub_2 As String() = SoftSub(1).Split(New [Char]() {Chr(34)})
Dim SoftSub_3 As String = SoftSub_2(0).Replace("&amp;", "&").Replace("/u0026", "&").Replace("\u002F", "/").Replace("\u0026", "&")
'MsgBox(SoftSub_3)
Dim client0 As New WebClient
client0.Encoding = Encoding.UTF8
Dim str0 As String = client0.DownloadString(SoftSub_3)
Dim Pfad3 As String = Pfad2.Replace(Chr(34), "")
Dim FN As String = Path.ChangeExtension(Path.Combine(Path.GetFileNameWithoutExtension(Pfad3) + " " + SoftSubs2(i) + Path.GetExtension(Pfad3)), "ass")
'MsgBox(FN)
If i = 0 Then
FN = Path.ChangeExtension(Path.GetFileName(Pfad3), "ass")
'MsgBox(FN)
End If
Dim Pfad4 As String = Path.Combine(Path.GetDirectoryName(Pfad3), FN)
'MsgBox(Pfad4)
File.WriteAllText(Pfad4, str0, Encoding.UTF8)
Pause(3)
Next
End If
End If
#End Region
#Region "m3u8 suche"
If CBool(InStr(VideoJson, "audio_locale")) Then
Dim CR_audio As String() = VideoJson.Split(New String() {"audio_locale" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim CR_audio2 As String() = CR_audio(1).Split(New String() {Chr(34) + ","}, System.StringSplitOptions.RemoveEmptyEntries) '(New [Char]() {"-"})
CR_audio_locale = String.Join(" ", CR_audio2(0).Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c)
End If
Dim CR_URI_Master As String = Nothing
'If SubsOnly = False Then
Dim ii As Integer = 0
Dim CR_VideoJson As String() = VideoJson.Split(New String() {hls_type}, System.StringSplitOptions.RemoveEmptyEntries)
Dim CR_VideoJsonHardSubs As String() = CR_VideoJson(1).Split(New String() {"hardsub_locale" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Debug.WriteLine(LangNew)
Dim hls_List As New List(Of String)
For i As Integer = 0 To CR_VideoJsonHardSubs.Count - 1
If InStr(CR_VideoJsonHardSubs(i), LangNew + Chr(34) + "," + Chr(34) + "url" + Chr(34) + ":" + Chr(34)) Then
CR_URI_Master = CR_VideoJsonHardSubs(i).Replace(LangNew + Chr(34) + "," + Chr(34) + "url" + Chr(34) + ":" + Chr(34), "").Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)(0)
Exit For
End If
Next
CR_URI_Master = CR_URI_Master.Replace("&amp;", "&").Replace("/u0026", "&").Replace("\u002F", "/").Replace("\u0026", "&")
If CBool(InStr(CR_URI_Master, "master.m3u8")) Then
Me.Invoke(New Action(Function()
Anime_Add.StatusLabel.Text = "Status: m3u8 found, looking for resolution"
Me.Text = "Status: m3u8 found, looking for resolution"
Me.Invalidate()
Return Nothing
End Function))
Else
Throw New System.Exception("Premium Episode")
End If
'Else
' Me.Invoke(New Action(Function()
' Anime_Add.StatusLabel.Text = "Status: Substitles only mode - skipped video"
' Me.Text = "Status: Substitles only mode - skipped video"
' Me.Invalidate()
' Return Nothing
' End Function))
'End If
#End Region
#Region "lösche doppel download"
Dim Pfad5 As String = Pfad2.Replace(Chr(34), "")
If My.Computer.FileSystem.FileExists(Pfad5) Then 'Pfad = Kompeltter Pfad mit Dateinamen + ENdung
Me.Invoke(New Action(Function()
Anime_Add.StatusLabel.Text = "Status: The file video already exists."
Me.Text = "Status: The file video already exists."
Me.Invalidate()
Return Nothing
End Function))
If MessageBox.Show("The file " + Pfad5 + " already exists." + vbNewLine + "You want to override it?", "File exists!", MessageBoxButtons.OKCancel) = DialogResult.OK Then
Try
My.Computer.FileSystem.DeleteFile(Pfad5)
Catch ex As Exception
End Try
Else
Grapp_RDY = True
Exit Sub
End If
End If
#End Region
If SubsOnly = False Then
If Reso = 42 And HybridMode = False Then
If MergeSubs = True Then
URL_DL = "-i " + Chr(34) + CR_URI_Master + Chr(34) + SoftSubMergeURLs + SoftSubMergeMaps + " " + ffmpeg_command + " -c:s " + MergeSubsFormat + SoftSubMergeMetatata + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale)
'URL_DL = "-i " + Chr(34) + CR_URI_Master + Chr(34) + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) + " " + ffmpeg_command
Else
URL_DL = "-i " + Chr(34) + CR_URI_Master + Chr(34) + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) + " " + ffmpeg_command
End If
'MsgBox(URL_DL)
Else
Dim client As New System.Net.WebClient
client.Encoding = Encoding.UTF8
'MsgBox(CR_URI_Master)
Dim str As String = client.DownloadString(CR_URI_Master)
'MsgBox(str)
If CBool(InStr(str, "x" + Reso.ToString + ",")) Then
Reso2 = "x" + Reso.ToString
Else
'MsgBox(str)
If CBool(InStr(str, ResoSave + ",")) Then
Reso2 = Reso2
Else
Me.Invoke(New Action(Function()
DialogTaskString = "Resolution"
ResoNotFoundString = str
ErrorDialog.ShowDialog()
Return Nothing
End Function))
'MsgBox(ResoBackString)
If UserCloseDialog = True Then
Throw New System.Exception(Chr(34) + "UserAbort" + Chr(34))
Else
Reso2 = ResoBackString
ResoSave = ResoBackString
End If
End If
End If
Dim ffmpeg_url_1 As String() = str.Split(New String() {Reso2 + ","}, System.StringSplitOptions.RemoveEmptyEntries)
Dim ffmpeg_url_3 As String() = Nothing
Dim ffmpeg_url_2 As String() = ffmpeg_url_1(1).Split(New [Char]() {Chr(34)})
ffmpeg_url_3 = ffmpeg_url_2(2).Split(New [Char]() {System.Convert.ToChar("#")})
If MergeSubs = True Then
Debug.WriteLine(ConvertCC(CR_audio_locale))
URL_DL = "-i " + Chr(34) + ffmpeg_url_3(0).Trim() + Chr(34) + SoftSubMergeURLs + SoftSubMergeMaps + " " + ffmpeg_command + " -c:s " + MergeSubsFormat + SoftSubMergeMetatata + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale)
'URL_DL = "-i " + Chr(34) + ffmpeg_url_3(0).Trim() + Chr(34) + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) + " " + ffmpeg_command
Else
URL_DL = "-i " + Chr(34) + ffmpeg_url_3(0).Trim() + Chr(34) + " -metadata:s:a:0 language=" + CCtoMP4CC(CR_audio_locale) + " " + ffmpeg_command
End If
End If
End If
#Region "thumbnail"
Dim thumbnail As String() = ObjectJson.Split(New String() {"https://"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim thumbnail2 As String() = thumbnail(1).Split(New String() {Chr(34) + "}"}, System.StringSplitOptions.RemoveEmptyEntries) '(New [Char]() {"-"})
Dim thumbnail3 As String = "https://" + thumbnail2(0).Replace("\/", "/")
#End Region
#Region "<li> constructor"
Dim Subsprache3 As String = "none" 'HardSubValuesToDisplay(SubSprache2.Replace(Chr(34), ""))
Dim ResoHTMLDisplay As String = Nothing
If ResoBackString = Nothing Then
ResoHTMLDisplay = Reso.ToString + "p"
ElseIf DialogTaskString = "Language" Then
ResoHTMLDisplay = Reso.ToString + "p"
Else
Dim ResoHTML As String() = ResoBackString.Split(New String() {"x"}, System.StringSplitOptions.RemoveEmptyEntries)
If ResoHTML.Count > 1 Then
ResoHTMLDisplay = ResoHTML(1) + "p"
Else
ResoHTMLDisplay = ResoHTML(0) + "p"
End If
End If
Dim L2Name As String = String.Join(" ", CR_FilenName.Split(invalids, StringSplitOptions.RemoveEmptyEntries)).TrimEnd("."c) 'System.Text.RegularExpressions.Regex.Replace(CR_FilenName_Backup, "[^\w\\-]", " ")
If Reso = 42 And HybridMode = False Then
ResoHTMLDisplay = "[Auto]"
ElseIf Reso = 42 And HybridMode = False Then
ResoHTMLDisplay = Reso2
End If
Pfad_DL = Pfad2
Dim L1Name_Split As String() = WebsiteURL.Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim L1Name As String = L1Name_Split(1).Replace("www.", "") + " | Dub : " + HardSubValuesToDisplay(CR_audio_locale)
If SubsOnly = True Then
URL_DL = "-i [Subtitles only]"
End If
Me.Invoke(New Action(Function()
ListItemAdd(Pfad_DL, L1Name, L2Name, ResoHTMLDisplay, Subsprache3, SubValuesToDisplay(), thumbnail3, URL_DL, Pfad_DL)
Return Nothing
End Function))
liList.Add(My.Resources.htmlvorThumbnail + thumbnail3 + My.Resources.htmlnachTumbnail + CR_title + " <br> " + CR_season_title + " " + CR_episode + My.Resources.htmlvorAufloesung + ResoHTMLDisplay + My.Resources.htmlvorSoftSubs + vbNewLine + SubValuesToDisplay() + My.Resources.htmlvorHardSubs + Subsprache3 + My.Resources.htmlnachHardSubs + "<!-- " + L2Name + "-->")
'Form1.RichTextBox1.Text = My.Resources.htmlvorThumbnail + thumbnail3 + My.Resources.htmlnachTumbnail + CR_Anime_Titel + " <br> " + CR_Anime_Staffel + " " + CR_Anime_Folge + My.Resources.htmlvorAufloesung + ResoHTMLDisplay + My.Resources.htmlvorSoftSubs + vbNewLine + SubValuesToDisplay() + My.Resources.htmlvorHardSubs + Subsprache3 + My.Resources.htmlnachHardSubs + "<!-- " + L2Name + "-->"
#End Region
Grapp_RDY = True
Me.Invoke(New Action(Function()
Anime_Add.StatusLabel.Text = "Status: idle"
Me.Text = "Crunchyroll Downloader"
Me.Invalidate()
Return Nothing
End Function))
Catch ex As Exception
Me.Invoke(New Action(Function()
Anime_Add.StatusLabel.Text = "Status: idle"
Me.Text = "Crunchyroll Downloader"
Me.Invalidate()
Return Nothing
End Function))
Grapp_RDY = True
If CBool(InStr(ex.ToString, "Could not find the sub language")) Then
MsgBox(Sub_language_NotFound + SubSprache)
ElseIf CBool(InStr(ex.ToString, "RESOLUTION Not Found")) Then
MsgBox(Resolution_NotFound)
ElseIf CBool(InStr(ex.ToString, "Premium Episode")) Then
MsgBox(Premium_Stream, MsgBoxStyle.Information)
ElseIf CBool(InStr(ex.ToString, "System.UnauthorizedAccessException")) Then
MsgBox(ErrorNoPermisson + vbNewLine + ex.ToString, MsgBoxStyle.Information)
ElseIf CBool(InStr(ex.ToString, Chr(34) + "UserAbort" + Chr(34))) Then
MsgBox(ex.ToString, MsgBoxStyle.Information)
Else
MsgBox(ex.ToString, MsgBoxStyle.Information)
End If
End Try
End Sub
#End Region
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
@ -3395,12 +4103,12 @@ Public Class Main
Dim localAddr As IPAddress = IPAddress.Parse("127.0.0.1") Dim localAddr As IPAddress = IPAddress.Parse("127.0.0.1")
server = New TcpListener(localAddr, Int32.Parse(port)) server = New TcpListener(localAddr, Int32.Parse(Port))
' Start listening for client requests. ' Start listening for client requests.
server.Start() server.Start()
Debug.WriteLine("Web server started at: " & localAddr.ToString() & ":" & port) Debug.WriteLine("Web server started at: " & localAddr.ToString() & ":" & Port)
While True While True

View File

@ -44,6 +44,8 @@ Partial Class Einstellungen
Me.ComboBox1 = New MetroFramework.Controls.MetroComboBox() Me.ComboBox1 = New MetroFramework.Controls.MetroComboBox()
Me.TabPage2 = New MetroFramework.Controls.MetroTabPage() Me.TabPage2 = New MetroFramework.Controls.MetroTabPage()
Me.GroupBox12 = New System.Windows.Forms.GroupBox() Me.GroupBox12 = New System.Windows.Forms.GroupBox()
Me.KodiSupport = New MetroFramework.Controls.MetroToggle()
Me.MetroLink1 = New MetroFramework.Controls.MetroLink()
Me.DD_Episode_Prefix = New MetroFramework.Controls.MetroComboBox() Me.DD_Episode_Prefix = New MetroFramework.Controls.MetroComboBox()
Me.DD_Season_Prefix = New MetroFramework.Controls.MetroComboBox() Me.DD_Season_Prefix = New MetroFramework.Controls.MetroComboBox()
Me.CR_Filename = New MetroFramework.Controls.MetroComboBox() Me.CR_Filename = New MetroFramework.Controls.MetroComboBox()
@ -60,9 +62,12 @@ Partial Class Einstellungen
Me.ListC3 = New System.Windows.Forms.ToolStripMenuItem() Me.ListC3 = New System.Windows.Forms.ToolStripMenuItem()
Me.ListC4 = New System.Windows.Forms.ToolStripMenuItem() Me.ListC4 = New System.Windows.Forms.ToolStripMenuItem()
Me.ListC5 = New System.Windows.Forms.ToolStripMenuItem() Me.ListC5 = New System.Windows.Forms.ToolStripMenuItem()
Me.ListC6 = New System.Windows.Forms.ToolStripMenuItem()
Me.ListC7 = New System.Windows.Forms.ToolStripMenuItem()
Me.FFMPEG_CommandP2 = New System.Windows.Forms.ToolStripMenuItem() Me.FFMPEG_CommandP2 = New System.Windows.Forms.ToolStripMenuItem()
Me.ListP1 = New System.Windows.Forms.ToolStripMenuItem() Me.ListP1 = New System.Windows.Forms.ToolStripMenuItem()
Me.ListP2 = New System.Windows.Forms.ToolStripMenuItem() Me.ListP2 = New System.Windows.Forms.ToolStripMenuItem()
Me.ListP3 = New System.Windows.Forms.ToolStripMenuItem()
Me.FFMPEG_CommandP3 = New System.Windows.Forms.ToolStripMenuItem() Me.FFMPEG_CommandP3 = New System.Windows.Forms.ToolStripMenuItem()
Me.ListBit1 = New System.Windows.Forms.ToolStripMenuItem() Me.ListBit1 = New System.Windows.Forms.ToolStripMenuItem()
Me.ListBit2 = New System.Windows.Forms.ToolStripMenuItem() Me.ListBit2 = New System.Windows.Forms.ToolStripMenuItem()
@ -398,10 +403,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, 452) Me.TabPage2.Size = New System.Drawing.Size(501, 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
@ -412,6 +417,8 @@ Partial Class Einstellungen
'GroupBox12 'GroupBox12
' '
Me.GroupBox12.BackColor = System.Drawing.Color.Transparent Me.GroupBox12.BackColor = System.Drawing.Color.Transparent
Me.GroupBox12.Controls.Add(Me.KodiSupport)
Me.GroupBox12.Controls.Add(Me.MetroLink1)
Me.GroupBox12.Controls.Add(Me.DD_Episode_Prefix) Me.GroupBox12.Controls.Add(Me.DD_Episode_Prefix)
Me.GroupBox12.Controls.Add(Me.DD_Season_Prefix) Me.GroupBox12.Controls.Add(Me.DD_Season_Prefix)
Me.GroupBox12.Controls.Add(Me.CR_Filename) Me.GroupBox12.Controls.Add(Me.CR_Filename)
@ -419,11 +426,34 @@ Partial Class Einstellungen
Me.GroupBox12.ForeColor = System.Drawing.Color.Black Me.GroupBox12.ForeColor = System.Drawing.Color.Black
Me.GroupBox12.Location = New System.Drawing.Point(5, 11) Me.GroupBox12.Location = New System.Drawing.Point(5, 11)
Me.GroupBox12.Name = "GroupBox12" Me.GroupBox12.Name = "GroupBox12"
Me.GroupBox12.Size = New System.Drawing.Size(490, 126) Me.GroupBox12.Size = New System.Drawing.Size(490, 150)
Me.GroupBox12.TabIndex = 53 Me.GroupBox12.TabIndex = 53
Me.GroupBox12.TabStop = False Me.GroupBox12.TabStop = False
Me.GroupBox12.Text = "Filename" Me.GroupBox12.Text = "Filename"
' '
'KodiSupport
'
Me.KodiSupport.AutoSize = True
Me.KodiSupport.Location = New System.Drawing.Point(259, 120)
Me.KodiSupport.Name = "KodiSupport"
Me.KodiSupport.Size = New System.Drawing.Size(80, 20)
Me.KodiSupport.TabIndex = 38
Me.KodiSupport.Text = "Aus"
Me.KodiSupport.UseSelectable = True
'
'MetroLink1
'
Me.MetroLink1.FontSize = MetroFramework.MetroLinkSize.Medium
Me.MetroLink1.ForeColor = System.Drawing.Color.SteelBlue
Me.MetroLink1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.MetroLink1.Location = New System.Drawing.Point(97, 120)
Me.MetroLink1.Name = "MetroLink1"
Me.MetroLink1.Size = New System.Drawing.Size(145, 23)
Me.MetroLink1.TabIndex = 37
Me.MetroLink1.Text = "enable Kodi naming"
Me.MetroLink1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.MetroLink1.UseSelectable = True
'
'DD_Episode_Prefix 'DD_Episode_Prefix
' '
Me.DD_Episode_Prefix.DropDownHeight = 250 Me.DD_Episode_Prefix.DropDownHeight = 250
@ -433,7 +463,7 @@ Partial Class Einstellungen
Me.DD_Episode_Prefix.IntegralHeight = False Me.DD_Episode_Prefix.IntegralHeight = False
Me.DD_Episode_Prefix.ItemHeight = 23 Me.DD_Episode_Prefix.ItemHeight = 23
Me.DD_Episode_Prefix.Items.AddRange(New Object() {"[default episode prefix]"}) Me.DD_Episode_Prefix.Items.AddRange(New Object() {"[default episode prefix]"})
Me.DD_Episode_Prefix.Location = New System.Drawing.Point(248, 79) Me.DD_Episode_Prefix.Location = New System.Drawing.Point(248, 70)
Me.DD_Episode_Prefix.Name = "DD_Episode_Prefix" Me.DD_Episode_Prefix.Name = "DD_Episode_Prefix"
Me.DD_Episode_Prefix.Size = New System.Drawing.Size(225, 29) Me.DD_Episode_Prefix.Size = New System.Drawing.Size(225, 29)
Me.DD_Episode_Prefix.TabIndex = 36 Me.DD_Episode_Prefix.TabIndex = 36
@ -448,7 +478,7 @@ Partial Class Einstellungen
Me.DD_Season_Prefix.IntegralHeight = False Me.DD_Season_Prefix.IntegralHeight = False
Me.DD_Season_Prefix.ItemHeight = 23 Me.DD_Season_Prefix.ItemHeight = 23
Me.DD_Season_Prefix.Items.AddRange(New Object() {"[default season prefix]"}) Me.DD_Season_Prefix.Items.AddRange(New Object() {"[default season prefix]"})
Me.DD_Season_Prefix.Location = New System.Drawing.Point(6, 79) Me.DD_Season_Prefix.Location = New System.Drawing.Point(6, 70)
Me.DD_Season_Prefix.Name = "DD_Season_Prefix" Me.DD_Season_Prefix.Name = "DD_Season_Prefix"
Me.DD_Season_Prefix.Size = New System.Drawing.Size(225, 29) Me.DD_Season_Prefix.Size = New System.Drawing.Size(225, 29)
Me.DD_Season_Prefix.TabIndex = 35 Me.DD_Season_Prefix.TabIndex = 35
@ -462,7 +492,7 @@ Partial Class Einstellungen
Me.CR_Filename.IntegralHeight = False Me.CR_Filename.IntegralHeight = False
Me.CR_Filename.ItemHeight = 23 Me.CR_Filename.ItemHeight = 23
Me.CR_Filename.Items.AddRange(New Object() {"[episode number]", "[episode name]", "[episode number] [episode name]", "[episode name] [episode number]"}) Me.CR_Filename.Items.AddRange(New Object() {"[episode number]", "[episode name]", "[episode number] [episode name]", "[episode name] [episode number]"})
Me.CR_Filename.Location = New System.Drawing.Point(6, 25) Me.CR_Filename.Location = New System.Drawing.Point(6, 27)
Me.CR_Filename.Name = "CR_Filename" Me.CR_Filename.Name = "CR_Filename"
Me.CR_Filename.Size = New System.Drawing.Size(467, 29) Me.CR_Filename.Size = New System.Drawing.Size(467, 29)
Me.CR_Filename.TabIndex = 34 Me.CR_Filename.TabIndex = 34
@ -475,7 +505,7 @@ Partial Class Einstellungen
Me.GroupBox4.Controls.Add(Me.CB_Format) Me.GroupBox4.Controls.Add(Me.CB_Format)
Me.GroupBox4.Font = New System.Drawing.Font("Arial", 9.75!) Me.GroupBox4.Font = New System.Drawing.Font("Arial", 9.75!)
Me.GroupBox4.ForeColor = System.Drawing.Color.Black Me.GroupBox4.ForeColor = System.Drawing.Color.Black
Me.GroupBox4.Location = New System.Drawing.Point(5, 205) Me.GroupBox4.Location = New System.Drawing.Point(5, 230)
Me.GroupBox4.Name = "GroupBox4" Me.GroupBox4.Name = "GroupBox4"
Me.GroupBox4.Size = New System.Drawing.Size(490, 78) Me.GroupBox4.Size = New System.Drawing.Size(490, 78)
Me.GroupBox4.TabIndex = 42 Me.GroupBox4.TabIndex = 42
@ -512,7 +542,7 @@ Partial Class Einstellungen
Me.CheckBox1.BackColor = System.Drawing.Color.Transparent Me.CheckBox1.BackColor = System.Drawing.Color.Transparent
Me.CheckBox1.FontSize = MetroFramework.MetroCheckBoxSize.Medium Me.CheckBox1.FontSize = MetroFramework.MetroCheckBoxSize.Medium
Me.CheckBox1.ForeColor = System.Drawing.Color.Black Me.CheckBox1.ForeColor = System.Drawing.Color.Black
Me.CheckBox1.Location = New System.Drawing.Point(67, 295) Me.CheckBox1.Location = New System.Drawing.Point(67, 320)
Me.CheckBox1.Name = "CheckBox1" Me.CheckBox1.Name = "CheckBox1"
Me.CheckBox1.Size = New System.Drawing.Size(369, 19) Me.CheckBox1.Size = New System.Drawing.Size(369, 19)
Me.CheckBox1.TabIndex = 6 Me.CheckBox1.TabIndex = 6
@ -526,7 +556,7 @@ Partial Class Einstellungen
Me.GroupBox2.Enabled = False Me.GroupBox2.Enabled = False
Me.GroupBox2.Font = New System.Drawing.Font("Arial", 9.75!) Me.GroupBox2.Font = New System.Drawing.Font("Arial", 9.75!)
Me.GroupBox2.ForeColor = System.Drawing.Color.Black Me.GroupBox2.ForeColor = System.Drawing.Color.Black
Me.GroupBox2.Location = New System.Drawing.Point(5, 325) Me.GroupBox2.Location = New System.Drawing.Point(5, 350)
Me.GroupBox2.Name = "GroupBox2" Me.GroupBox2.Name = "GroupBox2"
Me.GroupBox2.Size = New System.Drawing.Size(490, 63) Me.GroupBox2.Size = New System.Drawing.Size(490, 63)
Me.GroupBox2.TabIndex = 40 Me.GroupBox2.TabIndex = 40
@ -554,7 +584,7 @@ Partial Class Einstellungen
' '
'FFMPEG_CommandP1 'FFMPEG_CommandP1
' '
Me.FFMPEG_CommandP1.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ListC1, Me.ListC2, Me.ListC3, Me.ListC4, Me.ListC5}) Me.FFMPEG_CommandP1.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ListC1, Me.ListC2, Me.ListC3, Me.ListC4, Me.ListC5, Me.ListC6, Me.ListC7})
Me.FFMPEG_CommandP1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.FFMPEG_CommandP1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.FFMPEG_CommandP1.Name = "FFMPEG_CommandP1" Me.FFMPEG_CommandP1.Name = "FFMPEG_CommandP1"
Me.FFMPEG_CommandP1.Size = New System.Drawing.Size(64, 20) Me.FFMPEG_CommandP1.Size = New System.Drawing.Size(64, 20)
@ -590,9 +620,21 @@ Partial Class Einstellungen
Me.ListC5.Size = New System.Drawing.Size(174, 22) Me.ListC5.Size = New System.Drawing.Size(174, 22)
Me.ListC5.Text = "-c:v libx265" Me.ListC5.Text = "-c:v libx265"
' '
'ListC6
'
Me.ListC6.Name = "ListC6"
Me.ListC6.Size = New System.Drawing.Size(174, 22)
Me.ListC6.Text = "-c:v h264_amf"
'
'ListC7
'
Me.ListC7.Name = "ListC7"
Me.ListC7.Size = New System.Drawing.Size(174, 22)
Me.ListC7.Text = "-c:v hevc_amf"
'
'FFMPEG_CommandP2 'FFMPEG_CommandP2
' '
Me.FFMPEG_CommandP2.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ListP1, Me.ListP2}) Me.FFMPEG_CommandP2.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ListP1, Me.ListP2, Me.ListP3})
Me.FFMPEG_CommandP2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.FFMPEG_CommandP2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.FFMPEG_CommandP2.Name = "FFMPEG_CommandP2" Me.FFMPEG_CommandP2.Name = "FFMPEG_CommandP2"
Me.FFMPEG_CommandP2.Size = New System.Drawing.Size(86, 20) Me.FFMPEG_CommandP2.Size = New System.Drawing.Size(86, 20)
@ -610,6 +652,12 @@ Partial Class Einstellungen
Me.ListP2.Size = New System.Drawing.Size(148, 22) Me.ListP2.Size = New System.Drawing.Size(148, 22)
Me.ListP2.Text = "-preset slow" Me.ListP2.Text = "-preset slow"
' '
'ListP3
'
Me.ListP3.Name = "ListP3"
Me.ListP3.Size = New System.Drawing.Size(148, 22)
Me.ListP3.Text = "[no Preset]"
'
'FFMPEG_CommandP3 'FFMPEG_CommandP3
' '
Me.FFMPEG_CommandP3.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ListBit1, Me.ListBit2, Me.ListBit3, Me.ListBit4, Me.ListBit5, Me.ListBit6, Me.ListBit7}) Me.FFMPEG_CommandP3.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ListBit1, Me.ListBit2, Me.ListBit3, Me.ListBit4, Me.ListBit5, Me.ListBit6, Me.ListBit7})
@ -678,7 +726,7 @@ Partial Class Einstellungen
Me.GB_Resolution.Controls.Add(Me.A1080p) Me.GB_Resolution.Controls.Add(Me.A1080p)
Me.GB_Resolution.Font = New System.Drawing.Font("Arial", 9.75!) Me.GB_Resolution.Font = New System.Drawing.Font("Arial", 9.75!)
Me.GB_Resolution.ForeColor = System.Drawing.Color.Black Me.GB_Resolution.ForeColor = System.Drawing.Color.Black
Me.GB_Resolution.Location = New System.Drawing.Point(5, 140) Me.GB_Resolution.Location = New System.Drawing.Point(5, 165)
Me.GB_Resolution.Name = "GB_Resolution" Me.GB_Resolution.Name = "GB_Resolution"
Me.GB_Resolution.Size = New System.Drawing.Size(490, 59) Me.GB_Resolution.Size = New System.Drawing.Size(490, 59)
Me.GB_Resolution.TabIndex = 38 Me.GB_Resolution.TabIndex = 38
@ -763,10 +811,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, 44) Me.TabPage1.Location = New System.Drawing.Point(4, 35)
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(501, 452) Me.TabPage1.Size = New System.Drawing.Size(501, 461)
Me.TabPage1.TabIndex = 0 Me.TabPage1.TabIndex = 0
Me.TabPage1.Text = " Main" Me.TabPage1.Text = " Main"
Me.TabPage1.VerticalScrollbar = True Me.TabPage1.VerticalScrollbar = True
@ -984,7 +1032,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 = 4 Me.TabControl1.SelectedIndex = 5
Me.TabControl1.Size = New System.Drawing.Size(509, 500) Me.TabControl1.Size = New System.Drawing.Size(509, 500)
Me.TabControl1.TabIndex = 38 Me.TabControl1.TabIndex = 38
Me.TabControl1.UseSelectable = True Me.TabControl1.UseSelectable = True
@ -998,9 +1046,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, 452) Me.MetroTabPage1.Size = New System.Drawing.Size(501, 461)
Me.MetroTabPage1.TabIndex = 7 Me.MetroTabPage1.TabIndex = 7
Me.MetroTabPage1.Text = "Crunchyroll" Me.MetroTabPage1.Text = "Crunchyroll"
Me.MetroTabPage1.VerticalScrollbarBarColor = True Me.MetroTabPage1.VerticalScrollbarBarColor = True
@ -1018,10 +1066,10 @@ Partial Class Einstellungen
Me.TabPage6.HorizontalScrollbarBarColor = True Me.TabPage6.HorizontalScrollbarBarColor = True
Me.TabPage6.HorizontalScrollbarHighlightOnWheel = False Me.TabPage6.HorizontalScrollbarHighlightOnWheel = False
Me.TabPage6.HorizontalScrollbarSize = 10 Me.TabPage6.HorizontalScrollbarSize = 10
Me.TabPage6.Location = New System.Drawing.Point(4, 44) Me.TabPage6.Location = New System.Drawing.Point(4, 35)
Me.TabPage6.Name = "TabPage6" Me.TabPage6.Name = "TabPage6"
Me.TabPage6.Padding = New System.Windows.Forms.Padding(3) Me.TabPage6.Padding = New System.Windows.Forms.Padding(3)
Me.TabPage6.Size = New System.Drawing.Size(501, 452) Me.TabPage6.Size = New System.Drawing.Size(501, 461)
Me.TabPage6.TabIndex = 4 Me.TabPage6.TabIndex = 4
Me.TabPage6.Text = "Funimation" Me.TabPage6.Text = "Funimation"
Me.TabPage6.VerticalScrollbarBarColor = True Me.TabPage6.VerticalScrollbarBarColor = True
@ -1217,9 +1265,9 @@ Partial Class Einstellungen
' '
Me.TabPage8.BackColor = System.Drawing.Color.Transparent Me.TabPage8.BackColor = System.Drawing.Color.Transparent
Me.TabPage8.Controls.Add(Me.GroupBox8) Me.TabPage8.Controls.Add(Me.GroupBox8)
Me.TabPage8.Location = New System.Drawing.Point(4, 44) Me.TabPage8.Location = New System.Drawing.Point(4, 35)
Me.TabPage8.Name = "TabPage8" Me.TabPage8.Name = "TabPage8"
Me.TabPage8.Size = New System.Drawing.Size(501, 452) Me.TabPage8.Size = New System.Drawing.Size(501, 461)
Me.TabPage8.TabIndex = 6 Me.TabPage8.TabIndex = 6
Me.TabPage8.Text = " AoD" Me.TabPage8.Text = " AoD"
' '
@ -1289,9 +1337,9 @@ 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(501, 452)
Me.TabPage7.TabIndex = 5 Me.TabPage7.TabIndex = 5
Me.TabPage7.Text = "About " Me.TabPage7.Text = "About "
' '
@ -1435,6 +1483,7 @@ Partial Class Einstellungen
Me.TabPage2.ResumeLayout(False) Me.TabPage2.ResumeLayout(False)
Me.TabPage2.PerformLayout() Me.TabPage2.PerformLayout()
Me.GroupBox12.ResumeLayout(False) Me.GroupBox12.ResumeLayout(False)
Me.GroupBox12.PerformLayout()
Me.GroupBox4.ResumeLayout(False) Me.GroupBox4.ResumeLayout(False)
Me.GroupBox4.PerformLayout() Me.GroupBox4.PerformLayout()
Me.GroupBox2.ResumeLayout(False) Me.GroupBox2.ResumeLayout(False)
@ -1578,4 +1627,9 @@ Partial Class Einstellungen
Friend WithEvents CB_Format As MetroFramework.Controls.MetroComboBox Friend WithEvents CB_Format As MetroFramework.Controls.MetroComboBox
Friend WithEvents HybridMode_CB As MetroFramework.Controls.MetroCheckBox Friend WithEvents HybridMode_CB As MetroFramework.Controls.MetroCheckBox
Friend WithEvents MetroTabPage1 As MetroFramework.Controls.MetroTabPage Friend WithEvents MetroTabPage1 As MetroFramework.Controls.MetroTabPage
Friend WithEvents ListC6 As ToolStripMenuItem
Friend WithEvents ListC7 As ToolStripMenuItem
Friend WithEvents ListP3 As ToolStripMenuItem
Friend WithEvents KodiSupport As MetroFramework.Controls.MetroToggle
Friend WithEvents MetroLink1 As MetroFramework.Controls.MetroLink
End Class End Class

View File

@ -126,9 +126,6 @@
<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="BackgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="BackgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>332, 20</value> <value>332, 20</value>
</metadata> </metadata>

View File

@ -13,10 +13,11 @@ Public Class Einstellungen
Inherits MetroForm Inherits MetroForm
Dim Manager As MetroStyleManager = Main.Manager Dim Manager As MetroStyleManager = Main.Manager
Dim LastVersionString As String = "v3.8-Beta"
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 + " Beta-U3" Label6.Text = "You have: v" + Application.ProductVersion.ToString + " Beta-U6"
BackgroundWorker1.RunWorkerAsync() BackgroundWorker1.RunWorkerAsync()
@ -27,6 +28,9 @@ Public Class Einstellungen
Manager.Owner = Me Manager.Owner = Me
Me.StyleManager = Manager Me.StyleManager = Manager
If Main.KodiNaming = True Then
KodiSupport.Checked = True
End If
If Main.DarkModeValue = True Then If Main.DarkModeValue = True Then
DarkMode.Checked = True DarkMode.Checked = True
@ -230,7 +234,23 @@ Public Class Einstellungen
If InStr(Main.ffmpeg_command, "-c copy") Then If InStr(Main.ffmpeg_command, "-c copy") Then
FFMPEG_CommandP1.Text = "-c copy" FFMPEG_CommandP1.Text = "-c copy"
FFMPEG_CommandP4.Text = "-c:a copy -bsf:a aac_adtstoasc" FFMPEG_CommandP4.Text = "-c:a copy -bsf:a aac_adtstoasc"
ElseIf InStr(Main.ffmpeg_command, "-c:a copy ") Then
Dim ffmpegDisplayCurrent As String() = Main.ffmpeg_command.Split(New String() {" "}, System.StringSplitOptions.RemoveEmptyEntries)
If ffmpegDisplayCurrent.Count > 8 Then
FFMPEG_CommandP1.Text = ffmpegDisplayCurrent(0) + " " + ffmpegDisplayCurrent(1)
FFMPEG_CommandP2.Text = ffmpegDisplayCurrent(2) + " " + ffmpegDisplayCurrent(3)
FFMPEG_CommandP3.Text = ffmpegDisplayCurrent(4) + " " + ffmpegDisplayCurrent(5)
FFMPEG_CommandP4.Text = "-c:a copy -bsf:a aac_adtstoasc"
Else Else
FFMPEG_CommandP1.Text = ffmpegDisplayCurrent(0) + " " + ffmpegDisplayCurrent(1)
FFMPEG_CommandP2.Text = "[no Preset]"
FFMPEG_CommandP3.Text = ffmpegDisplayCurrent(2) + " " + ffmpegDisplayCurrent(3)
FFMPEG_CommandP4.Text = "-c:a copy -bsf:a aac_adtstoasc"
End If
Else
Dim ffmpegDisplayCurrent As String() = Main.ffmpeg_command.Split(New String() {" "}, System.StringSplitOptions.RemoveEmptyEntries) Dim ffmpegDisplayCurrent As String() = Main.ffmpeg_command.Split(New String() {" "}, System.StringSplitOptions.RemoveEmptyEntries)
FFMPEG_CommandP1.Text = ffmpegDisplayCurrent(0) + " " + ffmpegDisplayCurrent(1) FFMPEG_CommandP1.Text = ffmpegDisplayCurrent(0) + " " + ffmpegDisplayCurrent(1)
FFMPEG_CommandP2.Text = ffmpegDisplayCurrent(2) + " " + ffmpegDisplayCurrent(3) FFMPEG_CommandP2.Text = ffmpegDisplayCurrent(2) + " " + ffmpegDisplayCurrent(3)
@ -322,6 +342,13 @@ Public Class Einstellungen
End If End If
If KodiSupport.Checked = True Then
Main.KodiNaming = True
rk.SetValue("KodiSupport", 1, RegistryValueKind.String)
Else
Main.KodiNaming = False
rk.SetValue("KodiSupport", 0, RegistryValueKind.String)
End If
' MsgBox(Name_season.Text) ' MsgBox(Name_season.Text)
If InStr(TextBox1.Text, "https://") Then If InStr(TextBox1.Text, "https://") Then
@ -599,6 +626,9 @@ Public Class Einstellungen
Dim ffpmeg_cmd As String = Nothing Dim ffpmeg_cmd As String = Nothing
If FFMPEG_CommandP1.Text = "-c copy" Then If FFMPEG_CommandP1.Text = "-c copy" Then
ffpmeg_cmd = " " + FFMPEG_CommandP1.Text + " " + FFMPEG_CommandP4.Text ffpmeg_cmd = " " + FFMPEG_CommandP1.Text + " " + FFMPEG_CommandP4.Text
ElseIf FFMPEG_CommandP2.Text = "[no Preset]" Then
ffpmeg_cmd = " " + FFMPEG_CommandP1.Text + " " + FFMPEG_CommandP3.Text + " " + FFMPEG_CommandP4.Text
Else Else
ffpmeg_cmd = " " + FFMPEG_CommandP1.Text + " " + FFMPEG_CommandP2.Text + " " + FFMPEG_CommandP3.Text + " " + FFMPEG_CommandP4.Text ffpmeg_cmd = " " + FFMPEG_CommandP1.Text + " " + FFMPEG_CommandP2.Text + " " + FFMPEG_CommandP3.Text + " " + FFMPEG_CommandP4.Text
@ -798,7 +828,7 @@ Public Class Einstellungen
End If End If
End Sub End Sub
Private Sub ListC1_Click(sender As Object, e As EventArgs) Handles ListC1.Click, ListC2.Click, ListC3.Click, ListC4.Click, ListC5.Click Private Sub ListC1_Click(sender As Object, e As EventArgs) Handles ListC1.Click, ListC2.Click, ListC3.Click, ListC4.Click, ListC5.Click, ListC6.Click, ListC7.Click
Dim Button As ToolStripMenuItem = sender Dim Button As ToolStripMenuItem = sender
If Button.Text = "-c copy" Then If Button.Text = "-c copy" Then
FFMPEG_CommandP1.Text = "-c copy" FFMPEG_CommandP1.Text = "-c copy"
@ -812,7 +842,7 @@ Public Class Einstellungen
End Sub End Sub
Private Sub ListP1_Click(sender As Object, e As EventArgs) Handles ListP1.Click, ListP2.Click Private Sub ListP1_Click(sender As Object, e As EventArgs) Handles ListP1.Click, ListP2.Click, ListP3.Click
Dim Button As ToolStripMenuItem = sender Dim Button As ToolStripMenuItem = sender
FFMPEG_CommandP2.Text = Button.Text FFMPEG_CommandP2.Text = Button.Text
FFMPEG_CommandP2.Enabled = True FFMPEG_CommandP2.Enabled = True
@ -932,10 +962,9 @@ Public Class Einstellungen
Dim GitHubLastTag() As String = str0.Split(New String() {Chr(34) + "tag_name" + Chr(34) + ": " + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) 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) Dim GitHubLastTag1() As String = GitHubLastTag(LastNonPreRelase).Split(New String() {Chr(34) + ","}, System.StringSplitOptions.RemoveEmptyEntries)
Me.Invoke(New Action(Function() LastVersionString = GitHubLastTag1(0)
LastVersion.Text = "last release: " + GitHubLastTag1(0)
Return Nothing 'Debug.WriteLine(GitHubLastTag1(0))
End Function))
Catch ex As Exception Catch ex As Exception
Debug.WriteLine(ex.ToString) Debug.WriteLine(ex.ToString)
@ -1110,6 +1139,19 @@ Public Class Einstellungen
End If End If
End Sub End Sub
Private Sub MetroLink1_Click(sender As Object, e As EventArgs) Handles MetroLink1.Click
Process.Start("https://github.com/hama3254/Crunchyroll-Downloader-v3.0/discussions/276")
End Sub
Private Sub TabPage7_Enter(sender As Object, e As EventArgs) Handles TabPage7.Enter
LastVersion.Text = "last release: " + LastVersionString
End Sub
#End Region #End Region