diff --git a/.vs/Crunchyroll Downloader/v15/.suo b/.vs/Crunchyroll Downloader/v15/.suo index 29cb7aa..65dfb5e 100644 Binary files a/.vs/Crunchyroll Downloader/v15/.suo and b/.vs/Crunchyroll Downloader/v15/.suo differ diff --git a/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide b/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide index 83fa719..e1bb9c0 100644 Binary files a/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide and b/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide differ diff --git a/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-shm b/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-shm index 4b4d5ca..e469e8c 100644 Binary files a/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-shm and b/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-shm differ diff --git a/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-wal b/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-wal index 1667ed5..49366fd 100644 Binary files a/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-wal and b/.vs/Crunchyroll Downloader/v15/Server/sqlite3/storage.ide-wal differ diff --git a/Crunchyroll Downloader/Anime_Add.Designer.vb b/Crunchyroll Downloader/Anime_Add.Designer.vb index 48cd56a..a167154 100644 --- a/Crunchyroll Downloader/Anime_Add.Designer.vb +++ b/Crunchyroll Downloader/Anime_Add.Designer.vb @@ -273,9 +273,9 @@ Partial Class Anime_Add Me.ClientSize = New System.Drawing.Size(630, 275) Me.Controls.Add(Me.pictureBox3) Me.Controls.Add(Me.pictureBox4) - Me.Controls.Add(Me.groupBox2) Me.Controls.Add(Me.groupBox1) Me.Controls.Add(Me.GroupBox3) + Me.Controls.Add(Me.groupBox2) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None Me.Name = "Anime_Add" Me.Text = "Add" diff --git a/Crunchyroll Downloader/Anime_Add.vb b/Crunchyroll Downloader/Anime_Add.vb index 8aff429..c3254d5 100644 --- a/Crunchyroll Downloader/Anime_Add.vb +++ b/Crunchyroll Downloader/Anime_Add.vb @@ -11,20 +11,29 @@ Public Class Anime_Add Dim AoD_DubList As New List(Of String) Dim AoD_Mode As Boolean = False Dim AoD_DL_running As Boolean = False + Public AoDHTML As String = Nothing + Private Sub ComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox2.SelectedIndexChanged Try - If ComboBox2.Text = Main.SubFolder_Nothing Then + If ComboBox2.Text = SubFolder_Nothing Then Dim rk As RegistryKey = Registry.CurrentUser.CreateSubKey("Software\CRDownloader") - rk.SetValue("SubFolder_Value", Main.SubFolder_Nothing, RegistryValueKind.String) - ElseIf ComboBox2.Text = Main.SubFolder_automatic Then + rk.SetValue("SubFolder_Value", SubFolder_Nothing, RegistryValueKind.String) + SubFolder_Value = SubFolder_Nothing + ElseIf ComboBox2.Text = SubFolder_automatic Then Dim rk As RegistryKey = Registry.CurrentUser.CreateSubKey("Software\CRDownloader") - rk.SetValue("SubFolder_Value", Main.SubFolder_automatic, RegistryValueKind.String) + rk.SetValue("SubFolder_Value", SubFolder_automatic, RegistryValueKind.String) + SubFolder_Value = SubFolder_automatic + ElseIf ComboBox2.Text = SubFolder_automatic2 Then + Dim rk As RegistryKey = Registry.CurrentUser.CreateSubKey("Software\CRDownloader") + rk.SetValue("SubFolder_Value", SubFolder_automatic2, RegistryValueKind.String) + SubFolder_Value = SubFolder_automatic2 Else Dim rk As RegistryKey = Registry.CurrentUser.CreateSubKey("Software\CRDownloader") rk.SetValue("SubFolder_Value", ComboBox2.Text, RegistryValueKind.String) + SubFolder_Value = ComboBox2.Text End If Catch ex As Exception - ComboBox2.Text = Main.SubFolder_Nothing + ComboBox2.Text = SubFolder_Nothing End Try End Sub @@ -64,27 +73,35 @@ Public Class Anime_Add Me.Location = New Point(Main.Location.X + Main.Width / 2 - Me.Width / 2, Main.Location.Y + Main.Height / 2 - Me.Height / 2) TextBox4.Text = Main.Pfad - Dim SubFolder_Value As String + ' Dim SubFolder_Value As String Try Dim rkg As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\CRDownloader") SubFolder_Value = rkg.GetValue("SubFolder_Value").ToString - If SubFolder_Value = Main.SubFolder_Nothing Then - ComboBox2.Items.Add(Main.SubFolder_automatic) - ComboBox2.Items.Add(Main.SubFolder_Nothing) - ElseIf SubFolder_Value = Main.SubFolder_automatic Then - ComboBox2.Items.Add(Main.SubFolder_automatic) - ComboBox2.Items.Add(Main.SubFolder_Nothing) + If SubFolder_Value = SubFolder_Nothing Then + ComboBox2.Items.Add(SubFolder_automatic) + ComboBox2.Items.Add(SubFolder_automatic2) + ComboBox2.Items.Add(SubFolder_Nothing) + ElseIf SubFolder_Value = SubFolder_automatic Then + ComboBox2.Items.Add(SubFolder_automatic) + ComboBox2.Items.Add(SubFolder_automatic2) + ComboBox2.Items.Add(SubFolder_Nothing) + ElseIf SubFolder_Value = SubFolder_automatic2 Then + ComboBox2.Items.Add(SubFolder_automatic) + ComboBox2.Items.Add(SubFolder_automatic2) + ComboBox2.Items.Add(SubFolder_Nothing) Else - ComboBox2.Items.Add(Main.SubFolder_automatic) - ComboBox2.Items.Add(Main.SubFolder_Nothing) + ComboBox2.Items.Add(SubFolder_automatic) + ComboBox2.Items.Add(SubFolder_automatic2) + ComboBox2.Items.Add(SubFolder_Nothing) ComboBox2.Items.Add(SubFolder_Value) End If Catch ex As Exception - ComboBox2.Items.Add(Main.SubFolder_automatic) - ComboBox2.Items.Add(Main.SubFolder_Nothing) - ComboBox2.SelectedItem = Main.SubFolder_Nothing - SubFolder_Value = Main.SubFolder_Nothing + ComboBox2.Items.Add(SubFolder_automatic) + ComboBox2.Items.Add(SubFolder_automatic2) + ComboBox2.Items.Add(SubFolder_Nothing) + ComboBox2.SelectedItem = SubFolder_Nothing + SubFolder_Value = SubFolder_Nothing End Try Try @@ -123,9 +140,10 @@ Public Class Anime_Add Dim rk0 As RegistryKey = Registry.CurrentUser.CreateSubKey("Software\CRDownloader") rk0.SetValue("Ordner", Main.Pfad, RegistryValueKind.String) - ComboBox2.Items.Add(Main.SubFolder_automatic) - ComboBox2.Items.Add(Main.SubFolder_Nothing) - ComboBox2.SelectedItem = Main.SubFolder_Nothing + ComboBox2.Items.Add(SubFolder_automatic) + ComboBox2.Items.Add(SubFolder_automatic2) + ComboBox2.Items.Add(SubFolder_Nothing) + ComboBox2.SelectedItem = SubFolder_Nothing TextBox4.Text = Main.Pfad Try Dim di As New System.IO.DirectoryInfo(Main.Pfad) @@ -333,17 +351,18 @@ Public Class Anime_Add Dim m3u8Strings As String = Nothing 'I/nsHttp Cookie: Try - Using client As New WebClient() - client.Headers.Add("User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0") - client.Headers.Add("ACCEPT: application/json, text/javascript, */*; q=0.01") - client.Headers.Add("Accept-Encoding: gzip, deflate, br") - client.Headers.Add("X-Requested-With: XMLHttpRequest") - client.Headers.Add(AoD_Cookie) '+ WebBrowser1.Document.Cookie) - 'MsgBox(OmUStreamSplitEpisodeIndex(1)) - m3u8Strings = client.DownloadString("https://www.anime-on-demand.de/videomaterialurl/" + OmUStreamSplitEpisodeIndex2(0) + "/OmU/1080/hlsfirst/" + OmUStreamSplitToken(0)) - '("Sub: " + m3u8Strings) - End Using - Catch ex As Exception + Using client As New WebClient() + client.Encoding = System.Text.Encoding.UTF8 + client.Headers.Add("User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0") + client.Headers.Add("ACCEPT: application/json, text/javascript, */*; q=0.01") + client.Headers.Add("Accept-Encoding: gzip, deflate, br") + client.Headers.Add("X-Requested-With: XMLHttpRequest") + client.Headers.Add(AoD_Cookie) '+ WebBrowser1.Document.Cookie) + 'MsgBox(OmUStreamSplitEpisodeIndex(1)) + m3u8Strings = client.DownloadString("https://www.anime-on-demand.de/videomaterialurl/" + OmUStreamSplitEpisodeIndex2(0) + "/OmU/1080/hlsfirst/" + OmUStreamSplitToken(0)) + '("Sub: " + m3u8Strings) + End Using + Catch ex As Exception MsgBox(ex.ToString + vbNewLine + "https://www.anime-on-demand.de/videomaterialurl/" + OmUStreamSplitEpisodeIndex2(0) + "/OmU/1080/hlsfirst/" + OmUStreamSplitToken(0)) End Try If m3u8Strings = Nothing Then @@ -365,17 +384,18 @@ Public Class Anime_Add Dim m3u8Strings As String = Nothing 'I/nsHttp Cookie: Try - Using client As New WebClient() - client.Headers.Add("User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0") - client.Headers.Add("ACCEPT: application/json, text/javascript, */*; q=0.01") - client.Headers.Add("Accept-Encoding: gzip, deflate, br") - client.Headers.Add("X-Requested-With: XMLHttpRequest") - client.Headers.Add(AoD_Cookie) '+ WebBrowser1.Document.Cookie) - 'MsgBox(DubStreamSplitEpisodeIndex(1)) - m3u8Strings = client.DownloadString("https://www.anime-on-demand.de/videomaterialurl/" + DubStreamSplitEpisodeIndex2(0) + "/Dub/1080/hlsfirst/" + DubStreamSplitToken(0)) - 'MsgBox("Dub: " + m3u8Strings) - End Using - Catch ex As Exception + Using client As New WebClient() + client.Encoding = System.Text.Encoding.UTF8 + client.Headers.Add("User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0") + client.Headers.Add("ACCEPT: application/json, text/javascript, */*; q=0.01") + client.Headers.Add("Accept-Encoding: gzip, deflate, br") + client.Headers.Add("X-Requested-With: XMLHttpRequest") + client.Headers.Add(AoD_Cookie) '+ WebBrowser1.Document.Cookie) + 'MsgBox(DubStreamSplitEpisodeIndex(1)) + m3u8Strings = client.DownloadString("https://www.anime-on-demand.de/videomaterialurl/" + DubStreamSplitEpisodeIndex2(0) + "/Dub/1080/hlsfirst/" + DubStreamSplitToken(0)) + 'MsgBox("Dub: " + m3u8Strings) + End Using + Catch ex As Exception MsgBox(ex.ToString + vbNewLine + "https://www.anime-on-demand.de/videomaterialurl/" + DubStreamSplitEpisodeIndex2(0) + "/Dub/1080/hlsfirst/" + DubStreamSplitToken(0)) End Try If m3u8Strings = Nothing Then @@ -390,29 +410,29 @@ Public Class Anime_Add End If AoD_Mode = True - If AoD_DubList.Count And AoD_OmUList.Count > 0 Then + If AoD_DubList.Count And AoD_OmUList.Count > 0 Then + ComboBox1.Items.Clear() + GroupBox3.Visible = False + groupBox2.Visible = True + groupBox1.Visible = False + ComboBox1.Enabled = True + comboBox3.Enabled = True + comboBox4.Enabled = True + ComboBox1.Items.Add("Dub") + ComboBox1.Items.Add("OmU") + FillAoDDropDown() + ElseIf AoD_DubList.Count Or AoD_OmUList.Count > 0 Then + ComboBox1.Items.Clear() + GroupBox3.Visible = False + groupBox2.Visible = True + groupBox1.Visible = False + ComboBox1.Enabled = False + comboBox3.Enabled = True + comboBox4.Enabled = True + FillAoDDropDown() + End If - GroupBox3.Visible = False - groupBox2.Visible = True - groupBox1.Visible = False - ComboBox1.Enabled = True - comboBox3.Enabled = True - comboBox4.Enabled = True - ComboBox1.Items.Add("Dub") - ComboBox1.Items.Add("OmU") - FillAoDDropDown() - ElseIf AoD_DubList.Count Or AoD_OmUList.Count > 0 Then - - GroupBox3.Visible = False - groupBox2.Visible = True - groupBox1.Visible = False - ComboBox1.Enabled = False - comboBox3.Enabled = True - comboBox4.Enabled = True - FillAoDDropDown() - End If - - ElseIf CBool(InStr(textBox1.Text, "Test=true")) Then + ElseIf CBool(InStr(textBox1.Text, "Test=true")) Then GeckoFX.WebBrowser1.Navigate(textBox1.Text) Else 'If CBool(InStr(textBox1.Text, "vrv.co")) Then If MessageBox.Show("This in NOT a Crunchyroll URL, try anyway?", "confirm?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then @@ -692,12 +712,23 @@ Public Class Anime_Add #End Region Private Sub FillAoDDropDown() - For i As Integer = 0 To AoD_OmuList.Count - 1 - Dim DropDownTitle As String() = AoD_OmuList(i).Split(New String() {My.Resources.AoD_Titel}, System.StringSplitOptions.RemoveEmptyEntries) - Dim DropDownTitle2 As String() = DropDownTitle(1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) - comboBox3.Items.Add(DropDownTitle2(0)) - comboBox4.Items.Add(DropDownTitle2(0)) - Next + comboBox3.Items.Clear() + comboBox4.Items.Clear() + If AoD_OmUList.Count > 0 Then + For i As Integer = 0 To AoD_OmUList.Count - 1 + Dim DropDownTitle As String() = AoD_OmUList(i).Split(New String() {My.Resources.AoD_Titel}, System.StringSplitOptions.RemoveEmptyEntries) + Dim DropDownTitle2 As String() = DropDownTitle(1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) + comboBox3.Items.Add(DropDownTitle2(0)) + comboBox4.Items.Add(DropDownTitle2(0)) + Next + ElseIf AoD_DubList.Count > 0 Then + For i As Integer = 0 To AoD_DubList.Count - 1 + Dim DropDownTitle As String() = AoD_DubList(i).Split(New String() {My.Resources.AoD_Titel}, System.StringSplitOptions.RemoveEmptyEntries) + Dim DropDownTitle2 As String() = DropDownTitle(1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) + comboBox3.Items.Add(DropDownTitle2(0)) + comboBox4.Items.Add(DropDownTitle2(0)) + Next + End If End Sub Public Sub Add_AoD() @@ -706,17 +737,26 @@ Public Class Anime_Add Dim RDY As Boolean = True Dim Running As Integer = Main.RunningDownloads Dim DlMax As Integer = Main.MaxDL + Dim Pfad0 As String = Main.Pfad Dim Pfad2 As String = Main.Pfad + Dim NameMethode As Integer = Main.CR_NameMethode Dim c As Integer = 0 Dim SubExit As Boolean = False Dim CB3 As Integer = 0 Dim CB4 As Integer = 0 Dim TargetReso As String = Main.Reso Dim AoD_1080pPlus As Boolean = False + Dim AoDTempReso As String = "6666x6666" + + Dim AoD_Season As String = Nothing + Dim AoD_Anime_Title As String = Nothing + Dim AoD_Episode_Title As String = Nothing + Dim AoD_Episode_Number As String = Nothing + Me.Invoke(New Action(Function() 'Main.StatusMainForm.Text = "Crunchyroll Downloader" Pfad2 = Main.Pfad - + NameMethode = Main.CR_NameMethode If Main.AoD_Reso = 0 Then TargetReso = Main.Reso ElseIf Main.AoD_Reso = 576 Then @@ -779,6 +819,9 @@ Public Class Anime_Add Exit Sub End If + + + For i As Integer = CB3 To CB4 Dim ii As Integer = i @@ -818,14 +861,99 @@ Public Class Anime_Add Return Nothing End Function)) - - Dim AoDTitle1() As String = ProcessList.Item(i).Split(New String() {My.Resources.AoD_Titel}, System.StringSplitOptions.RemoveEmptyEntries) Dim AoDTitle2() As String = AoDTitle1(1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) Dim AoDTitle As String = AoDTitle2(0) + + Try + + + If InStr(AoDHTML, My.Resources.AoD_HTML_Episode_Title) Then ' Serie + Dim AoDTitle0() As String = AoDHTML.Split(New String() {My.Resources.AoD_HTML_Episode_Title}, System.StringSplitOptions.RemoveEmptyEntries) + Dim AoDTitle00() As String = AoDTitle0(ii + 1).Split(New String() {Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries) + Dim AoD_EpisodeSplit() As String = AoDTitle00(0).Split(New String() {" - "}, System.StringSplitOptions.RemoveEmptyEntries) + AoD_Episode_Number = System.Text.RegularExpressions.Regex.Replace(AoD_EpisodeSplit(0), "[^\w\\-]", " ").Trim(" ") + AoD_Episode_Title = System.Text.RegularExpressions.Regex.Replace(AoD_EpisodeSplit(1), "[^\w\\-]", " ").Trim(" ") + + Dim AoDTitle3() As String = AoDHTML.Split(New String() {My.Resources.AoD_HTML_Anime_Title}, System.StringSplitOptions.RemoveEmptyEntries) + Dim AoDTitle4() As String = AoDTitle3(1).Split(New String() {""}, System.StringSplitOptions.RemoveEmptyEntries) + If InStr(AoDTitle4(0), " - ") Then + Dim AoD_Anime_Season_split() As String = AoDTitle4(0).Split(New String() {" - "}, System.StringSplitOptions.RemoveEmptyEntries) + AoD_Anime_Title = System.Text.RegularExpressions.Regex.Replace(AoD_Anime_Season_split(0), "[^\w\\-]", " ").Trim(" ") + AoD_Season = System.Text.RegularExpressions.Regex.Replace(AoD_Anime_Season_split(1), "[^\w\\-]", " ").Trim(" ") + + Else + AoD_Anime_Title = System.Text.RegularExpressions.Regex.Replace(AoDTitle4(0), "[^\w\\-]", " ").Trim(" ") + + End If + + + Else 'keine Serie aka Film + + Dim AoDMovie1() As String = AoDHTML.Split(New String() {My.Resources.AoD_HTML_Anime_Title}, System.StringSplitOptions.RemoveEmptyEntries) + Dim AoDMovie2() As String = AoDMovie1(1).Split(New String() {""}, System.StringSplitOptions.RemoveEmptyEntries) + If InStr(AoDMovie2(0), " - ") Then + + Dim AoDMovie_split() As String = AoDMovie2(0).Split(New String() {" - "}, System.StringSplitOptions.RemoveEmptyEntries) + AoD_Anime_Title = System.Text.RegularExpressions.Regex.Replace(AoDMovie_split(0), "[^\w\\-]", " ").Trim(" ") + AoD_Episode_Number = System.Text.RegularExpressions.Regex.Replace(AoDMovie_split(1), "[^\w\\-]", " ").Trim(" ") + AoD_Episode_Title = System.Text.RegularExpressions.Regex.Replace(AoDMovie_split(1), "[^\w\\-]", " ").Trim(" ") + Else + AoD_Anime_Title = System.Text.RegularExpressions.Regex.Replace(AoDMovie2(0), "[^\w\\-]", " ").Trim(" ") + + End If + + + + + End If + + If NameMethode = 0 Then + If AoD_Season = Nothing Then + AoDTitle = AoD_Anime_Title + " " + AoD_Episode_Number + Else + AoDTitle = AoD_Anime_Title + " " + AoD_Season + " " + AoD_Episode_Number + End If + + ElseIf NameMethode = 1 Then + If AoD_Season = Nothing Then + AoDTitle = AoD_Anime_Title + " " + AoD_Episode_Title + Else + AoDTitle = AoD_Anime_Title + " " + AoD_Season + " " + AoD_Episode_Title + End If + + ElseIf NameMethode = 2 Then + If AoD_Season = Nothing Then + AoDTitle = AoD_Anime_Title + " " + AoD_Episode_Number + " " + AoD_Episode_Title + Else + AoDTitle = AoD_Anime_Title + " " + AoD_Season + " " + AoD_Episode_Number + " " + AoD_Episode_Title + End If + + End If + + Catch ex As Exception + + End Try + AoDTitle = System.Text.RegularExpressions.Regex.Replace(AoDTitle, "[^\w\\-]", " ").Trim(" ") AoDTitle = Main.RemoveExtraSpaces(AoDTitle) + + Pfad2 = UseSubfolder(AoD_Anime_Title, AoD_Season, Pfad2) + + If Not Directory.Exists(Path.GetDirectoryName(Pfad2)) Then + ' Nein! Jetzt erstellen... + Try + Directory.CreateDirectory(Path.GetDirectoryName(Pfad2)) + Catch ex As Exception + ' Ordner wurde nich erstellt + Pfad2 = Pfad0 + End Try + End If + + + Dim DownloadPfad As String = Chr(34) + Pfad2 + "\" + AoDTitle + ".mp4" + Chr(34) + #Region "lösche doppel download" Dim Pfad5 As String = DownloadPfad.Replace(Chr(34), "") @@ -894,7 +1022,8 @@ Public Class Anime_Add ' End Function)) m3u8_list.Add(new_m3u8(i2) + vbCrLf + new_m3u8(i2 + 1)) End If - + ElseIf CBool(InStr(new_m3u8(i2), AoDTempReso)) = True Then + m3u8_list.Add(new_m3u8(i2) + vbCrLf + new_m3u8(i2 + 1)) End If Next @@ -955,9 +1084,33 @@ Public Class Anime_Add m3u8_url_Temp = new_m3u8_2(1) End If Next - Else + ElseIf m3u8_list.Count = 1 Then Dim new_m3u8_2() As String = m3u8_list.Item(0).Split(New String() {vbLf}, System.StringSplitOptions.RemoveEmptyEntries) m3u8_url_Temp = new_m3u8_2(1) + Else + + Me.Invoke(New Action(Function() + Me.Text = "Status: Resolution not found!" + Me.Invalidate() + Main.DialogTaskString = "AoD_Resolution" + Main.ResoNotFoundString = text + ErrorDialog.ShowDialog() + AoDTempReso = Main.ResoBackString + Return Nothing + End Function)) + + + + Dim m3u8BackupReso() As String = text.Split(New String() {vbLf}, System.StringSplitOptions.RemoveEmptyEntries) + + For i2 As Integer = 0 To m3u8BackupReso.Count - 1 + Dim ii2 As Integer = i2 + If CBool(InStr(m3u8BackupReso(i2), AoDTempReso)) = True Then + + m3u8_url_Temp = m3u8BackupReso(ii2 + 1) + End If + Next + End If If InStr(m3u8_url_Temp, "https://") Then @@ -981,6 +1134,11 @@ Public Class Anime_Add If AoD_1080pPlus = True Then DisplayReso = "1080p+" End If + If AoDTempReso = "6666x6666" Then + Else + Dim ResoSplit() As String = AoDTempReso.Split(New String() {"x"}, System.StringSplitOptions.RemoveEmptyEntries) + DisplayReso = ResoSplit(1) + "p" + End If Dim L1Name As String = "anime-on-demand.de" 'L1Name_Split(1).Replace("www.", "") + " | Dub : " + FunimationDub Me.Invoke(New Action(Function() Main.ListItemAdd(Pfad2, L1Name, AoDTitle, DisplayReso, "Unknown", "None", AoDThumbnail, AoDm3u8Final, DownloadPfad) diff --git a/Crunchyroll Downloader/CRD_List_Item.vb b/Crunchyroll Downloader/CRD_List_Item.vb index 2c4278f..62ed991 100644 --- a/Crunchyroll Downloader/CRD_List_Item.vb +++ b/Crunchyroll Downloader/CRD_List_Item.vb @@ -32,6 +32,10 @@ Public Class CRD_List_Item Dim HybridModePath As String = Nothing Dim HybridRunning As Boolean = False Dim TargetReso As Integer = 1080 + Dim HybrideLog As String = Nothing + + + #Region "Remove from list" Public Sub DisposeItem(ByVal Dispose As Boolean) If Dispose = True Then @@ -143,16 +147,16 @@ Public Class CRD_List_Item End If End Sub - Private Sub bt_del_MouseEnter(sender As Object, e As EventArgs) Handles bt_del.MouseEnter + Private Sub BT_del_MouseEnter(sender As Object, e As EventArgs) Handles bt_del.MouseEnter Dim p As PictureBox = sender p.BackgroundImage = My.Resources.main_del_hover End Sub - Private Sub bt_del_MouseLeave(sender As Object, e As EventArgs) Handles bt_del.MouseLeave + Private Sub BT_del_MouseLeave(sender As Object, e As EventArgs) Handles bt_del.MouseLeave Dim p As PictureBox = sender p.BackgroundImage = My.Resources.main_del End Sub - Private Sub bt_pause_MouseEnter(sender As Object, e As EventArgs) Handles bt_pause.MouseEnter + Private Sub BT_pause_MouseEnter(sender As Object, e As EventArgs) Handles bt_pause.MouseEnter Dim p As PictureBox = sender If StatusRunning = True Then p.BackgroundImage = My.Resources.main_pause_hover @@ -161,7 +165,7 @@ Public Class CRD_List_Item End If End Sub - Private Sub bt_pause_MouseLeave(sender As Object, e As EventArgs) Handles bt_pause.MouseLeave + Private Sub BT_pause_MouseLeave(sender As Object, e As EventArgs) Handles bt_pause.MouseLeave Dim p As PictureBox = sender If StatusRunning = True Then p.BackgroundImage = My.Resources.main_pause @@ -170,7 +174,7 @@ Public Class CRD_List_Item End If End Sub - Private Sub bt_pause_Click(sender As Object, e As EventArgs) Handles bt_pause.Click + Private Sub BT_pause_Click(sender As Object, e As EventArgs) Handles bt_pause.Click If Canceld = True And HybridRunning = True Then If Main.RunningDownloads < Main.MaxDL Then @@ -333,10 +337,18 @@ Public Class CRD_List_Item End Sub #Region "Download Cache" - Private Sub tsDownloadAsync(ByVal DL_URL As String, ByVal DL_Pfad As String) + + Public WithEvents WC_TS As WebClient + + + + Private Sub TS_DownloadAsync(ByVal DL_URL As String, ByVal DL_Pfad As String) + HybrideLog = HybrideLog + vbNewLine + DL_Pfad + " - " + DL_URL Try - Dim wc_ts As New WebClient - wc_ts.DownloadFile(New Uri(DL_URL), DL_Pfad) + 'Dim wc_ts As New WebClient + WC_TS = New WebClient + + WC_TS.DownloadFile(New Uri(DL_URL), DL_Pfad) Catch ex As Exception Try Dim wc_ts As New WebClient @@ -348,7 +360,7 @@ Public Class CRD_List_Item End Try End Sub - Private Function tsStatusAsync(ByVal prozent As Integer, ByVal di As IO.DirectoryInfo, ByVal Filename As String, ByVal pausetime As Integer) + Private Function TS_StatusAsync(ByVal prozent As Integer, ByVal di As IO.DirectoryInfo, ByVal Filename As String, ByVal pausetime As Integer) Dim Now As Date = Date.Now Dim FinishedSize As Double = 0 @@ -379,11 +391,16 @@ Public Class CRD_List_Item ElseIf prozent < 0 Then prozent = 0 End If - Me.Invoke(New Action(Function() - ProgressBar1.Value = prozent - Label_percent.Text = DataRateString + "MB\s " + Math.Round(FinishedSize, 2, MidpointRounding.AwayFromZero).ToString + "MB/" + Math.Round(AproxFinalSize, 2, MidpointRounding.AwayFromZero).ToString + "MB " + prozent.ToString + "%" - Return Nothing - End Function)) + Try + Me.Invoke(New Action(Function() + + ProgressBar1.Value = prozent + Label_percent.Text = DataRateString + "MB\s " + Math.Round(FinishedSize, 2, MidpointRounding.AwayFromZero).ToString + "MB/" + Math.Round(AproxFinalSize, 2, MidpointRounding.AwayFromZero).ToString + "MB " + prozent.ToString + "%" + + Return Nothing + End Function)) + Catch ex As Exception + End Try 'RaiseEvent UpdateUI(Filename, prozent, FinishedSize, AproxFinalSize, Color.FromArgb(247, 140, 37), DataRateString + "MB\s") Return Nothing @@ -499,7 +516,6 @@ Public Class CRD_List_Item Dim ts_dl As String = Nothing HybridModePath = Pfad2 - 'MsgBox(HybridModePath) If Debug2 = True Then MsgBox(Pfad2) End If @@ -539,8 +555,11 @@ Public Class CRD_List_Item Next Return Nothing Exit Function + 'ElseIf nummerint < Threads Then + ' Thread.Sleep(2000) + ' Exit For Else - + Thread.Sleep(1000) Exit For End If Next @@ -567,15 +586,16 @@ Public Class CRD_List_Item curi = path + textLenght(i) End If - Dim Evaluator = New Thread(Sub() Me.tsDownloadAsync(curi, Pfad2 + nummer4D + ".ts")) + Dim Evaluator = New Thread(Sub() Me.TS_DownloadAsync(curi, Pfad2 + nummer4D + ".ts")) Evaluator.Start() ThreadList.Add(Evaluator) - m3u8FFmpeg = m3u8FFmpeg + Pfad2 + nummer4D + ".ts" + vbLf + m3u8FFmpeg = m3u8FFmpeg + Pfad2 + nummer4D + ".ts" + vbLf '+ "#" + curi + vbLf Dim FragmentsFinised = (ThreadList.Count + nummerint) / FragmentsInt * 100 - tsStatusAsync(FragmentsFinised, di, Filename, PauseTime) + TS_StatusAsync(FragmentsFinised, di, Filename, PauseTime) ElseIf textLenght(i) = "#EXT-X-PLAYLIST-TYPE:VOD" Then + ElseIf InStr(textLenght(i), "URI=" + Chr(34)) Then Dim KeyLine As String = textLenght(i) If InStr(KeyLine, "https://") Then @@ -713,17 +733,21 @@ Public Class CRD_List_Item Exit For End If Next - tsStatusAsync(100, di, Filename, PauseTime) + TS_StatusAsync(100, di, Filename, PauseTime) DL_URL = DL_URL.Replace(m3u8_url(1), Pfad2 + "index" + Folder + ".m3u8") + Using sink3 As New StreamWriter(Path.GetDirectoryName(DL_Pfad.Replace(Chr(34), "")) + "\hybridelog.log", False, utf8WithoutBom) + sink3.WriteLine(HybrideLog) + End Using + 'MsgBox(DL_URL) Dim exepath As String = Application.StartupPath + "\ffmpeg.exe" Dim startinfo As New System.Diagnostics.ProcessStartInfo Dim cmd As String = "-allowed_extensions ALL " + DL_URL + " " + DL_Pfad '+ " " + ffmpeg_command + " " + DL_Pfad 'start ffmpeg with command strFFCMD string - ' MsgBox(cmd) -headers " + Chr(34) + "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0" + Chr(34) + + ' MsgBox(cmd) -headers " + Chr(34) + "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0" + Chr(34) + If Debug2 = True Then MsgBox(cmd) End If @@ -809,7 +833,7 @@ Public Class CRD_List_Item ' End Function)) End Sub - Sub ffmpegOutput(ByVal sender As Object, ByVal e As DataReceivedEventArgs) + Sub FFMPEGOutput(ByVal sender As Object, ByVal e As DataReceivedEventArgs) 'timeout = DateTime.Now 'MsgBox(timeout) Try @@ -928,7 +952,7 @@ Public Class CRD_List_Item If HybridMode = True Then Thread.Sleep(5000) Try - System.IO.Directory.Delete(HybridModePath, True) + 'System.IO.Directory.Delete(HybridModePath, True) Catch ex As Exception End Try End If @@ -975,7 +999,7 @@ Public Class CRD_List_Item End Sub #End Region - Private Sub bt_del_Click(sender As Object, e As EventArgs) Handles bt_del.Click + Private Sub BT_del_Click(sender As Object, e As EventArgs) Handles bt_del.Click If Canceld = True Then If MessageBox.Show("The Download is not running anymore, press ok to remove it from the list.", "Remove from list!", MessageBoxButtons.OKCancel) = DialogResult.Cancel Then Exit Sub @@ -1075,5 +1099,10 @@ Public Class CRD_List_Item ProgressBar1.Width = Me.Width - 223 End Sub + + + + + End Class diff --git a/Crunchyroll Downloader/Crunchyroll Downloader.vbproj b/Crunchyroll Downloader/Crunchyroll Downloader.vbproj index d01ccfe..f99967d 100644 --- a/Crunchyroll Downloader/Crunchyroll Downloader.vbproj +++ b/Crunchyroll Downloader/Crunchyroll Downloader.vbproj @@ -190,6 +190,7 @@ UserControl + diff --git a/Crunchyroll Downloader/ErrorDialog.vb b/Crunchyroll Downloader/ErrorDialog.vb index 9a0dc29..73c34f5 100644 --- a/Crunchyroll Downloader/ErrorDialog.vb +++ b/Crunchyroll Downloader/ErrorDialog.vb @@ -81,6 +81,26 @@ End If Next + Dim Reso_avaible1 As String() = Main.ResoNotFoundString.Split(New String() {"RESOLUTION="}, System.StringSplitOptions.RemoveEmptyEntries) + For i As Integer = 0 To ResoList.Count - 1 + Dim Reso_avaible As String() = ResoList.Item(i).Split(New String() {"RESOLUTION="}, System.StringSplitOptions.RemoveEmptyEntries) + ComboBox1.Items.Add(Reso_avaible(1)) + Next + SurroundingSub() + Try + ComboBox1.SelectedIndex = 0 + Catch ex As Exception + End Try + ElseIf Main.DialogTaskString = "AoD_Resolution" Then + StatusLabel.Text = Main.LabelResoNotFoundText + Dim ResoList As New List(Of String) + Dim m3u8_split As String() = Main.ResoNotFoundString.Split(New String() {vbLf}, System.StringSplitOptions.RemoveEmptyEntries) + For i As Integer = 0 To m3u8_split.Count - 1 + If InStr(m3u8_split(i), "RESOLUTION=") Then + ResoList.Add(m3u8_split(i)) + End If + Next + Dim Reso_avaible1 As String() = Main.ResoNotFoundString.Split(New String() {"RESOLUTION="}, System.StringSplitOptions.RemoveEmptyEntries) For i As Integer = 0 To ResoList.Count - 1 Dim Reso_avaible As String() = ResoList.Item(i).Split(New String() {"RESOLUTION="}, System.StringSplitOptions.RemoveEmptyEntries) @@ -142,16 +162,16 @@ PictureBox9.Image = My.Resources.DialogNotFound_Submit End Sub - Private Sub pictureBox3_Click(sender As Object, e As EventArgs) Handles pictureBox3.Click + Private Sub PictureBox3_Click(sender As Object, e As EventArgs) Handles pictureBox3.Click Main.UserCloseDialog = True Me.Close() End Sub - Private Sub pictureBox3_MouseEnter(sender As Object, e As EventArgs) Handles pictureBox3.MouseEnter + Private Sub PictureBox3_MouseEnter(sender As Object, e As EventArgs) Handles pictureBox3.MouseEnter pictureBox3.BackColor = SystemColors.Control End Sub - Private Sub pictureBox3_MouseLeave(sender As Object, e As EventArgs) Handles pictureBox3.MouseLeave + Private Sub PictureBox3_MouseLeave(sender As Object, e As EventArgs) Handles pictureBox3.MouseLeave pictureBox3.BackColor = Color.Transparent End Sub diff --git a/Crunchyroll Downloader/GeckoFX.vb b/Crunchyroll Downloader/GeckoFX.vb index 146b8a0..ba58f87 100644 --- a/Crunchyroll Downloader/GeckoFX.vb +++ b/Crunchyroll Downloader/GeckoFX.vb @@ -195,6 +195,7 @@ Public Class GeckoFX Main.WebbrowserURL = WebBrowser1.Url.ToString Main.WebbrowserText = WebBrowser1.Document.Body.OuterHtml Main.WebbrowserTitle = WebBrowser1.DocumentTitle + Anime_Add.AoDHTML = WebBrowser1.Document.Body.OuterHtml Exit Sub diff --git a/Crunchyroll Downloader/Main.vb b/Crunchyroll Downloader/Main.vb index 5a683d7..6083a7a 100644 --- a/Crunchyroll Downloader/Main.vb +++ b/Crunchyroll Downloader/Main.vb @@ -57,7 +57,6 @@ Public Class Main Public ResoSave As String = "6666x6666" Public ResoFunBackup As String = "6666x6666" Public SubSprache As String - Public SubFolder As Integer Public SoftSubs As New List(Of String) Public TempSoftSubs As New List(Of String) Public AbourtList As New List(Of String) @@ -93,8 +92,6 @@ Public Class Main Public SubFunimation As New List(Of String) #Region "Sprachen Vairablen" Public URL_Invaild As String = "something is wrong here..." - Public SubFolder_automatic As String = "[automatic : Series/Season]" - Public SubFolder_Nothing As String = "[ ignore subfolder ]" 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." @@ -387,9 +384,9 @@ Public Class Main Try Dim rkg As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\CRDownloader") - SubFolder = Integer.Parse(rkg.GetValue("SubFolder").ToString) + SubFolder_Value = rkg.GetValue("SubFolder_Value").ToString Catch ex As Exception - SubFolder = 1 + SubFolder_Value = SubFolder_Nothing End Try Try @@ -816,21 +813,14 @@ Public Class Main Dim CR_Anime_Staffel As String = Nothing Dim CR_Anime_Folge As String = Nothing #Region "Name + Pfad" - Dim Pfad2 As String + Dim Pfad2 As String = Nothing Dim CR_FilenName As String = Nothing - Dim SubfolderValue As String = Nothing + 'Dim SubfolderValue As String = Nothing Dim CR_FilenName_Backup As String = Nothing #Region "Name von Crunchyroll" - 'Dim Bug_Deutsch As String = "-" - 'If CBool(InStr(WebbrowserTitle, "Anschauen auf Crunchyroll")) Then - ' Bug_Deutsch = ":" - 'End If - 'Dim CR_Name_by_Titel_2 As String() = WebbrowserTitle.Split(New String() {Bug_Deutsch}, System.StringSplitOptions.RemoveEmptyEntries) - 'CR_FilenName = CR_Name_by_Titel_2(0).Trim() - Dim Bug_Deutsch As String = "-" If CBool(InStr(WebbrowserTitle, "Anschauen auf Crunchyroll")) Then Bug_Deutsch = ":" @@ -884,11 +874,9 @@ Public Class Main CR_FilenName = System.Text.RegularExpressions.Regex.Replace(CR_FilenName, "[^\w\\-]", " ") CR_FilenName = RemoveExtraSpaces(CR_FilenName) - If SubfolderValue = Nothing Then - Pfad2 = Pfad + "\" + CR_FilenName + ".mp4" - Else - Pfad2 = Pfad + "\" + SubfolderValue + CR_FilenName + ".mp4" - End If + Pfad2 = UseSubfolder(CR_Anime_Titel, CR_Anime_Staffel, Pfad) + + If Not Directory.Exists(Path.GetDirectoryName(Pfad2)) Then ' Nein! Jetzt erstellen... Try @@ -898,7 +886,8 @@ Public Class Main Pfad2 = Pfad + "\" + CR_FilenName_Backup + ".mp4" End Try End If - Pfad2 = Chr(34) + Pfad2 + Chr(34) + + Pfad2 = Chr(34) + Pfad2 + CR_FilenName + ".mp4" + Chr(34) #End Region #Region "Subs" @@ -935,63 +924,7 @@ Public Class Main Next End If -#Region "copy paste trash" - - 'If SubSprache = "None" Then - ' If CBool(InStr(WebbrowserText, Chr(34) + "hardsub_lang" + Chr(34) + ":null")) Then - ' SubSprache2 = "null" - ' Else - ' Me.Invoke(New Action(Function() - ' ResoNotFoundString = WebbrowserText - ' DialogTaskString = "Language" - ' Reso.ShowDialog() - ' Return Nothing - ' End Function)) - ' If UserCloseDialog = True Then - ' Throw New System.Exception(Chr(34) + "UserAbort" + Chr(34)) - ' Else - ' If ResoBackString = Nothing Then - ' Else - ' SubSprache2 = ResoBackString - ' End If - ' End If - ' 'Throw New System.Exception("Could not find the sub language") - ' End If - - - 'Else - ' If CBool(InStr(WebbrowserText, Chr(34) + "hardsub_lang" + Chr(34) + ":" + Chr(34) + SubSprache + Chr(34) + ",")) Then - ' SubSprache2 = Chr(34) + SubSprache + Chr(34) - - ' ElseIf CBool(InStr(WebbrowserText, Chr(34) + "language" + Chr(34) + ":" + Chr(34) + SubSprache + Chr(34) + ",")) Then - ' If MessageBox.Show("It look like only Softsubtitle are avalibe." + vbNewLine + "Are you want to use Softsubtitle this time instead?", "No Hardsubtitle", MessageBoxButtons.YesNo) = DialogResult.Yes Then - ' SubSprache2 = "null" - ' SoftSubs2.Add(SubSprache) - ' Else - ' Throw New System.Exception("Could not find the sub language") - ' End If - - - ' Else - ' Me.Invoke(New Action(Function() - ' ResoNotFoundString = WebbrowserText - ' DialogTaskString = "Language" - ' Reso.ShowDialog() - ' Return Nothing - ' End Function)) - ' If UserCloseDialog = True Then - ' Throw New System.Exception(Chr(34) + "UserAbort" + Chr(34)) - ' Else - ' If ResoBackString = Nothing Then - ' Else - ' SubSprache2 = ResoBackString - ' End If - ' End If - ' End If - 'End If - -#End Region #End Region If Grapp_Abord = True Then @@ -1325,7 +1258,6 @@ Public Class Main Dim Pfad2 As String Dim TextBox2_Text As String = Nothing Dim CR_FilenName As String = Nothing - Dim SubfolderValue As String = Nothing Dim CR_FilenName_Backup As String = Nothing Me.Invoke(New Action(Function() @@ -1333,8 +1265,8 @@ Public Class Main Return Nothing End Function)) #Region "Name von Crunchyroll" - If TextBox2_Text = Nothing Or TextBox2_Text = "Name of the Anime" Then - Dim Bug_Deutsch As String = "-" + + Dim Bug_Deutsch As String = "-" If CBool(InStr(WebbrowserTitle, "Anschauen auf Crunchyroll")) Then Bug_Deutsch = ":" End If @@ -1414,48 +1346,18 @@ Public Class Main #End Region + If TextBox2_Text = Nothing Or TextBox2_Text = "Name of the Anime" Then Else - Me.Invoke(New Action(Function() - If Anime_Add.ComboBox2.Text = SubFolder_automatic Then - MsgBox(SubFolder_automatic + " is not working with a costum name", MsgBoxStyle.Information) - ElseIf Anime_Add.ComboBox2.Text = SubFolder_Nothing Then - Else - SubfolderValue = Anime_Add.ComboBox2.Text + "\" - End If - Return Nothing - End Function)) - 'MsgBox(TextBox2_Text) CR_FilenName = RemoveExtraSpaces(System.Text.RegularExpressions.Regex.Replace(TextBox2_Text, "[^\w\\-]", " ")) CR_FilenName_Backup = CR_FilenName End If - Me.Invoke(New Action(Function() - If Anime_Add.ComboBox2.Text = SubFolder_automatic Then - If SubFolder = 2 Then - SubfolderValue = CR_Anime_Titel + "\" + CR_Anime_Staffel + "\" - ElseIf SubFolder = 1 Then - SubfolderValue = CR_Anime_Titel + "\" - End If - ElseIf Anime_Add.ComboBox2.Text = SubFolder_Nothing Then - Else - SubfolderValue = Anime_Add.ComboBox2.Text + "\" - End If - Return Nothing - End Function)) CR_FilenName = System.Text.RegularExpressions.Regex.Replace(CR_FilenName, "[^\w\\-]", " ") CR_FilenName = RemoveExtraSpaces(CR_FilenName) - 'MsgBox(Pfad) - If SubfolderValue = Nothing Then - Pfad2 = Pfad + "\" + CR_FilenName + ".mp4" - 'MsgBox(Pfad + vbNewLine + Pfad2) - ElseIf SubfolderValue = "\" Then - Pfad2 = Pfad + "\" + CR_FilenName + ".mp4" - 'MsgBox(Pfad + vbNewLine + Pfad2) - Else - Pfad2 = Pfad + "\" + SubfolderValue + CR_FilenName + ".mp4" - 'MsgBox(Pfad + vbNewLine + Pfad2 + vbNewLine + SubfolderValue) - End If + + Pfad2 = UseSubfolder(CR_Anime_Titel, CR_Anime_Staffel, Pfad) + If Not Directory.Exists(Path.GetDirectoryName(Pfad2)) Then ' Nein! Jetzt erstellen... Try @@ -1465,7 +1367,8 @@ Public Class Main Pfad2 = Pfad + "\" + CR_FilenName_Backup + ".mp4" End Try End If - Pfad2 = Chr(34) + Pfad2 + Chr(34) + + Pfad2 = Chr(34) + Pfad2 + "\" + CR_FilenName + ".mp4" + Chr(34) #End Region #Region "Subs" @@ -2209,7 +2112,6 @@ Public Class Main #Region "Pfad" Dim TextBox2_Text As String = Nothing - Dim SubfolderValue As String = Nothing Me.Invoke(New Action(Function() TextBox2_Text = Anime_Add.textBox2.Text Return Nothing @@ -2219,35 +2121,15 @@ Public Class Main Else Me.Invoke(New Action(Function() - If Anime_Add.ComboBox2.Text = SubFolder_automatic Then - MsgBox(SubFolder_automatic + " is not working with a costum name", MsgBoxStyle.Information) - ElseIf Anime_Add.ComboBox2.Text = SubFolder_Nothing Then - Else - SubfolderValue = Anime_Add.ComboBox2.Text + "\" - End If + Return Nothing End Function)) End If - Me.Invoke(New Action(Function() - If Anime_Add.ComboBox2.Text = SubFolder_automatic Then - If SubFolder = 2 Then - SubfolderValue = FunimationTitle + "\" + FunimationSeason + "\" - ElseIf SubFolder = 1 Then - SubfolderValue = FunimationTitle + "\" - End If - ElseIf Anime_Add.ComboBox2.Text = SubFolder_Nothing Then - Else - SubfolderValue = Anime_Add.ComboBox2.Text + "\" - End If - Return Nothing - End Function)) - If SubfolderValue = Nothing Then - DownloadPfad = Pfad + "\" + DefaultName + ".mp4" - Else - DownloadPfad = Pfad + "\" + SubfolderValue + DefaultName + ".mp4" - End If + + DownloadPfad = UseSubfolder(FunimationTitle, FunimationEpisode, Pfad) + If Not Directory.Exists(Path.GetDirectoryName(DownloadPfad)) Then ' Nein! Jetzt erstellen... Try @@ -2258,6 +2140,9 @@ Public Class Main End Try End If + DownloadPfad = DownloadPfad + DefaultName + ".mp4" + + #Region "lösche doppel download" Dim Pfad5 As String = DownloadPfad.Replace(Chr(34), "") @@ -2861,7 +2746,7 @@ Public Class Main bytes = clientSocket.Receive(recvBytes, 0, clientSocket.Available, SocketFlags.None) htmlReq = Encoding.UTF8.GetString(recvBytes, 0, bytes) 'MsgBox(htmlReq) - 'My.Computer.FileSystem.WriteAllText(Application.StartupPath + "\log.txt", htmlReq + vbNewLine, True) + My.Computer.FileSystem.WriteAllText(Application.StartupPath + "\log.txt", htmlReq + vbNewLine, True) Dim rootPath As String = Directory.GetCurrentDirectory() & "\WebInterface\" ' Set default page Dim defaultPage As String = "index.html" @@ -3088,7 +2973,7 @@ Public Class Main ' Send HTTP Response - Private Sub sendHTMLResponse(ByVal httpRequest As String, ByVal clientSocket As Socket) + Private Sub SendHTMLResponse(ByVal httpRequest As String, ByVal clientSocket As Socket) Try Dim respByte() As Byte @@ -3144,7 +3029,7 @@ Public Class Main End Sub ' Get Content Type - Private Function getContentType(ByVal httpRequest As String) As String + Private Function GetContentType(ByVal httpRequest As String) As String If (httpRequest.EndsWith("html")) Then Return "text/html" ElseIf (httpRequest.EndsWith("htm")) Then diff --git a/Crunchyroll Downloader/My Project/Resources.Designer.vb b/Crunchyroll Downloader/My Project/Resources.Designer.vb index 4e00bb6..3736232 100644 --- a/Crunchyroll Downloader/My Project/Resources.Designer.vb +++ b/Crunchyroll Downloader/My Project/Resources.Designer.vb @@ -129,6 +129,24 @@ Namespace My.Resources End Get End Property + ''' + ''' Sucht eine lokalisierte Zeichenfolge, die <h1 itemprop="name"> ähnelt. + ''' + Friend ReadOnly Property AoD_HTML_Anime_Title() As String + Get + Return ResourceManager.GetString("AoD_HTML_Anime_Title", resourceCulture) + End Get + End Property + + ''' + ''' Sucht eine lokalisierte Zeichenfolge, die <h3 class="episodebox-title" title=" ähnelt. + ''' + Friend ReadOnly Property AoD_HTML_Episode_Title() As String + Get + Return ResourceManager.GetString("AoD_HTML_Episode_Title", resourceCulture) + End Get + End Property + ''' ''' Sucht eine lokalisierte Zeichenfolge, die "image":" ähnelt. ''' diff --git a/Crunchyroll Downloader/My Project/Resources.resx b/Crunchyroll Downloader/My Project/Resources.resx index e0ab6ba..4f087bf 100644 --- a/Crunchyroll Downloader/My Project/Resources.resx +++ b/Crunchyroll Downloader/My Project/Resources.resx @@ -520,4 +520,10 @@ Dialogue: 0,0:00:00.00,0:00:00.00,Default,,0000,0000,0000,,some ideas on how tem {"src": " + + <h1 itemprop="name"> + + + <h3 class="episodebox-title" title=" + \ No newline at end of file diff --git a/Crunchyroll Downloader/Subfolder.vb b/Crunchyroll Downloader/Subfolder.vb new file mode 100644 index 0000000..3f04ce8 --- /dev/null +++ b/Crunchyroll Downloader/Subfolder.vb @@ -0,0 +1,34 @@ +Module Subfolder + Public SubFolder_automatic As String = "[automatic by Series and Season]" + Public SubFolder_automatic2 As String = "[automatic by Series]" + Public SubFolder_Nothing As String = "[ ignore subfolder ]" + + Public SubFolder_Value As String = "[ ignore subfolder ]" + + + Public Function UseSubfolder(ByVal Series As String, ByVal Season As String, ByVal Path As String) + Dim newPath As String = Path + + If SubFolder_Value = SubFolder_automatic Then + + newPath = Path + "\" + Series + "\" + Season + "\" + + ElseIf SubFolder_Value = SubFolder_automatic2 Then + + newPath = Path + "\" + Series + "\" + + ElseIf SubFolder_Value = SubFolder_Nothing Then + + newPath = Path + + Else + + newPath = Path + "\" + SubFolder_Value + "\" + + End If + + + Return newPath.Replace("\\", "\") + End Function + +End Module diff --git a/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.exe b/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.exe index 3b5bd09..dc4c92c 100644 Binary files a/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.exe and b/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.exe differ diff --git a/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.pdb b/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.pdb index d1b0ade..cc47f20 100644 Binary files a/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.pdb and b/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.pdb differ diff --git a/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.xml b/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.xml index 6a9ae16..a1f536e 100644 --- a/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.xml +++ b/Crunchyroll Downloader/bin/x86/Debug/Crunchyroll Downloader.xml @@ -57,6 +57,16 @@ Crunchyroll Downloader Sucht eine lokalisierte Zeichenfolge, die {"sources":[{"file":" ähnelt. + + + Sucht eine lokalisierte Zeichenfolge, die <h1 itemprop="name"> ähnelt. + + + + + Sucht eine lokalisierte Zeichenfolge, die <h3 class="episodebox-title" title=" ähnelt. + + Sucht eine lokalisierte Zeichenfolge, die "image":" ähnelt. diff --git a/Crunchyroll Downloader/bin/x86/Debug/WebInterface/favicon.ico b/Crunchyroll Downloader/bin/x86/Debug/WebInterface/favicon.ico new file mode 100644 index 0000000..aba7dd7 Binary files /dev/null and b/Crunchyroll Downloader/bin/x86/Debug/WebInterface/favicon.ico differ diff --git a/Crunchyroll Downloader/bin/x86/Debug/WebInterface/index.html b/Crunchyroll Downloader/bin/x86/Debug/WebInterface/index.html index 00ce397..2a878fe 100644 --- a/Crunchyroll Downloader/bin/x86/Debug/WebInterface/index.html +++ b/Crunchyroll Downloader/bin/x86/Debug/WebInterface/index.html @@ -27,9 +27,37 @@ .liClass{margin-bottom:8px} -Crunchyroll Downloader +Status: 1 / 1 image error +
+ +image error + +
+ +
ARIFURETA Sub Episode 3 Die goldene Vampirprinzessin
+ +
+ +
+ +
+Finished - 224,72MB +
+
+[Auto] + + image errornull + +
+ +
+ +
+ +image error