2020-06-10 17:34:27 +02:00
Imports Gecko . Events
2019-11-10 00:16:12 +01:00
Imports Microsoft . Win32
Imports System . Net
2020-06-10 17:34:27 +02:00
Imports System . IO
Imports System . Text
2020-08-16 23:27:48 +02:00
Imports System . Threading
2020-11-13 15:57:34 +01:00
Imports MetroFramework . Forms
Imports MetroFramework
Imports MetroFramework . Components
2021-02-12 13:44:17 +01:00
Imports System . Text . RegularExpressions
2019-11-10 00:16:12 +01:00
2020-12-02 21:01:30 +01:00
Public Class Einstellungen
2020-11-13 15:57:34 +01:00
Inherits MetroForm
2020-12-10 19:18:20 +01:00
Dim Manager As MetroStyleManager = Main . Manager
2021-05-23 22:27:56 +02:00
Dim LastVersionString As String = " v3.8-Beta "
2020-12-10 19:18:20 +01:00
2020-12-02 21:01:30 +01:00
Private Sub Einstellungen_Load ( sender As Object , e As EventArgs ) Handles MyBase . Load
2021-01-14 18:06:42 +01:00
2021-06-04 15:25:59 +02:00
Label6 . Text = " You have: v " + Application . ProductVersion . ToString + " Beta-U7 "
2021-01-16 14:08:33 +01:00
BackgroundWorker1 . RunWorkerAsync ( )
2021-01-14 18:06:42 +01:00
'CR_Anime_Folge = CR_Name_Staffel0_Folge1(1)
'If GitHubLastTag1(0)
2020-12-10 19:18:20 +01:00
2020-12-08 19:01:35 +01:00
Manager . Owner = Me
2020-12-10 19:18:20 +01:00
Me . StyleManager = Manager
2021-05-23 22:27:56 +02:00
If Main . KodiNaming = True Then
KodiSupport . Checked = True
End If
2020-12-08 19:01:35 +01:00
2020-12-10 19:18:20 +01:00
If Main . DarkModeValue = True Then
DarkMode . Checked = True
GroupBoxColor ( Color . FromArgb ( 150 , 150 , 150 ) )
pictureBox1 . Image = Main . CloseImg
Else
GroupBoxColor ( Color . FromArgb ( 0 , 0 , 0 ) )
DarkMode . Checked = False
End If
2020-12-08 19:01:35 +01:00
2020-11-13 15:57:34 +01:00
TabControl1 . SelectedIndex = 0
2020-02-02 16:39:54 +01:00
For i As Integer = 0 To Main . SoftSubs . Count - 1
If Main . SoftSubs ( i ) = " deDE " Then
CBdeDE . Checked = True
ElseIf Main . SoftSubs ( i ) = " enUS " Then
CBenUS . Checked = True
ElseIf Main . SoftSubs ( i ) = " ptBR " Then
CBptBR . Checked = True
ElseIf Main . SoftSubs ( i ) = " esLA " Then
CBesLA . Checked = True
ElseIf Main . SoftSubs ( i ) = " frFR " Then
CBfrFR . Checked = True
ElseIf Main . SoftSubs ( i ) = " arME " Then
CBarME . Checked = True
ElseIf Main . SoftSubs ( i ) = " ruRU " Then
CBruRU . Checked = True
ElseIf Main . SoftSubs ( i ) = " itIT " Then
CBitIT . Checked = True
ElseIf Main . SoftSubs ( i ) = " esES " Then
CBesES . Checked = True
End If
Next
2020-11-19 22:28:42 +01:00
For i As Integer = 0 To Main . SubFunimation . Count - 1
If Main . SubFunimation ( i ) = " en " Then
CB_fun_eng . Checked = True
ElseIf Main . SubFunimation ( i ) = " es " Then
CB_fun_es . Checked = True
ElseIf Main . SubFunimation ( i ) = " pt " Then
CB_fun_ptbr . Checked = True
End If
'If Main.SubFunimation(i) = "en" Then
' RB_eng.Checked = True
'ElseIf Main.SubFunimation(i) = "es" Then
' RB_es.Checked = True
'ElseIf Main.SubFunimation(i) = "pt" Then
' RB_pt.Checked = True
'End If
Next
2020-11-21 14:56:27 +01:00
If Main . CR_NameMethode = 0 Then
CR_Filename . SelectedIndex = 0
ElseIf Main . CR_NameMethode = 1 Then
CR_Filename . SelectedIndex = 1
ElseIf Main . CR_NameMethode = 2 Then
CR_Filename . SelectedIndex = 2
2021-02-07 13:47:30 +01:00
ElseIf Main . CR_NameMethode = 3 Then
CR_Filename . SelectedIndex = 3
2020-11-21 14:56:27 +01:00
Else
CR_Filename . SelectedIndex = 0
End If
2019-11-10 00:16:12 +01:00
Me . Location = New Point ( Main . Location . X + Main . Width / 2 - Me . Width / 2 , Main . Location . Y + Main . Height / 2 - Me . Height / 2 )
2020-11-13 15:57:34 +01:00
Try
Me . Icon = My . Resources . icon
Catch ex As Exception
End Try
2021-03-08 21:08:26 +01:00
If Main . MergeSubs = True Then
2020-02-02 16:39:54 +01:00
MergeMP4 . Checked = True
End If
2020-09-30 18:19:31 +02:00
If Main . HybridMode = True Then
HybridMode_CB . Checked = True
End If
2020-11-21 14:56:27 +01:00
If Main . Funimation_srt = True Then
CB_srt . Checked = True
Else
CB_srt . Checked = False
End If
If Main . Funimation_vtt = True Then
CB_vtt . Checked = True
Else
CB_vtt . Checked = False
End If
If Main . Funimation_dfxp = True Then
CB_dfxp . Checked = True
Else
CB_dfxp . Checked = False
End If
2020-11-19 22:28:42 +01:00
If Main . HardSubFunimation = " en " Then
CB_Fun_HardSubs . SelectedItem = " English "
ElseIf Main . HardSubFunimation = " pt " Then
CB_Fun_HardSubs . SelectedItem = " Português (Brasil) "
ElseIf Main . HardSubFunimation = " es " Then
CB_Fun_HardSubs . SelectedItem = " Español (LA) "
Else
CB_Fun_HardSubs . SelectedItem = " Disabled "
'FunimationHardsub.Checked = True
End If
2021-03-08 21:08:26 +01:00
If Main . VideoFormat = " .mkv " Then
CB_Format . SelectedItem = " MKV "
2021-06-04 15:25:59 +02:00
ElseIf Main . VideoFormat = " .aac " Then
CB_Format . SelectedItem = " AAC (Audio only) "
2021-03-08 21:08:26 +01:00
Else
CB_Format . SelectedItem = " MP4 "
End If
2020-11-19 22:28:42 +01:00
If Main . DubFunimation = " english " Then
Fun_Dub_Over . SelectedItem = " english "
ElseIf Main . DubFunimation = " japanese " Then
Fun_Dub_Over . SelectedItem = " japanese "
ElseIf Main . DubFunimation = " portuguese(Brazil) " Then
Fun_Dub_Over . SelectedItem = " portuguese(Brazil) "
ElseIf Main . DubFunimation = " spanish(Mexico) " Then
Fun_Dub_Over . SelectedItem = " spanish(Mexico) "
Else
Fun_Dub_Over . SelectedItem = " Disabled "
2020-06-10 17:34:27 +02:00
End If
2020-09-30 18:19:31 +02:00
2021-03-08 21:08:26 +01:00
2019-11-10 00:16:12 +01:00
Try
GB_Resolution . Text = Main . GB_Resolution_Text
GB_SubLanguage . Text = Main . GB_SubLanguage_Text
DL_Count_simultaneous . Text = Main . DL_Count_simultaneousText
Catch ex As Exception
End Try
2020-11-13 15:57:34 +01:00
If Main . Reso = 1080 Then
2019-11-10 00:16:12 +01:00
A1080p . Checked = True
2020-11-13 15:57:34 +01:00
ElseIf Main . Reso = 720 Then
2019-11-10 00:16:12 +01:00
A720p . Checked = True
2020-11-13 15:57:34 +01:00
ElseIf Main . Reso = 480 Then
2019-11-10 00:16:12 +01:00
A480p . Checked = True
2020-11-13 15:57:34 +01:00
ElseIf Main . Reso = 360 Then
2019-11-10 00:16:12 +01:00
A360p . Checked = True
2020-11-13 15:57:34 +01:00
ElseIf Main . Reso = 42 Then
2019-12-29 16:44:16 +01:00
AAuto . Checked = True
2019-11-10 00:16:12 +01:00
End If
2020-11-13 15:57:34 +01:00
If Main . AoD_Reso = 1080 Then
AoD_1080_Plus . Checked = True
ElseIf Main . AoD_Reso = 576 Then
AoD_576p . Checked = True
ElseIf Main . AoD_Reso = 0 Then
AoD_0p . Checked = True
End If
2020-06-10 17:34:27 +02:00
2019-11-10 00:16:12 +01:00
If Check_CB ( ) = False Then
ComboBox1 . Items . Add ( Main . CB_SuB_Nothing )
End If
If Main . SubSprache = " deDE " Then
ComboBox1 . SelectedItem = " Deutsch "
ElseIf Main . SubSprache = " enUS " Then
ComboBox1 . SelectedItem = " English "
ElseIf Main . SubSprache = " ptBR " Then
ComboBox1 . SelectedItem = " Português (Brasil) "
ElseIf Main . SubSprache = " esLA " Then
ComboBox1 . SelectedItem = " Español (LA) "
ElseIf Main . SubSprache = " frFR " Then
ComboBox1 . SelectedItem = " Français (France) "
ElseIf Main . SubSprache = " arME " Then
ComboBox1 . SelectedItem = " العربية (Arabic) "
ElseIf Main . SubSprache = " ruRU " Then
ComboBox1 . SelectedItem = " Русский (Russian) "
ElseIf Main . SubSprache = " itIT " Then
ComboBox1 . SelectedItem = " Italiano (Italian) "
ElseIf Main . SubSprache = " esES " Then
ComboBox1 . SelectedItem = " Español (España) "
Else
ComboBox1 . SelectedItem = Main . CB_SuB_Nothing
End If
2020-12-02 21:01:30 +01:00
2021-02-07 13:47:30 +01:00
If DD_Season_Prefix . Items . Contains ( Main . Season_Prefix ) Then
DD_Season_Prefix . SelectedItem = Main . Season_Prefix
Else
DD_Season_Prefix . Items . Add ( Main . Season_Prefix )
DD_Season_Prefix . SelectedItem = Main . Season_Prefix
End If
If DD_Episode_Prefix . Items . Contains ( Main . Episode_Prefix ) Then
DD_Episode_Prefix . SelectedItem = Main . Episode_Prefix
Else
DD_Episode_Prefix . Items . Add ( Main . Episode_Prefix )
DD_Episode_Prefix . SelectedItem = Main . Episode_Prefix
End If
2020-11-05 20:43:52 +01:00
NumericUpDown2 . Value = Main . ErrorTolerance
2019-11-10 00:16:12 +01:00
NumericUpDown1 . Value = Main . MaxDL
2019-12-22 16:15:17 +01:00
TextBox1 . Text = Main . Startseite
2020-02-12 22:08:02 +01:00
2020-04-01 20:55:47 +02:00
If InStr ( Main . ffmpeg_command , " -c copy " ) Then
FFMPEG_CommandP1 . Text = " -c copy "
2021-03-24 17:30:00 +01:00
FFMPEG_CommandP4 . Text = " -c:a copy -bsf:a aac_adtstoasc "
2021-05-23 22:27:56 +02:00
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
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
2020-02-12 22:08:02 +01:00
Else
2021-05-23 22:27:56 +02:00
2020-04-01 20:55:47 +02:00
Dim ffmpegDisplayCurrent As String ( ) = Main . ffmpeg_command . Split ( New String ( ) { " " } , System . StringSplitOptions . RemoveEmptyEntries )
FFMPEG_CommandP1 . Text = ffmpegDisplayCurrent ( 0 ) + " " + ffmpegDisplayCurrent ( 1 )
FFMPEG_CommandP2 . Text = ffmpegDisplayCurrent ( 2 ) + " " + ffmpegDisplayCurrent ( 3 )
FFMPEG_CommandP3 . Text = ffmpegDisplayCurrent ( 4 ) + " " + ffmpegDisplayCurrent ( 5 )
2021-03-24 17:30:00 +01:00
FFMPEG_CommandP4 . Text = " -c:a copy -bsf:a aac_adtstoasc "
2020-02-12 22:08:02 +01:00
End If
2020-04-01 20:55:47 +02:00
2020-09-30 18:19:31 +02:00
2020-02-28 16:28:38 +01:00
Try
Dim rkg As RegistryKey = Registry . CurrentUser . OpenSubKey ( " Software\CRDownloader " )
ListViewAdd_True . Checked = CBool ( Integer . Parse ( rkg . GetValue ( " QueueMode " ) . ToString ) )
Catch ex As Exception
End Try
2020-08-16 23:27:48 +02:00
Try
Dim rkg As RegistryKey = Registry . CurrentUser . OpenSubKey ( " Software\CRDownloader " )
2021-02-12 13:44:17 +01:00
Dim ServerSetting As String = rkg . GetValue ( " ServerPort " ) . ToString
If ServerSetting = 0 Then
http_support . Text = " add-on support disabled "
Else
http_support . Text = ServerSetting
End If
2020-08-16 23:27:48 +02:00
Catch ex As Exception
2021-02-28 13:22:00 +01:00
http_support . Text = " add-on support disabled "
2020-08-16 23:27:48 +02:00
End Try
2021-02-20 18:25:49 +01:00
If Main . DefaultSubFunimation = " en " Then
FunSubDef . SelectedItem = " English "
ElseIf Main . DefaultSubFunimation = " pt " Then
FunSubDef . SelectedItem = " Português (Brasil) "
ElseIf Main . DefaultSubFunimation = " es " Then
FunSubDef . SelectedItem = " Español (LA) "
Else
FunSubDef . SelectedItem = " [Disabled] "
'FunimationHardsub.Checked = True
End If
If Main . DefaultSubCR = " deDE " Then
CR_SoftSubDefault . SelectedItem = " Deutsch "
ElseIf Main . DefaultSubCR = " enUS " Then
CR_SoftSubDefault . SelectedItem = " English "
ElseIf Main . DefaultSubCR = " ptBR " Then
CR_SoftSubDefault . SelectedItem = " Português (Brasil) "
ElseIf Main . DefaultSubCR = " esLA " Then
CR_SoftSubDefault . SelectedItem = " Español (LA) "
ElseIf Main . DefaultSubCR = " frFR " Then
CR_SoftSubDefault . SelectedItem = " Français (France) "
ElseIf Main . DefaultSubCR = " arME " Then
CR_SoftSubDefault . SelectedItem = " العربية (Arabic) "
ElseIf Main . DefaultSubCR = " ruRU " Then
CR_SoftSubDefault . SelectedItem = " Русский (Russian) "
ElseIf Main . DefaultSubCR = " itIT " Then
CR_SoftSubDefault . SelectedItem = " Italiano (Italian) "
ElseIf Main . DefaultSubCR = " esES " Then
CR_SoftSubDefault . SelectedItem = " Español (España) "
Else
CR_SoftSubDefault . SelectedItem = " [Disabled] "
End If
2019-11-10 00:16:12 +01:00
End Sub
2020-12-04 20:22:22 +01:00
Private Sub PictureBox4_Click ( sender As Object , e As EventArgs ) Handles pictureBox4 . Click
2019-11-10 00:16:12 +01:00
Dim rk As RegistryKey = Registry . CurrentUser . CreateSubKey ( " Software\CRDownloader " )
2021-02-12 13:44:17 +01:00
If http_support . Text = " add-on support disabled " Then
rk . SetValue ( " ServerPort " , 0 , RegistryValueKind . String )
Main . StartServer = False
Else
Dim Port As Integer = 0
Try
Port = CInt ( http_support . Text )
rk . SetValue ( " ServerPort " , Port , RegistryValueKind . String )
Main . StartServer = False
Catch ex As Exception
2021-05-01 13:56:48 +02:00
'If MessageBox.Show("Resolution '[Auto]' and merge the subtitle with the video file will download all resolutions!" + vbNewLine + "Press 'Yes' to enable it anyway", "Prepare for unforeseen consequences.", MessageBoxButtons.YesNo) = DialogResult.Yes Then
2021-02-28 13:22:00 +01:00
2021-05-01 13:56:48 +02:00
'Else
' AAuto.Checked = False
' A360p.Checked = True
'End If
2021-02-12 13:44:17 +01:00
MsgBox ( " The add-on support Port can only be numbers! " , MsgBoxStyle . Exclamation )
Exit Sub
End Try
End If
2021-05-23 22:27:56 +02:00
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
2021-02-12 13:44:17 +01:00
' MsgBox(Name_season.Text)
2019-12-22 16:15:17 +01:00
If InStr ( TextBox1 . Text , " https:// " ) Then
Main . Startseite = TextBox1 . Text
rk . SetValue ( " Startseite " , Main . Startseite , RegistryValueKind . String )
ElseIf TextBox1 . Text = Nothing Then
Main . Startseite = " https://www.crunchyroll.com/ "
rk . SetValue ( " Startseite " , Main . Startseite , RegistryValueKind . String )
Else
End If
2021-02-07 13:47:30 +01:00
If DD_Season_Prefix . Text = " [default season prefix] " Then
Main . Season_Prefix = " [default season prefix] "
rk . SetValue ( " Prefix_S " , " [default season prefix] " , RegistryValueKind . String )
Else
Main . Season_Prefix = DD_Season_Prefix . Text
rk . SetValue ( " Prefix_S " , DD_Season_Prefix . Text , RegistryValueKind . String )
End If
If DD_Episode_Prefix . Text = " [default episode prefix] " Then
Main . Episode_Prefix = " [default episode prefix] "
rk . SetValue ( " Prefix_E " , " [default episode prefix] " , RegistryValueKind . String )
Else
Main . Episode_Prefix = DD_Episode_Prefix . Text
rk . SetValue ( " Prefix_E " , DD_Episode_Prefix . Text , RegistryValueKind . String )
End If
2019-11-10 00:16:12 +01:00
If A1080p . Checked Then
2020-11-13 15:57:34 +01:00
Main . Reso = 1080
2019-11-10 00:16:12 +01:00
rk . SetValue ( " Resu " , 1080 , RegistryValueKind . String )
ElseIf A720p . Checked Then
2020-11-13 15:57:34 +01:00
Main . Reso = 720
2019-11-10 00:16:12 +01:00
rk . SetValue ( " Resu " , 720 , RegistryValueKind . String )
ElseIf A360p . Checked Then
2020-11-13 15:57:34 +01:00
Main . Reso = 360
2019-11-10 00:16:12 +01:00
rk . SetValue ( " Resu " , 360 , RegistryValueKind . String )
ElseIf A480p . Checked Then
2020-11-13 15:57:34 +01:00
Main . Reso = 480
2019-11-10 00:16:12 +01:00
rk . SetValue ( " Resu " , 480 , RegistryValueKind . String )
2019-12-29 16:44:16 +01:00
ElseIf AAuto . Checked Then
2020-11-13 15:57:34 +01:00
Main . Reso = 42
2019-12-29 16:44:16 +01:00
rk . SetValue ( " Resu " , 42 , RegistryValueKind . String )
2019-11-10 00:16:12 +01:00
End If
2020-11-13 15:57:34 +01:00
If AoD_1080_Plus . Checked Then
Main . AoD_Reso = 1080
rk . SetValue ( " AoD_Reso " , 1080 , RegistryValueKind . String )
ElseIf AoD_576p . Checked Then
Main . AoD_Reso = 576
rk . SetValue ( " AoD_Reso " , 576 , RegistryValueKind . String )
ElseIf AoD_0p . Checked Then
Main . AoD_Reso = 0
rk . SetValue ( " AoD_Reso " , 0 , RegistryValueKind . String )
End If
2019-11-10 00:16:12 +01:00
If ComboBox1 . SelectedItem . ToString = " English " Then
Main . SubSprache = " enUS "
rk . SetValue ( " Sub " , " enUS " , RegistryValueKind . String )
ElseIf ComboBox1 . SelectedItem . ToString = " Deutsch " Then
Main . SubSprache = " deDE "
rk . SetValue ( " Sub " , " deDE " , RegistryValueKind . String )
ElseIf ComboBox1 . SelectedItem . ToString = " Português (Brasil) " Then
Main . SubSprache = " ptBR "
rk . SetValue ( " Sub " , " ptBR " , RegistryValueKind . String )
ElseIf ComboBox1 . SelectedItem . ToString = " Español (LA) " Then
Main . SubSprache = " esLA "
rk . SetValue ( " Sub " , " esLA " , RegistryValueKind . String )
ElseIf ComboBox1 . SelectedItem . ToString = " Français (France) " Then
Main . SubSprache = " frFR "
rk . SetValue ( " Sub " , " frFR " , RegistryValueKind . String )
ElseIf ComboBox1 . SelectedItem . ToString = " العربية (Arabic) " Then
Main . SubSprache = " arME "
rk . SetValue ( " Sub " , " arME " , RegistryValueKind . String )
ElseIf ComboBox1 . SelectedItem . ToString = " Русский (Russian) " Then
Main . SubSprache = " ruRU "
rk . SetValue ( " Sub " , " ruRU " , RegistryValueKind . String )
ElseIf ComboBox1 . SelectedItem . ToString = " Italiano (Italian) " Then
Main . SubSprache = " itIT "
rk . SetValue ( " Sub " , " itIT " , RegistryValueKind . String )
ElseIf ComboBox1 . SelectedItem . ToString = " Español (España) " Then
Main . SubSprache = " esES "
rk . SetValue ( " Sub " , " esES " , RegistryValueKind . String )
ElseIf ComboBox1 . SelectedItem . ToString = Main . CB_SuB_Nothing Then
Main . SubSprache = " None "
rk . SetValue ( " Sub " , " None " , RegistryValueKind . String )
End If
2020-11-21 14:56:27 +01:00
2021-02-20 18:25:49 +01:00
If CR_SoftSubDefault . SelectedItem . ToString = " English " Then
Main . DefaultSubCR = " enUS "
rk . SetValue ( " DefaultSubCR " , " enUS " , RegistryValueKind . String )
ElseIf CR_SoftSubDefault . SelectedItem . ToString = " Deutsch " Then
Main . DefaultSubCR = " deDE "
rk . SetValue ( " DefaultSubCR " , " deDE " , RegistryValueKind . String )
ElseIf CR_SoftSubDefault . SelectedItem . ToString = " Português (Brasil) " Then
Main . DefaultSubCR = " ptBR "
rk . SetValue ( " DefaultSubCR " , " ptBR " , RegistryValueKind . String )
ElseIf CR_SoftSubDefault . SelectedItem . ToString = " Español (LA) " Then
Main . DefaultSubCR = " esLA "
rk . SetValue ( " DefaultSubCR " , " esLA " , RegistryValueKind . String )
ElseIf CR_SoftSubDefault . SelectedItem . ToString = " Français (France) " Then
Main . DefaultSubCR = " frFR "
rk . SetValue ( " DefaultSubCR " , " frFR " , RegistryValueKind . String )
ElseIf CR_SoftSubDefault . SelectedItem . ToString = " العربية (Arabic) " Then
Main . DefaultSubCR = " arME "
rk . SetValue ( " DefaultSubCR " , " arME " , RegistryValueKind . String )
ElseIf CR_SoftSubDefault . SelectedItem . ToString = " Русский (Russian) " Then
Main . DefaultSubCR = " ruRU "
rk . SetValue ( " DefaultSubCR " , " ruRU " , RegistryValueKind . String )
ElseIf CR_SoftSubDefault . SelectedItem . ToString = " Italiano (Italian) " Then
Main . DefaultSubCR = " itIT "
rk . SetValue ( " DefaultSubCR " , " itIT " , RegistryValueKind . String )
ElseIf CR_SoftSubDefault . SelectedItem . ToString = " Español (España) " Then
Main . DefaultSubCR = " esES "
rk . SetValue ( " DefaultSubCR " , " esES " , RegistryValueKind . String )
ElseIf CR_SoftSubDefault . SelectedItem . ToString = " [Disabled] " Then
Main . DefaultSubCR = " None "
rk . SetValue ( " DefaultSubCR " , " Disabled " , RegistryValueKind . String )
End If
2020-11-21 14:56:27 +01:00
If CR_Filename . Text = " [episode number] " Then
Main . CR_NameMethode = 0
rk . SetValue ( " CR_NameMethode " , 0 , RegistryValueKind . String )
ElseIf CR_Filename . Text = " [episode name] " Then
Main . CR_NameMethode = 1
rk . SetValue ( " CR_NameMethode " , 1 , RegistryValueKind . String )
ElseIf CR_Filename . Text = " [episode number] [episode name] " Then
Main . CR_NameMethode = 2
rk . SetValue ( " CR_NameMethode " , 2 , RegistryValueKind . String )
2021-02-07 13:47:30 +01:00
ElseIf CR_Filename . Text = " [episode name] [episode number] " Then
Main . CR_NameMethode = 3
rk . SetValue ( " CR_NameMethode " , 3 , RegistryValueKind . String )
2020-11-21 14:56:27 +01:00
End If
2021-03-08 21:08:26 +01:00
If CB_Format . Text = " MKV " Then
Main . VideoFormat = " .mkv "
Main . MergeSubsFormat = " copy "
rk . SetValue ( " VideoFormat " , " .mkv " , RegistryValueKind . String )
2021-06-04 15:25:59 +02:00
ElseIf CB_Format . Text = " AAC (Audio only) " Then
Main . VideoFormat = " .aac "
Main . MergeSubsFormat = " mov_text "
rk . SetValue ( " VideoFormat " , " .aac " , RegistryValueKind . String )
2021-03-08 21:08:26 +01:00
Else
Main . VideoFormat = " .mp4 "
Main . MergeSubsFormat = " mov_text "
rk . SetValue ( " VideoFormat " , " .mp4 " , RegistryValueKind . String )
End If
2020-02-02 16:39:54 +01:00
If MergeMP4 . Checked = True Then
2021-03-08 21:08:26 +01:00
Main . MergeSubs = True
rk . SetValue ( " MergeSubs " , " 1 " , RegistryValueKind . String )
2020-02-02 16:39:54 +01:00
Else
2021-03-08 21:08:26 +01:00
Main . MergeSubs = False
rk . SetValue ( " MergeSubs " , " 0 " , RegistryValueKind . String )
2020-02-02 16:39:54 +01:00
End If
2020-09-30 18:19:31 +02:00
If HybridMode_CB . Checked = True Then
Main . HybridMode = True
rk . SetValue ( " HybridMode " , " 1 " , RegistryValueKind . String )
Else
Main . HybridMode = False
rk . SetValue ( " HybridMode " , " 0 " , RegistryValueKind . String )
End If
2020-11-19 22:28:42 +01:00
#Region "funimation"
2020-09-30 18:19:31 +02:00
2020-11-21 14:56:27 +01:00
If CB_srt . Checked = True Then
Main . Funimation_srt = True
rk . SetValue ( " Funimation_srt " , " 1 " , RegistryValueKind . String )
Else
Main . Funimation_srt = False
rk . SetValue ( " Funimation_srt " , " 0 " , RegistryValueKind . String )
End If
If CB_vtt . Checked = True Then
Main . Funimation_vtt = True
rk . SetValue ( " Funimation_vtt " , " 1 " , RegistryValueKind . String )
Else
Main . Funimation_vtt = False
rk . SetValue ( " Funimation_vtt " , " 0 " , RegistryValueKind . String )
End If
If CB_dfxp . Checked = True Then
Main . Funimation_dfxp = True
rk . SetValue ( " Funimation_dfxp " , " 1 " , RegistryValueKind . String )
Else
Main . Funimation_dfxp = False
rk . SetValue ( " Funimation_dfxp " , " 0 " , RegistryValueKind . String )
End If
2020-11-19 22:28:42 +01:00
Main . DubFunimation = Fun_Dub_Over . SelectedItem . ToString
rk . SetValue ( " FunimationDub " , Fun_Dub_Over . SelectedItem . ToString , RegistryValueKind . String )
If CB_Fun_HardSubs . SelectedItem . ToString = " Disabled " Then
Main . HardSubFunimation = " Disabled "
rk . SetValue ( " FunimationHardsub " , " Disabled " , RegistryValueKind . String )
ElseIf CB_Fun_HardSubs . SelectedItem . ToString = " English " Then
Main . HardSubFunimation = " en "
rk . SetValue ( " FunimationHardsub " , " en " , RegistryValueKind . String )
ElseIf CB_Fun_HardSubs . SelectedItem . ToString = " Português (Brasil) " Then
Main . HardSubFunimation = " pt "
rk . SetValue ( " FunimationHardsub " , " pt " , RegistryValueKind . String )
ElseIf CB_Fun_HardSubs . SelectedItem . ToString = " Español (LA) " Then
Main . HardSubFunimation = " es "
rk . SetValue ( " FunimationHardsub " , " es " , RegistryValueKind . String )
End If
2021-02-20 18:25:49 +01:00
If FunSubDef . SelectedItem . ToString = " [Disabled] " Then
Main . DefaultSubFunimation = " Disabled "
rk . SetValue ( " DefaultSubFunimation " , " Disabled " , RegistryValueKind . String )
ElseIf FunSubDef . SelectedItem . ToString = " English " Then
Main . DefaultSubFunimation = " en "
rk . SetValue ( " DefaultSubFunimation " , " en " , RegistryValueKind . String )
ElseIf FunSubDef . SelectedItem . ToString = " Português (Brasil) " Then
Main . DefaultSubFunimation = " pt "
rk . SetValue ( " DefaultSubFunimation " , " pt " , RegistryValueKind . String )
ElseIf FunSubDef . SelectedItem . ToString = " Español (LA) " Then
Main . DefaultSubFunimation = " es "
rk . SetValue ( " DefaultSubFunimation " , " es " , RegistryValueKind . String )
End If
2020-11-19 22:28:42 +01:00
Main . SubFunimation . Clear ( )
If CB_fun_eng . Checked = True Then
Main . SubFunimation . Add ( " en " )
End If
If CB_fun_es . Checked = True Then
Main . SubFunimation . Add ( " es " )
End If
If CB_fun_ptbr . Checked = True Then
Main . SubFunimation . Add ( " pt " )
End If
Dim FunimationSaveString As String = Nothing
For ii As Integer = 0 To Main . SubFunimation . Count - 1
If FunimationSaveString = Nothing Then
FunimationSaveString = Main . SubFunimation ( ii )
Else
FunimationSaveString = FunimationSaveString + " , " + Main . SubFunimation ( ii )
End If
Next
If FunimationSaveString = Nothing Then
FunimationSaveString = " none "
2020-06-10 17:34:27 +02:00
End If
2020-11-19 22:28:42 +01:00
rk . SetValue ( " Fun_Sub " , FunimationSaveString , RegistryValueKind . String )
#End Region
2020-09-30 18:19:31 +02:00
2020-12-02 21:01:30 +01:00
2020-04-01 20:55:47 +02:00
If CheckBox1 . Enabled = False Then
2020-02-12 22:08:02 +01:00
2020-02-14 17:22:54 +01:00
Else
2020-04-01 20:55:47 +02:00
Dim ffpmeg_cmd As String = Nothing
If FFMPEG_CommandP1 . Text = " -c copy " Then
ffpmeg_cmd = " " + FFMPEG_CommandP1 . Text + " " + FFMPEG_CommandP4 . Text
2021-05-23 22:27:56 +02:00
ElseIf FFMPEG_CommandP2 . Text = " [no Preset] " Then
ffpmeg_cmd = " " + FFMPEG_CommandP1 . Text + " " + FFMPEG_CommandP3 . Text + " " + FFMPEG_CommandP4 . Text
2020-04-01 20:55:47 +02:00
Else
ffpmeg_cmd = " " + FFMPEG_CommandP1 . Text + " " + FFMPEG_CommandP2 . Text + " " + FFMPEG_CommandP3 . Text + " " + FFMPEG_CommandP4 . Text
End If
rk . SetValue ( " ffmpeg_command " , ffpmeg_cmd , RegistryValueKind . String )
Main . ffmpeg_command = ffpmeg_cmd
2020-02-12 22:08:02 +01:00
End If
2020-04-01 20:55:47 +02:00
If InStr ( FFMPEG_CommandP1 . Text , " nvenc " ) Then
2020-11-05 20:43:52 +01:00
If NumericUpDown1 . Value > 2 Then
NumericUpDown1 . Value = 2
End If
2020-06-10 17:34:27 +02:00
ElseIf InStr ( FFMPEG_CommandP1 . Text , " libx26 " ) Then
2020-11-05 20:43:52 +01:00
If NumericUpDown1 . Value > 1 Then
NumericUpDown1 . Value = 1
End If
2020-02-12 22:08:02 +01:00
End If
2019-11-10 00:16:12 +01:00
rk . SetValue ( " SL_DL " , NumericUpDown1 . Value , RegistryValueKind . String )
Main . MaxDL = NumericUpDown1 . Value
2020-02-12 22:08:02 +01:00
2020-11-05 20:43:52 +01:00
rk . SetValue ( " ErrorTolerance " , NumericUpDown2 . Value , RegistryValueKind . String )
Main . ErrorTolerance = NumericUpDown2 . Value
2020-02-28 16:28:38 +01:00
If ListViewAdd_True . Checked = True Then
rk . SetValue ( " QueueMode " , 1 , RegistryValueKind . String )
2020-12-18 13:47:55 +01:00
Main . UseQueue = True
2020-02-28 16:28:38 +01:00
ElseIf ListViewAdd_True . Checked = False Then
rk . SetValue ( " QueueMode " , 0 , RegistryValueKind . String )
Main . UseQueue = False
End If
2021-02-12 13:44:17 +01:00
2020-02-28 16:28:38 +01:00
2020-02-02 16:39:54 +01:00
#Region "sof subs"
Main . SoftSubs . Clear ( )
If CBdeDE . Checked = True Then
Main . SoftSubs . Add ( " deDE " )
End If
If CBenUS . Checked = True Then
Main . SoftSubs . Add ( " enUS " )
End If
If CBptBR . Checked = True Then
Main . SoftSubs . Add ( " ptBR " )
End If
If CBesLA . Checked = True Then
Main . SoftSubs . Add ( " esLA " )
End If
If CBfrFR . Checked = True Then
Main . SoftSubs . Add ( " frFR " )
End If
If CBarME . Checked = True Then
Main . SoftSubs . Add ( " arME " )
End If
If CBruRU . Checked = True Then
Main . SoftSubs . Add ( " ruRU " )
End If
If CBitIT . Checked = True Then
Main . SoftSubs . Add ( " itIT " )
End If
If CBesES . Checked = True Then
Main . SoftSubs . Add ( " esES " )
End If
Dim SaveString As String = Nothing
For ii As Integer = 0 To Main . SoftSubs . Count - 1
If SaveString = Nothing Then
SaveString = Main . SoftSubs ( ii )
Else
SaveString = SaveString + " , " + Main . SoftSubs ( ii )
End If
Next
If SaveString = Nothing Then
SaveString = " none "
End If
rk . SetValue ( " AddedSubs " , SaveString , RegistryValueKind . String )
#End Region
2019-11-10 00:16:12 +01:00
Me . Close ( )
End Sub
Private Function Check_CB ( ) As Boolean
Dim C As Boolean = False
For i As Integer = 0 To ComboBox1 . Items . Count - 1
If ComboBox1 . Items . Item ( i ) . ToString = Main . CB_SuB_Nothing Then
C = True
Exit For
End If
Next
Return C
End Function
2020-06-01 18:43:38 +02:00
2019-11-10 00:16:12 +01:00
2020-09-30 18:19:31 +02:00
Public Function GeräteID ( ) As String
2019-11-10 00:16:12 +01:00
Dim rnd As New Random
Dim possible As String = " ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 "
Dim HWID As String = Nothing
2020-09-30 18:19:31 +02:00
For i As Integer = 0 To 15
2019-11-10 00:16:12 +01:00
Dim ZufallsZahl As Integer = rnd . Next ( 1 , 33 )
HWID = HWID + possible ( ZufallsZahl )
Next
2020-09-30 18:19:31 +02:00
Return " CRD-Temp-File- " + HWID
2019-11-10 00:16:12 +01:00
End Function
2020-12-02 21:01:30 +01:00
Private Sub PictureBox1_Click ( sender As Object , e As EventArgs ) Handles pictureBox1 . Click
2019-11-10 00:16:12 +01:00
Me . Close ( )
End Sub
#Region "UI"
2020-12-10 19:18:20 +01:00
Private Sub Btn_Close_MouseEnter ( sender As Object , e As EventArgs ) Handles pictureBox1 . MouseEnter
Dim PB As PictureBox = sender
PB . Image = My . Resources . main_del
2019-11-10 00:16:12 +01:00
End Sub
2020-12-10 19:18:20 +01:00
Private Sub Btn_Close_MouseLeave ( sender As Object , e As EventArgs ) Handles pictureBox1 . MouseLeave
Dim PB As PictureBox = sender
PB . Image = Main . CloseImg
2019-11-10 00:16:12 +01:00
End Sub
2020-12-02 21:01:30 +01:00
Private Sub PictureBox4_MouseEnter ( sender As Object , e As EventArgs ) Handles pictureBox4 . MouseEnter
2019-11-10 00:16:12 +01:00
pictureBox4 . Image = My . Resources . crdSettings_Button_SafeExit_hover
End Sub
2020-12-02 21:01:30 +01:00
Private Sub PictureBox4_MouseLeave ( sender As Object , e As EventArgs ) Handles pictureBox4 . MouseLeave
2019-11-10 00:16:12 +01:00
pictureBox4 . Image = My . Resources . crdSettings_Button_SafeExit
End Sub
2021-03-20 13:02:49 +01:00
Private Sub ComboBox1_DrawItem ( sender As Object , e As DrawItemEventArgs ) Handles ComboBox1 . DrawItem , CB_Fun_HardSubs . DrawItem , Fun_Dub_Over . DrawItem , CR_Filename . DrawItem
2020-11-13 15:57:34 +01:00
Dim CB As ComboBox = sender
CB . BackColor = Color . White
2019-11-10 00:16:12 +01:00
If e . Index >= 0 Then
Using st As New StringFormat With { . Alignment = StringAlignment . Center }
' e.DrawBackground()
' e.DrawFocusRectangle()
e . Graphics . FillRectangle ( SystemBrushes . ControlLightLight , e . Bounds )
2020-11-13 15:57:34 +01:00
e . Graphics . DrawString ( CB . Items ( e . Index ) . ToString , e . Font , Brushes . Black , e . Bounds , st )
2019-11-10 00:16:12 +01:00
End Using
End If
End Sub
2020-02-02 16:39:54 +01:00
Private Sub AAuto_Click ( sender As Object , e As EventArgs ) Handles AAuto . Click
If MergeMP4 . Checked = True Then
If AAuto . Checked = True Then
If MessageBox . Show ( " Resolution '[Auto]' and merge the subtitle with the video file will download all resolutions! " + vbNewLine + " Press 'Yes' to enable it anyway " , " Prepare for unforeseen consequences. " , MessageBoxButtons . YesNo ) = DialogResult . Yes Then
Else
2020-10-07 22:40:58 +02:00
AAuto . Checked = False
2020-12-13 16:11:43 +01:00
A360p . Checked = True
2020-02-02 16:39:54 +01:00
End If
End If
2020-12-13 16:11:43 +01:00
ElseIf HybridMode_CB . Checked = True Then
If AAuto . Checked = True Then
MsgBox ( " Resolution '[Auto]' and 'Hybride Mode' does not work together " , MsgBoxStyle . Information )
AAuto . Checked = False
A1080p . Checked = True
End If
2020-02-02 16:39:54 +01:00
End If
End Sub
2020-12-13 16:11:43 +01:00
Private Sub MergeMP4_Click ( sender As Object , e As EventArgs ) Handles MergeMP4 . Click
2020-02-02 16:39:54 +01:00
If MergeMP4 . Checked = True Then
If AAuto . Checked = True Then
If MessageBox . Show ( " Resolution '[Auto]' and merge the subtitle with the video file will download all resolutions! " + vbNewLine + " Press 'Yes' to enable it anyway " , " Prepare for unforeseen consequences. " , MessageBoxButtons . YesNo ) = DialogResult . Yes Then
Else
MergeMP4 . Checked = False
End If
End If
End If
End Sub
2021-03-08 21:08:26 +01:00
2020-12-13 16:11:43 +01:00
2020-02-02 16:39:54 +01:00
2020-10-07 22:40:58 +02:00
2019-11-10 00:16:12 +01:00
2019-12-29 16:44:16 +01:00
2020-02-12 22:08:02 +01:00
Private Sub CheckBox1_CheckedChanged ( sender As Object , e As EventArgs ) Handles CheckBox1 . CheckedChanged
GroupBox2 . Enabled = CheckBox1 . CheckState
2020-04-01 20:55:47 +02:00
If FFMPEG_CommandP1 . Text = " -c copy " Then
FFMPEG_CommandP2 . Enabled = False
FFMPEG_CommandP3 . Enabled = False
Else
FFMPEG_CommandP2 . Enabled = True
FFMPEG_CommandP3 . Enabled = True
End If
End Sub
2021-05-23 22:27:56 +02:00
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
2020-04-01 20:55:47 +02:00
Dim Button As ToolStripMenuItem = sender
If Button . Text = " -c copy " Then
FFMPEG_CommandP1 . Text = " -c copy "
FFMPEG_CommandP2 . Enabled = False
FFMPEG_CommandP3 . Enabled = False
Else
FFMPEG_CommandP1 . Text = Button . Text
FFMPEG_CommandP2 . Enabled = True
FFMPEG_CommandP3 . Enabled = True
End If
2020-02-12 22:08:02 +01:00
End Sub
2021-05-23 22:27:56 +02:00
Private Sub ListP1_Click ( sender As Object , e As EventArgs ) Handles ListP1 . Click , ListP2 . Click , ListP3 . Click
2020-04-01 20:55:47 +02:00
Dim Button As ToolStripMenuItem = sender
FFMPEG_CommandP2 . Text = Button . Text
FFMPEG_CommandP2 . Enabled = True
FFMPEG_CommandP3 . Enabled = True
End Sub
Private Sub ListBit1_Click ( sender As Object , e As EventArgs ) Handles ListBit1 . Click , ListBit2 . Click , ListBit3 . Click , ListBit4 . Click , ListBit5 . Click , ListBit6 . Click , ListBit7 . Click
Dim Button As ToolStripMenuItem = sender
FFMPEG_CommandP3 . Text = Button . Text
FFMPEG_CommandP2 . Enabled = True
FFMPEG_CommandP3 . Enabled = True
End Sub
2020-06-10 17:34:27 +02:00
Private Sub PictureBox2_Click ( sender As Object , e As EventArgs ) Handles PictureBox2 . Click
GeckoFX . Show ( )
Main . LoginOnly = " US_UnBlock "
2021-05-01 13:56:48 +02:00
Main . UserBowser = True
2020-09-30 18:19:31 +02:00
GeckoFX . WebBrowser1 . Navigate ( " https://api.criater-stiftung.org/us-unlock.php " )
2020-06-10 17:34:27 +02:00
End Sub
Private Sub PictureBox2_Enter ( sender As Object , e As EventArgs ) Handles PictureBox2 . MouseEnter
PictureBox2 . Image = My . Resources . crdsettings_setUScookie_button_hover
End Sub
Private Sub PictureBox2_Leave ( sender As Object , e As EventArgs ) Handles PictureBox2 . MouseLeave
PictureBox2 . Image = My . Resources . crdsettings_setUScookie_button
End Sub
2020-09-30 18:19:31 +02:00
2020-02-12 22:08:02 +01:00
2020-12-10 19:18:20 +01:00
Private Sub Label7_Click ( sender As Object , e As EventArgs )
2020-11-13 15:57:34 +01:00
Process . Start ( " https://bitbucket.org/geckofx/geckofx-60.0/src/default/ " )
End Sub
2020-12-10 19:18:20 +01:00
Private Sub Label3_Click ( sender As Object , e As EventArgs )
2020-11-13 15:57:34 +01:00
Process . Start ( " https://www.ffmpeg.org/about.html " )
End Sub
2020-12-10 19:18:20 +01:00
Private Sub Label9_Click ( sender As Object , e As EventArgs )
2020-11-13 15:57:34 +01:00
Process . Start ( " https://github.com/hama3254/metroframework-modern-ui " )
End Sub
2020-12-04 20:22:22 +01:00
2020-12-10 19:18:20 +01:00
Sub GroupBoxColor ( ByVal color As Color )
SoftSubs . ForeColor = color
GB_SubLanguage . ForeColor = color
DL_Count_simultaneous . ForeColor = color
GB_Resolution . ForeColor = color
GroupBox1 . ForeColor = color
GroupBox2 . ForeColor = color
GroupBox5 . ForeColor = color
GroupBox6 . ForeColor = color
GroupBox7 . ForeColor = color
GroupBox8 . ForeColor = color
GroupBox9 . ForeColor = color
GroupBox10 . ForeColor = color
GroupBox11 . ForeColor = color
GroupBox12 . ForeColor = color
End Sub
Private Sub GroupBox2_EnabledChanged ( sender As Object , e As EventArgs ) Handles GroupBox2 . EnabledChanged
End Sub
Private Sub DarkMode_CheckedChanged ( sender As Object , e As EventArgs ) Handles DarkMode . CheckedChanged
Dim rk As RegistryKey = Registry . CurrentUser . CreateSubKey ( " Software\CRDownloader " )
If DarkMode . Checked = True Then
rk . SetValue ( " Dark_Mode " , 1 , RegistryValueKind . String )
Manager . Theme = MetroThemeStyle . Dark
GroupBoxColor ( Color . FromArgb ( 150 , 150 , 150 ) )
Main . DarkMode ( )
Main . DarkModeValue = True
pictureBox1 . Image = Main . CloseImg
Else
Main . DarkModeValue = False
rk . SetValue ( " Dark_Mode " , 0 , RegistryValueKind . String )
Manager . Theme = MetroThemeStyle . Light
Main . LightMode ( )
GroupBoxColor ( Color . FromArgb ( 0 , 0 , 0 ) )
pictureBox1 . Image = Main . CloseImg
End If
End Sub
2020-12-04 20:22:22 +01:00
2020-06-10 19:52:11 +02:00
2021-02-12 13:44:17 +01:00
Private Sub Server_Click ( sender As Object , e As EventArgs )
'If Server.Checked = True Then
' MsgBox("This feature requires a restart of the downloader", MsgBoxStyle.Information)
'End If
2021-01-14 18:06:42 +01:00
End Sub
2021-01-16 14:08:33 +01:00
Private Sub BackgroundWorker1_DoWork ( sender As Object , e As System . ComponentModel . DoWorkEventArgs ) Handles BackgroundWorker1 . DoWork
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 )
2021-05-23 22:27:56 +02:00
LastVersionString = GitHubLastTag1 ( 0 )
'Debug.WriteLine(GitHubLastTag1(0))
2021-01-16 14:08:33 +01:00
Catch ex As Exception
Debug . WriteLine ( ex . ToString )
End Try
End Sub
2021-01-14 18:06:42 +01:00
2020-10-31 23:36:52 +01:00
2021-01-22 22:45:01 +01:00
Private Sub CB_Fun_HardSubs_SelectedIndexChanged ( sender As Object , e As EventArgs ) Handles CB_Fun_HardSubs . SelectedIndexChanged
If CB_Fun_HardSubs . SelectedIndex = 0 Then
Else
If Main . HardSubFunimation = " Disabled " Then
If FFMPEG_CommandP1 . Text = " -c copy " Then
If MessageBox . Show ( " Funimation hard subtitle are post-processed. " + vbNewLine + " This cost a lot of performance and it should not more than one download run at the time! " , " Prepare for unforeseen consequences. " , MessageBoxButtons . YesNo ) = DialogResult . Yes Then
Else
CB_Fun_HardSubs . SelectedIndex = 0
End If
End If
End If
End If
2021-02-07 13:47:30 +01:00
'MetroMessageBox.Show(Me, "Test", "Test Box", MessageBoxButtons.YesNo, MessageBoxIcon.None, 150)
'MetroMessageBox.Show(Me, "Test", "Test Box", MessageBoxButtons.YesNo, MessageBoxIcon.None, MessageBoxDefaultButton.Button2, 150, MetroThemeStyle.Dark)
2021-01-22 22:45:01 +01:00
End Sub
2021-02-20 18:25:49 +01:00
Private Sub CB_fun_eng_CheckedChanged ( sender As Object , e As EventArgs ) Handles CB_fun_eng . CheckedChanged
If CB_fun_eng . Checked = True Then
FunSubDef . Items . Add ( " English " )
Else
FunSubDef . Items . Remove ( " English " )
If FunSubDef . Text = " English " Then
FunSubDef . SelectedItem = " [Disabled] "
End If
End If
End Sub
Private Sub CB_fun_es_CheckedChanged ( sender As Object , e As EventArgs ) Handles CB_fun_es . CheckedChanged
If CB_fun_es . Checked = True Then
FunSubDef . Items . Add ( " Español (LA) " )
Else
FunSubDef . Items . Remove ( " Español (LA) " )
If FunSubDef . Text = " Español (LA) " Then
FunSubDef . SelectedItem = " [Disabled] "
End If
End If
End Sub
Private Sub CB_fun_ptbr_CheckedChanged ( sender As Object , e As EventArgs ) Handles CB_fun_ptbr . CheckedChanged
If CB_fun_ptbr . Checked = True Then
FunSubDef . Items . Add ( " Português (Brasil) " )
Else
FunSubDef . Items . Remove ( " Português (Brasil) " )
If FunSubDef . Text = " Português (Brasil) " Then
FunSubDef . SelectedItem = " [Disabled] "
End If
End If
End Sub
#Region "CR_default soft sub"
Private Sub CBesES_CheckedChanged ( sender As Object , e As EventArgs ) Handles CBesES . CheckedChanged
If CBesES . Checked = True Then
CR_SoftSubDefault . Items . Add ( CBesES . Text )
Else
CR_SoftSubDefault . Items . Remove ( CBesES . Text )
If CR_SoftSubDefault . Text = CBesES . Text Then
CR_SoftSubDefault . SelectedItem = " [Disabled] "
End If
End If
End Sub
Private Sub CBitIT_CheckedChanged ( sender As Object , e As EventArgs ) Handles CBitIT . CheckedChanged
If CBitIT . Checked = True Then
CR_SoftSubDefault . Items . Add ( CBitIT . Text )
Else
CR_SoftSubDefault . Items . Remove ( CBitIT . Text )
If CR_SoftSubDefault . Text = CBitIT . Text Then
CR_SoftSubDefault . SelectedItem = " [Disabled] "
End If
End If
End Sub
Private Sub CBruRU_CheckedChanged ( sender As Object , e As EventArgs ) Handles CBruRU . CheckedChanged
If CBruRU . Checked = True Then
CR_SoftSubDefault . Items . Add ( CBruRU . Text )
Else
CR_SoftSubDefault . Items . Remove ( CBruRU . Text )
If CR_SoftSubDefault . Text = CBruRU . Text Then
CR_SoftSubDefault . SelectedItem = " [Disabled] "
End If
End If
End Sub
Private Sub CBarME_CheckedChanged ( sender As Object , e As EventArgs ) Handles CBarME . CheckedChanged
If CBarME . Checked = True Then
CR_SoftSubDefault . Items . Add ( CBarME . Text )
Else
CR_SoftSubDefault . Items . Remove ( CBarME . Text )
If CR_SoftSubDefault . Text = CBarME . Text Then
CR_SoftSubDefault . SelectedItem = " [Disabled] "
End If
End If
End Sub
Private Sub CBfrFR_CheckedChanged ( sender As Object , e As EventArgs ) Handles CBfrFR . CheckedChanged
If CBfrFR . Checked = True Then
CR_SoftSubDefault . Items . Add ( CBfrFR . Text )
Else
CR_SoftSubDefault . Items . Remove ( CBfrFR . Text )
If CR_SoftSubDefault . Text = CBfrFR . Text Then
CR_SoftSubDefault . SelectedItem = " [Disabled] "
End If
End If
End Sub
Private Sub CBesLA_CheckedChanged ( sender As Object , e As EventArgs ) Handles CBesLA . CheckedChanged
If CBesLA . Checked = True Then
CR_SoftSubDefault . Items . Add ( CBesLA . Text )
Else
CR_SoftSubDefault . Items . Remove ( CBesLA . Text )
If CR_SoftSubDefault . Text = CBesLA . Text Then
CR_SoftSubDefault . SelectedItem = " [Disabled] "
End If
End If
End Sub
Private Sub CBptBR_CheckedChanged ( sender As Object , e As EventArgs ) Handles CBptBR . CheckedChanged
If CBptBR . Checked = True Then
CR_SoftSubDefault . Items . Add ( CBptBR . Text )
Else
CR_SoftSubDefault . Items . Remove ( CBptBR . Text )
If CR_SoftSubDefault . Text = CBptBR . Text Then
CR_SoftSubDefault . SelectedItem = " [Disabled] "
End If
End If
End Sub
Private Sub CBdeDE_CheckedChanged ( sender As Object , e As EventArgs ) Handles CBdeDE . CheckedChanged
If CBdeDE . Checked = True Then
CR_SoftSubDefault . Items . Add ( CBdeDE . Text )
Else
CR_SoftSubDefault . Items . Remove ( CBdeDE . Text )
If CR_SoftSubDefault . Text = CBdeDE . Text Then
CR_SoftSubDefault . SelectedItem = " [Disabled] "
End If
End If
End Sub
Private Sub CBenUS_CheckedChanged ( sender As Object , e As EventArgs ) Handles CBenUS . CheckedChanged
If CBenUS . Checked = True Then
CR_SoftSubDefault . Items . Add ( CBenUS . Text )
Else
CR_SoftSubDefault . Items . Remove ( CBenUS . Text )
If CR_SoftSubDefault . Text = CBenUS . Text Then
CR_SoftSubDefault . SelectedItem = " [Disabled] "
End If
End If
End Sub
2021-03-08 21:08:26 +01:00
Private Sub HybridMode_CB_Click ( sender As Object , e As EventArgs ) Handles HybridMode_CB . Click
If HybridMode_CB . Checked = True Then
If AAuto . Checked = True Then
MsgBox ( " Resolution '[Auto]' and 'Hybride Mode' does not work together " , MsgBoxStyle . Information )
HybridMode_CB . Checked = False
End If
End If
End Sub
2021-05-23 22:27:56 +02:00
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
2021-06-04 15:25:59 +02:00
Private Sub CB_Format_SelectedIndexChanged ( sender As Object , e As EventArgs ) Handles CB_Format . SelectedIndexChanged
If CB_Format . Text = " AAC (Audio only) " Then
If MergeMP4 . Checked = True Then
MsgBox ( " Merged subs are not avalible with audio only! " , MsgBoxStyle . Information )
End If
MergeMP4 . Checked = False
End If
End Sub
Private Sub MergeMP4_CheckedChanged ( sender As Object , e As EventArgs ) Handles MergeMP4 . CheckedChanged
If CB_Format . Text = " AAC (Audio only) " Then
If MergeMP4 . Checked = True Then
MsgBox ( " Merged subs are not avalible with audio only! " , MsgBoxStyle . Information )
End If
MergeMP4 . Checked = False
End If
End Sub
2021-05-23 22:27:56 +02:00
2021-02-20 18:25:49 +01:00
#End Region
2021-01-22 22:45:01 +01:00
2020-11-05 20:43:52 +01:00
2019-11-10 00:16:12 +01:00
#End Region
End Class