mirror of
https://github.com/hama3254/Crunchyroll-Downloader-v3.0.git
synced 2024-12-23 22:51:48 +01:00
Added advanced network scan
Added advanced network scan
This commit is contained in:
parent
e2248d0c8d
commit
c66f9702ad
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -749,9 +749,9 @@ Public Class Anime_Add
|
||||
|
||||
|
||||
If comboBox4.SelectedIndex > comboBox3.SelectedIndex Or comboBox4.SelectedIndex = comboBox3.SelectedIndex Then
|
||||
c = comboBox4.SelectedIndex - comboBox3.SelectedIndex + 1
|
||||
Else
|
||||
Dim TempCB3 As Integer = comboBox3.SelectedIndex
|
||||
c = comboBox4.SelectedIndex - comboBox3.SelectedIndex + 1
|
||||
Else
|
||||
Dim TempCB3 As Integer = comboBox3.SelectedIndex
|
||||
Dim TempCB4 As Integer = comboBox4.SelectedIndex
|
||||
comboBox3.SelectedIndex = TempCB4
|
||||
comboBox4.SelectedIndex = TempCB3
|
||||
|
24
Crunchyroll Downloader/CRD_List_Item.Designer.vb
generated
24
Crunchyroll Downloader/CRD_List_Item.Designer.vb
generated
@ -36,6 +36,8 @@ Partial Class CRD_List_Item
|
||||
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
|
||||
Me.ViewInExplorerToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.PlaybackVideoFileToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.LogTocClipboard = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.SaveToFile = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.PictureBox5 = New System.Windows.Forms.PictureBox()
|
||||
Me.ProgressBar1 = New MetroFramework.Controls.MetroProgressBar()
|
||||
Me.MetroStyleManager1 = New MetroFramework.Components.MetroStyleManager(Me.components)
|
||||
@ -145,22 +147,34 @@ Partial Class CRD_List_Item
|
||||
'
|
||||
'ContextMenuStrip1
|
||||
'
|
||||
Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ViewInExplorerToolStripMenuItem, Me.PlaybackVideoFileToolStripMenuItem})
|
||||
Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ViewInExplorerToolStripMenuItem, Me.PlaybackVideoFileToolStripMenuItem, Me.LogTocClipboard, Me.SaveToFile})
|
||||
Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
|
||||
Me.ContextMenuStrip1.Size = New System.Drawing.Size(173, 48)
|
||||
Me.ContextMenuStrip1.Size = New System.Drawing.Size(190, 92)
|
||||
'
|
||||
'ViewInExplorerToolStripMenuItem
|
||||
'
|
||||
Me.ViewInExplorerToolStripMenuItem.Name = "ViewInExplorerToolStripMenuItem"
|
||||
Me.ViewInExplorerToolStripMenuItem.Size = New System.Drawing.Size(172, 22)
|
||||
Me.ViewInExplorerToolStripMenuItem.Size = New System.Drawing.Size(189, 22)
|
||||
Me.ViewInExplorerToolStripMenuItem.Text = "View in explorer"
|
||||
'
|
||||
'PlaybackVideoFileToolStripMenuItem
|
||||
'
|
||||
Me.PlaybackVideoFileToolStripMenuItem.Name = "PlaybackVideoFileToolStripMenuItem"
|
||||
Me.PlaybackVideoFileToolStripMenuItem.Size = New System.Drawing.Size(172, 22)
|
||||
Me.PlaybackVideoFileToolStripMenuItem.Size = New System.Drawing.Size(189, 22)
|
||||
Me.PlaybackVideoFileToolStripMenuItem.Text = "playback video file"
|
||||
'
|
||||
'LogTocClipboard
|
||||
'
|
||||
Me.LogTocClipboard.Name = "LogTocClipboard"
|
||||
Me.LogTocClipboard.Size = New System.Drawing.Size(189, 22)
|
||||
Me.LogTocClipboard.Text = "Copy log to clipboard"
|
||||
'
|
||||
'SaveToFile
|
||||
'
|
||||
Me.SaveToFile.Name = "SaveToFile"
|
||||
Me.SaveToFile.Size = New System.Drawing.Size(189, 22)
|
||||
Me.SaveToFile.Text = "Save log to file"
|
||||
'
|
||||
'PictureBox5
|
||||
'
|
||||
Me.PictureBox5.BackgroundImage = Global.Crunchyroll_Downloader.My.Resources.Resources.balken
|
||||
@ -228,4 +242,6 @@ Partial Class CRD_List_Item
|
||||
Friend WithEvents Label_Reso As MetroFramework.Controls.MetroLabel
|
||||
Friend WithEvents Label_Hardsub As MetroFramework.Controls.MetroLabel
|
||||
Friend WithEvents Label_percent As MetroFramework.Controls.MetroLabel
|
||||
Friend WithEvents LogTocClipboard As ToolStripMenuItem
|
||||
Friend WithEvents SaveToFile As ToolStripMenuItem
|
||||
End Class
|
||||
|
@ -18,7 +18,6 @@ Public Class CRD_List_Item
|
||||
Dim ListOfStreams As New List(Of String)
|
||||
Dim proc As Process
|
||||
Dim ThreadList As New List(Of Thread)
|
||||
Dim timeout As DateTime
|
||||
Dim Item_ErrorTolerance As Integer
|
||||
Dim Canceld As Boolean = False
|
||||
Dim Finished As Boolean = False
|
||||
@ -51,7 +50,7 @@ Public Class CRD_List_Item
|
||||
Dim LastDataRate3 As Double = 0
|
||||
|
||||
Dim FailedSegments As New List(Of FailedSegemtsWithURL)
|
||||
|
||||
Dim LogText As New List(Of String)
|
||||
#Region "Remove from list"
|
||||
Public Sub DisposeItem(ByVal Dispose As Boolean)
|
||||
If Dispose = True Then
|
||||
@ -62,7 +61,46 @@ Public Class CRD_List_Item
|
||||
Return ToDispose
|
||||
End Function
|
||||
#End Region
|
||||
#Region "Set UI"
|
||||
#Region "UI"
|
||||
|
||||
Private Sub CRD_List_Item_Resize(sender As Object, e As EventArgs) Handles Me.Resize
|
||||
bt_del.SetBounds(775, 10, 35, 29)
|
||||
bt_pause.SetBounds(740, 15, 25, 20)
|
||||
PB_Thumbnail.SetBounds(11, 20, 168, 95)
|
||||
PB_Thumbnail.BringToFront()
|
||||
Label_website.Location = New Point(195, 12)
|
||||
Label_Anime.Location = New Point(195, 40)
|
||||
Label_Reso.Location = New Point(195, 97)
|
||||
Label_Hardsub.Location = New Point(265, 97)
|
||||
Label_percent.SetBounds(Me.Width - 400, 97, 378, 27)
|
||||
Label_percent.AutoSize = False
|
||||
ProgressBar1.SetBounds(195, 70, 601, 20)
|
||||
PictureBox5.Location = New Point(0, 136)
|
||||
PictureBox5.Height = 6
|
||||
|
||||
If Service = "AoD" Then
|
||||
MetroStyleManager1.Style = MetroColorStyle.LightGreen
|
||||
ServiceSleep = 1000
|
||||
ElseIf Service = "FM" Then
|
||||
MetroStyleManager1.Style = MetroColorStyle.DarkPurple
|
||||
Else
|
||||
MetroStyleManager1.Style = MetroColorStyle.Orange
|
||||
End If
|
||||
MetroStyleManager1.Theme = Main.Manager.Theme
|
||||
MetroStyleManager1.Owner = Me
|
||||
Me.StyleManager = MetroStyleManager1
|
||||
|
||||
|
||||
PictureBox5.Width = Me.Width - 40
|
||||
|
||||
bt_del.Location = New Point(Me.Width - 63, 10)
|
||||
bt_pause.Location = New Point(Me.Width - 98, 15)
|
||||
|
||||
ProgressBar1.Width = Me.Width - 223
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub SetLabelWebsite(ByVal Text As String)
|
||||
Label_website.Text = Text
|
||||
Label_website_Text = Text
|
||||
@ -584,7 +622,7 @@ Public Class CRD_List_Item
|
||||
text = client0.DownloadString(m3u8_url(1))
|
||||
Catch ex As Exception
|
||||
Me.Invoke(New Action(Function()
|
||||
Label_website.Text = "The download process seems to have crashed"
|
||||
Label_website.Text = "Hybrid mode error"
|
||||
Label_percent.Text = ex.ToString
|
||||
Return Nothing
|
||||
End Function))
|
||||
@ -909,7 +947,7 @@ Public Class CRD_List_Item
|
||||
Dim exepath As String = Application.StartupPath + "\ffmpeg.exe"
|
||||
Dim startinfo As New System.Diagnostics.ProcessStartInfo
|
||||
Dim cmd As String = "-headers " + My.Resources.ffmpeg_user_agend + " " + DLCommand + " " + DL_Pfad 'start ffmpeg with command strFFCMD string
|
||||
|
||||
LogText.Add(Date.Now + " " + cmd)
|
||||
If Debug2 = True Then
|
||||
MsgBox(cmd)
|
||||
End If
|
||||
@ -941,7 +979,7 @@ Public Class CRD_List_Item
|
||||
If Canceld = False Then
|
||||
Label_website.Text = "The download process seems to have crashed"
|
||||
Label_percent.Text = "Press the play button again to retry."
|
||||
ProgressBar1.Value = 100
|
||||
ProgressBar1.Value = 0
|
||||
Retry = True
|
||||
StatusRunning = False
|
||||
End If
|
||||
@ -956,9 +994,13 @@ Public Class CRD_List_Item
|
||||
End Sub
|
||||
|
||||
Sub FFMPEGOutput(ByVal sender As Object, ByVal e As DataReceivedEventArgs)
|
||||
'timeout = DateTime.Now
|
||||
'MsgBox(timeout)
|
||||
Try
|
||||
LogText.Add(Date.Now + " " + e.Data)
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
|
||||
Try
|
||||
|
||||
Dim logfile As String = DownloadPfad.Replace(".mp4", ".log").Replace(Chr(34), "")
|
||||
If SaveLog = True Then
|
||||
If File.Exists(logfile) Then
|
||||
@ -1213,50 +1255,38 @@ Public Class CRD_List_Item
|
||||
Process.Start(DownloadPfad.Replace(Chr(34), ""))
|
||||
End Sub
|
||||
|
||||
Private Sub CRD_List_Item_Resize(sender As Object, e As EventArgs) Handles Me.Resize
|
||||
bt_del.SetBounds(775, 10, 35, 29)
|
||||
bt_pause.SetBounds(740, 15, 25, 20)
|
||||
PB_Thumbnail.SetBounds(11, 20, 168, 95)
|
||||
PB_Thumbnail.BringToFront()
|
||||
Label_website.Location = New Point(195, 12)
|
||||
Label_Anime.Location = New Point(195, 40)
|
||||
Label_Reso.Location = New Point(195, 97)
|
||||
Label_Hardsub.Location = New Point(265, 97)
|
||||
Label_percent.SetBounds(Me.Width - 400, 97, 378, 27)
|
||||
Label_percent.AutoSize = False
|
||||
ProgressBar1.SetBounds(195, 70, 601, 20)
|
||||
PictureBox5.Location = New Point(0, 136)
|
||||
PictureBox5.Height = 6
|
||||
Private Sub SaveToFile_Click(sender As Object, e As EventArgs) Handles SaveToFile.Click
|
||||
Try
|
||||
|
||||
If Service = "AoD" Then
|
||||
MetroStyleManager1.Style = MetroColorStyle.LightGreen
|
||||
ServiceSleep = 1000
|
||||
ElseIf Service = "FM" Then
|
||||
MetroStyleManager1.Style = MetroColorStyle.DarkPurple
|
||||
Else
|
||||
MetroStyleManager1.Style = MetroColorStyle.Orange
|
||||
End If
|
||||
MetroStyleManager1.Theme = Main.Manager.Theme
|
||||
MetroStyleManager1.Owner = Me
|
||||
Me.StyleManager = MetroStyleManager1
|
||||
|
||||
|
||||
PictureBox5.Width = Me.Width - 40
|
||||
|
||||
bt_del.Location = New Point(Me.Width - 63, 10)
|
||||
bt_pause.Location = New Point(Me.Width - 98, 15)
|
||||
|
||||
ProgressBar1.Width = Me.Width - 223
|
||||
Dim logfile As String = DownloadPfad.Replace(".mp4", ".log").Replace(Chr(34), "")
|
||||
'If File.Exists(logfile) Then
|
||||
Using sw As StreamWriter = File.AppendText(logfile)
|
||||
sw.Write(LogText.Item(0))
|
||||
sw.Write(vbNewLine)
|
||||
For i As Integer = 1 To LogText.Count - 1
|
||||
sw.Write(vbNewLine)
|
||||
sw.Write(LogText.Item(i))
|
||||
Next
|
||||
|
||||
End Using
|
||||
'Else
|
||||
'File.WriteAllText(logfile, Date.Now + " " + e.Data)
|
||||
'End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.ToString)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Private Sub Label_Anime_Click(sender As Object, e As EventArgs) Handles ProgressBar1.Click, PB_Thumbnail.Click, MyBase.Click, Label_website.Click, Label_Reso.Click, Label_percent.Click, Label_Anime.Click
|
||||
|
||||
Private Sub LogTocClipboard_Click(sender As Object, e As EventArgs) Handles LogTocClipboard.Click
|
||||
Try
|
||||
Dim Text As String = LogText.Item(0) + vbNewLine
|
||||
For i As Integer = 1 To LogText.Count - 1
|
||||
Text = Text + vbNewLine + LogText.Item(i)
|
||||
Next
|
||||
My.Computer.Clipboard.SetText(Text)
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Public Class FailedSegemtsWithURL
|
||||
|
@ -125,6 +125,12 @@
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="network_scan.Designer.vb">
|
||||
<DependentUpon>network_scan.vb</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="network_scan.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Anime_Add.Designer.vb">
|
||||
<DependentUpon>Anime_Add.vb</DependentUpon>
|
||||
</Compile>
|
||||
@ -187,6 +193,9 @@
|
||||
<Compile Include="Subfolder.vb" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="network_scan.resx">
|
||||
<DependentUpon>network_scan.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Anime_Add.resx">
|
||||
<DependentUpon>Anime_Add.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
@ -614,10 +614,7 @@ Public Class GeckoFX
|
||||
Main.WebbrowserURL = WebBrowser1.Url.ToString
|
||||
Main.WebbrowserText = WebBrowser1.Document.Body.OuterHtml
|
||||
Main.WebbrowserTitle = WebBrowser1.DocumentTitle
|
||||
|
||||
Dim SubtitleName As String = Main.WebbrowserTitle.Replace(" - Watch on VRV", "").Replace("Free Streaming", "").Replace("Tubi", "")
|
||||
SubtitleName = Main.RemoveExtraSpaces(System.Text.RegularExpressions.Regex.Replace(SubtitleName, "[^\w\\-]", " "))
|
||||
Dim SubtitlePfad As String = Main.Pfad + "\" + SubtitleName
|
||||
Main.WebbrowserCookie = WebBrowser1.Document.Cookie
|
||||
|
||||
Dim Requests As New List(Of String)
|
||||
Dim LogText As String = Nothing
|
||||
@ -678,46 +675,48 @@ Public Class GeckoFX
|
||||
|
||||
ElseIf InStr(RequestURL, ".txt") Then
|
||||
Main.txtList.Add(RequestURL)
|
||||
client0.DownloadFileAsync(New Uri(RequestURL), SubtitlePfad + ".txt")
|
||||
' client0.DownloadFileAsync(New Uri(RequestURL), SubtitlePfad + ".txt")
|
||||
ElseIf InStr(RequestURL, ".vtt") Then
|
||||
Main.txtList.Add(RequestURL)
|
||||
client0.DownloadFileAsync(New Uri(RequestURL), SubtitlePfad + ".vtt")
|
||||
' client0.DownloadFileAsync(New Uri(RequestURL), SubtitlePfad + ".vtt")
|
||||
ElseIf InStr(RequestURL, ".srt") Then
|
||||
Main.txtList.Add(RequestURL)
|
||||
client0.DownloadFileAsync(New Uri(RequestURL), SubtitlePfad + ".srt")
|
||||
' client0.DownloadFileAsync(New Uri(RequestURL), SubtitlePfad + ".srt")
|
||||
ElseIf InStr(RequestURL, ".ass") Then
|
||||
Main.txtList.Add(RequestURL)
|
||||
client0.DownloadFileAsync(New Uri(RequestURL), SubtitlePfad + ".ass")
|
||||
' client0.DownloadFileAsync(New Uri(RequestURL), SubtitlePfad + ".ass")
|
||||
ElseIf InStr(RequestURL, ".ssa") Then
|
||||
Main.txtList.Add(RequestURL)
|
||||
client0.DownloadFileAsync(New Uri(RequestURL), SubtitlePfad + ".ssa")
|
||||
'client0.DownloadFileAsync(New Uri(RequestURL), SubtitlePfad + ".ssa")
|
||||
ElseIf InStr(RequestURL, ".dfxp") Then
|
||||
Main.txtList.Add(RequestURL)
|
||||
client0.DownloadFileAsync(New Uri(RequestURL), SubtitlePfad + ".dfxp")
|
||||
' client0.DownloadFileAsync(New Uri(RequestURL), SubtitlePfad + ".dfxp")
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Button2.Text = "use network scan dialog"
|
||||
network_scan.ShowDialog()
|
||||
'If Main.m3u8List.Count > 0 Then
|
||||
' Main.NonCR_URL = Main.m3u8List.Item(0)
|
||||
' Main.FFMPEG_Reso(Main.NonCR_URL)
|
||||
' t = New Thread(AddressOf Main.Grapp_non_CR)
|
||||
' t.Priority = ThreadPriority.Normal
|
||||
' t.IsBackground = True
|
||||
' t.Start()
|
||||
' Button2.Text = "Start network scan"
|
||||
|
||||
If Main.m3u8List.Count > 0 Then
|
||||
Main.NonCR_URL = Main.m3u8List.Item(0)
|
||||
Main.FFMPEG_Reso(Main.NonCR_URL)
|
||||
t = New Thread(AddressOf Main.Grapp_non_CR)
|
||||
t.Priority = ThreadPriority.Normal
|
||||
t.IsBackground = True
|
||||
t.Start()
|
||||
Button2.Text = "Start network scan"
|
||||
|
||||
ElseIf Main.mpdList.Count > 0 Then
|
||||
Main.NonCR_URL = Main.mpdList.Item(0)
|
||||
Main.FFMPEG_Reso(Main.NonCR_URL)
|
||||
t = New Thread(AddressOf Main.Grapp_non_CR)
|
||||
t.Priority = ThreadPriority.Normal
|
||||
t.IsBackground = True
|
||||
t.Start()
|
||||
Button2.Text = "Start network scan"
|
||||
End If
|
||||
'ElseIf Main.mpdList.Count > 0 Then
|
||||
' Main.NonCR_URL = Main.mpdList.Item(0)
|
||||
' Main.FFMPEG_Reso(Main.NonCR_URL)
|
||||
' t = New Thread(AddressOf Main.Grapp_non_CR)
|
||||
' t.Priority = ThreadPriority.Normal
|
||||
' t.IsBackground = True
|
||||
' t.Start()
|
||||
' Button2.Text = "Start network scan"
|
||||
'End If
|
||||
|
||||
|
||||
Button2.Text = "Start network scan"
|
||||
ScanTrue = False
|
||||
Button2.Enabled = True
|
||||
Catch ex As Exception
|
||||
|
@ -1928,8 +1928,17 @@ Public Class Main
|
||||
'Else
|
||||
ResoAvalibe = ResoAvalibe + vbNewLine + ZeileReso2(ZeileReso2.Count - 1).Trim + ":--:" + ZeileReso4(1)
|
||||
'End If
|
||||
'ElseIf InStr(e.Data, "Duration:") Then
|
||||
' ResoAvalibe = Nothing
|
||||
'ElseIf InStr(e.Data, "Duration: N/A, bitrate: N/A") Then
|
||||
|
||||
'ElseIf InStr(e.Data, "Duration: ") Then
|
||||
' Dim ZeitGesamt As String() = e.Data.Split(New String() {"Duration: "}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
' Dim ZeitGesamt2 As String() = ZeitGesamt(1).Split(New [Char]() {System.Convert.ToChar(".")})
|
||||
' NetworkScanTime = ZeitGesamt2(0)
|
||||
' Dim ZeitGesamt2 As String() = ZeitGesamt(1).Split(New [Char]() {System.Convert.ToChar(".")})
|
||||
' Dim ZeitGesamtSplit() As String = ZeitGesamt2(0).Split(New [Char]() {System.Convert.ToChar(":")})
|
||||
' MsgBox(ZeitGesamt2(0))
|
||||
' ZeitGesamtInteger = CInt(ZeitGesamtSplit(0)) * 3600 + CInt(ZeitGesamtSplit(1)) * 60 + CInt(ZeitGesamtSplit(2))
|
||||
|
||||
ElseIf InStr(e.Data, "At least one output file must be specified") Then
|
||||
ResoSearchRunning = False
|
||||
End If
|
||||
@ -3153,6 +3162,10 @@ Public Class Main
|
||||
Me.WindowState = System.Windows.Forms.FormWindowState.Minimized
|
||||
End Sub
|
||||
|
||||
Private Sub Button1_Click_2(sender As Object, e As EventArgs)
|
||||
network_scan.Show()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("3.6.9")>
|
||||
<Assembly: AssemblyFileVersion("3.6.9")>
|
||||
<Assembly: AssemblyVersion("3.7")>
|
||||
<Assembly: AssemblyFileVersion("3.7")>
|
||||
<Assembly: NeutralResourcesLanguage("en")>
|
||||
|
Binary file not shown.
Binary file not shown.
175
Crunchyroll Downloader/network_scan.Designer.vb
generated
Normal file
175
Crunchyroll Downloader/network_scan.Designer.vb
generated
Normal file
@ -0,0 +1,175 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
|
||||
Partial Class network_scan
|
||||
Inherits MetroFramework.Forms.MetroForm
|
||||
|
||||
|
||||
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
<System.Diagnostics.DebuggerNonUserCode()>
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Wird vom Windows Form-Designer benötigt.
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
<System.Diagnostics.DebuggerStepThrough()>
|
||||
Private Sub InitializeComponent()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(network_scan))
|
||||
Me.pictureBox4 = New System.Windows.Forms.PictureBox()
|
||||
Me.groupBox2 = New System.Windows.Forms.GroupBox()
|
||||
Me.ComboBox3 = New MetroFramework.Controls.MetroComboBox()
|
||||
Me.ComboBox1 = New MetroFramework.Controls.MetroComboBox()
|
||||
Me.ComboBox2 = New MetroFramework.Controls.MetroComboBox()
|
||||
Me.NetworkStatusLabel = New MetroFramework.Controls.MetroLabel()
|
||||
Me.Btn_min = New System.Windows.Forms.PictureBox()
|
||||
Me.Btn_Close = New System.Windows.Forms.PictureBox()
|
||||
CType(Me.pictureBox4, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.groupBox2.SuspendLayout()
|
||||
CType(Me.Btn_min, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.Btn_Close, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'pictureBox4
|
||||
'
|
||||
Me.pictureBox4.BackColor = System.Drawing.Color.Transparent
|
||||
Me.pictureBox4.Cursor = System.Windows.Forms.Cursors.Hand
|
||||
Me.pictureBox4.Image = Global.Crunchyroll_Downloader.My.Resources.Resources.main_button_download_default
|
||||
Me.pictureBox4.Location = New System.Drawing.Point(85, 304)
|
||||
Me.pictureBox4.Name = "pictureBox4"
|
||||
Me.pictureBox4.Size = New System.Drawing.Size(530, 50)
|
||||
Me.pictureBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
|
||||
Me.pictureBox4.TabIndex = 42
|
||||
Me.pictureBox4.TabStop = False
|
||||
'
|
||||
'groupBox2
|
||||
'
|
||||
Me.groupBox2.BackColor = System.Drawing.Color.Transparent
|
||||
Me.groupBox2.Controls.Add(Me.ComboBox3)
|
||||
Me.groupBox2.Controls.Add(Me.ComboBox1)
|
||||
Me.groupBox2.Controls.Add(Me.ComboBox2)
|
||||
Me.groupBox2.Controls.Add(Me.NetworkStatusLabel)
|
||||
Me.groupBox2.Location = New System.Drawing.Point(10, 63)
|
||||
Me.groupBox2.Name = "groupBox2"
|
||||
Me.groupBox2.Size = New System.Drawing.Size(680, 220)
|
||||
Me.groupBox2.TabIndex = 44
|
||||
Me.groupBox2.TabStop = False
|
||||
'
|
||||
'ComboBox3
|
||||
'
|
||||
Me.ComboBox3.Enabled = False
|
||||
Me.ComboBox3.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.ComboBox3.FormattingEnabled = True
|
||||
Me.ComboBox3.ItemHeight = 23
|
||||
Me.ComboBox3.Location = New System.Drawing.Point(15, 112)
|
||||
Me.ComboBox3.Name = "ComboBox3"
|
||||
Me.ComboBox3.Size = New System.Drawing.Size(650, 29)
|
||||
Me.ComboBox3.TabIndex = 37
|
||||
Me.ComboBox3.UseSelectable = True
|
||||
'
|
||||
'ComboBox1
|
||||
'
|
||||
Me.ComboBox1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.ComboBox1.FormattingEnabled = True
|
||||
Me.ComboBox1.ItemHeight = 23
|
||||
Me.ComboBox1.Items.AddRange(New Object() {"Video Stream", "Subtile"})
|
||||
Me.ComboBox1.Location = New System.Drawing.Point(15, 20)
|
||||
Me.ComboBox1.Name = "ComboBox1"
|
||||
Me.ComboBox1.Size = New System.Drawing.Size(650, 29)
|
||||
Me.ComboBox1.TabIndex = 1
|
||||
Me.ComboBox1.UseSelectable = True
|
||||
'
|
||||
'ComboBox2
|
||||
'
|
||||
Me.ComboBox2.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.ComboBox2.FormattingEnabled = True
|
||||
Me.ComboBox2.ItemHeight = 23
|
||||
Me.ComboBox2.Location = New System.Drawing.Point(15, 65)
|
||||
Me.ComboBox2.Name = "ComboBox2"
|
||||
Me.ComboBox2.Size = New System.Drawing.Size(650, 29)
|
||||
Me.ComboBox2.TabIndex = 1
|
||||
Me.ComboBox2.UseSelectable = True
|
||||
'
|
||||
'NetworkStatusLabel
|
||||
'
|
||||
Me.NetworkStatusLabel.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
|
||||
Or System.Windows.Forms.AnchorStyles.Left) _
|
||||
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
|
||||
Me.NetworkStatusLabel.BackColor = System.Drawing.Color.Transparent
|
||||
Me.NetworkStatusLabel.FontSize = MetroFramework.MetroLabelSize.Tall
|
||||
Me.NetworkStatusLabel.FontWeight = MetroFramework.MetroLabelWeight.Regular
|
||||
Me.NetworkStatusLabel.ForeColor = System.Drawing.Color.Black
|
||||
Me.NetworkStatusLabel.Location = New System.Drawing.Point(15, 160)
|
||||
Me.NetworkStatusLabel.Name = "NetworkStatusLabel"
|
||||
Me.NetworkStatusLabel.Size = New System.Drawing.Size(651, 50)
|
||||
Me.NetworkStatusLabel.TabIndex = 36
|
||||
Me.NetworkStatusLabel.Text = "..."
|
||||
Me.NetworkStatusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'Btn_min
|
||||
'
|
||||
Me.Btn_min.BackColor = System.Drawing.Color.Transparent
|
||||
Me.Btn_min.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None
|
||||
Me.Btn_min.Cursor = System.Windows.Forms.Cursors.Hand
|
||||
Me.Btn_min.Image = CType(resources.GetObject("Btn_min.Image"), System.Drawing.Image)
|
||||
Me.Btn_min.Location = New System.Drawing.Point(567, 1)
|
||||
Me.Btn_min.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.Btn_min.Name = "Btn_min"
|
||||
Me.Btn_min.Size = New System.Drawing.Size(25, 25)
|
||||
Me.Btn_min.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom
|
||||
Me.Btn_min.TabIndex = 73
|
||||
Me.Btn_min.TabStop = False
|
||||
'
|
||||
'Btn_Close
|
||||
'
|
||||
Me.Btn_Close.BackColor = System.Drawing.Color.Transparent
|
||||
Me.Btn_Close.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
|
||||
Me.Btn_Close.Cursor = System.Windows.Forms.Cursors.Hand
|
||||
Me.Btn_Close.Image = Global.Crunchyroll_Downloader.My.Resources.Resources.main_close
|
||||
Me.Btn_Close.Location = New System.Drawing.Point(592, 1)
|
||||
Me.Btn_Close.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.Btn_Close.Name = "Btn_Close"
|
||||
Me.Btn_Close.Size = New System.Drawing.Size(40, 40)
|
||||
Me.Btn_Close.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom
|
||||
Me.Btn_Close.TabIndex = 72
|
||||
Me.Btn_Close.TabStop = False
|
||||
'
|
||||
'network_scan
|
||||
'
|
||||
Me.ApplyImageInvert = True
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None
|
||||
Me.BorderStyle = MetroFramework.Forms.MetroFormBorderStyle.FixedSingle
|
||||
Me.ClientSize = New System.Drawing.Size(700, 377)
|
||||
Me.Controls.Add(Me.Btn_min)
|
||||
Me.Controls.Add(Me.Btn_Close)
|
||||
Me.Controls.Add(Me.pictureBox4)
|
||||
Me.Controls.Add(Me.groupBox2)
|
||||
Me.Name = "network_scan"
|
||||
Me.Padding = New System.Windows.Forms.Padding(10, 60, 20, 20)
|
||||
Me.Text = "Select a stream or subtitle"
|
||||
Me.TextAlign = MetroFramework.Forms.MetroFormTextAlign.Center
|
||||
CType(Me.pictureBox4, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.groupBox2.ResumeLayout(False)
|
||||
CType(Me.Btn_min, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.Btn_Close, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
End Sub
|
||||
Public WithEvents pictureBox4 As PictureBox
|
||||
Public WithEvents groupBox2 As GroupBox
|
||||
Public WithEvents NetworkStatusLabel As MetroFramework.Controls.MetroLabel
|
||||
Friend WithEvents MetroTextBox1 As MetroFramework.Controls.MetroTextBox
|
||||
Public WithEvents ComboBox1 As MetroFramework.Controls.MetroComboBox
|
||||
Public WithEvents ComboBox2 As MetroFramework.Controls.MetroComboBox
|
||||
Private WithEvents Btn_min As PictureBox
|
||||
Private WithEvents Btn_Close As PictureBox
|
||||
Public WithEvents ComboBox3 As MetroFramework.Controls.MetroComboBox
|
||||
End Class
|
128
Crunchyroll Downloader/network_scan.resx
Normal file
128
Crunchyroll Downloader/network_scan.resx
Normal file
@ -0,0 +1,128 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<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>
|
||||
</root>
|
356
Crunchyroll Downloader/network_scan.vb
Normal file
356
Crunchyroll Downloader/network_scan.vb
Normal file
@ -0,0 +1,356 @@
|
||||
Imports Microsoft.Win32
|
||||
Imports System.Net
|
||||
Imports Gecko
|
||||
Imports System.IO
|
||||
Imports System.Threading
|
||||
Imports MetroFramework.Forms
|
||||
Imports MetroFramework
|
||||
Imports MetroFramework.Components
|
||||
Imports System.Text
|
||||
|
||||
Public Class network_scan
|
||||
|
||||
Dim Manager As MetroStyleManager = Main.Manager
|
||||
Dim SubtitleFormat As String = Nothing
|
||||
|
||||
Private Sub network_scan_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
Manager.Owner = Me
|
||||
Me.StyleManager = Manager
|
||||
Btn_Close.Image = Main.CloseImg
|
||||
Btn_min.Image = Main.MinImg
|
||||
Try
|
||||
Me.Icon = My.Resources.icon
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
Me.Location = New Point(Main.Location.X + Main.Width / 2 - Me.Width / 2, Main.Location.Y + Main.Height / 2 - Me.Height / 2)
|
||||
pictureBox4.Enabled = False
|
||||
pictureBox4.Image = My.Resources.main_button_download_deactivate
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub PictureBox4_MouseEnter(sender As Object, e As EventArgs) Handles pictureBox4.MouseEnter
|
||||
If pictureBox4.Enabled = True Then
|
||||
pictureBox4.Image = My.Resources.main_button_download_hovert
|
||||
Else
|
||||
pictureBox4.Image = My.Resources.main_button_download_deactivate
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub PictureBox4_MouseLeave(sender As Object, e As EventArgs) Handles pictureBox4.MouseLeave
|
||||
If pictureBox4.Enabled = True Then
|
||||
pictureBox4.Image = My.Resources.main_button_download_default
|
||||
Else
|
||||
pictureBox4.Image = My.Resources.main_button_download_deactivate
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Btn_Close_Click(sender As Object, e As EventArgs) Handles Btn_Close.Click
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub network_scan_Resize(sender As Object, e As EventArgs) Handles Me.Resize
|
||||
Btn_Close.Location = New Point(Me.Width - 40, 1)
|
||||
Btn_min.Location = New Point(Me.Width - 68, 10)
|
||||
End Sub
|
||||
|
||||
Private Sub Btn_min_Click(sender As Object, e As EventArgs) Handles Btn_min.Click
|
||||
Me.WindowState = System.Windows.Forms.FormWindowState.Minimized
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub Btn_min_MouseEnter(sender As Object, e As EventArgs) Handles Btn_min.MouseEnter
|
||||
Dim PB As PictureBox = sender
|
||||
PB.Image = My.Resources.main_mini_red
|
||||
End Sub
|
||||
|
||||
Private Sub Btn_min_MouseLeave(sender As Object, e As EventArgs) Handles Btn_min.MouseLeave
|
||||
Dim PB As PictureBox = sender
|
||||
PB.Image = Main.MinImg
|
||||
End Sub
|
||||
Private Sub Btn_Close_MouseEnter(sender As Object, e As EventArgs) Handles Btn_Close.MouseEnter
|
||||
Dim PB As PictureBox = sender
|
||||
PB.Image = My.Resources.main_del
|
||||
End Sub
|
||||
|
||||
Private Sub Btn_Close_MouseLeave(sender As Object, e As EventArgs) Handles Btn_Close.MouseLeave
|
||||
Dim PB As PictureBox = sender
|
||||
PB.Image = Main.CloseImg
|
||||
End Sub
|
||||
|
||||
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
|
||||
ComboBox3.Enabled = False
|
||||
ComboBox3.Items.Clear()
|
||||
ComboBox3.Text = Nothing
|
||||
ComboBox2.Items.Clear()
|
||||
ComboBox2.Text = Nothing
|
||||
SubtitleFormat = Nothing
|
||||
pictureBox4.Enabled = False
|
||||
pictureBox4.Image = My.Resources.main_button_download_deactivate
|
||||
If ComboBox1.SelectedItem.ToString = "Video Stream" Then
|
||||
If Main.m3u8List.Count > 0 Then
|
||||
For i As Integer = 0 To Main.m3u8List.Count - 1
|
||||
ComboBox2.Items.Add(Main.m3u8List.Item(i))
|
||||
Next
|
||||
ElseIf Main.mpdList.Count > 0 Then
|
||||
If Main.mpdList.Count > 0 Then
|
||||
For i As Integer = 0 To Main.mpdList.Count - 1
|
||||
ComboBox2.Items.Add(Main.mpdList.Item(i))
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
ElseIf ComboBox1.SelectedItem.ToString = "Subtile" Then
|
||||
If Main.txtList.Count > 0 Then
|
||||
For i As Integer = 0 To Main.txtList.Count - 1
|
||||
ComboBox2.Items.Add(Main.txtList.Item(i))
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox2.SelectedIndexChanged
|
||||
SubtitleFormat = Nothing
|
||||
pictureBox4.Enabled = False
|
||||
pictureBox4.Image = My.Resources.main_button_download_deactivate
|
||||
ComboBox3.Enabled = False
|
||||
ComboBox3.Items.Clear()
|
||||
ComboBox3.Text = Nothing
|
||||
|
||||
NetworkStatusLabel.Text = "Checking input..."
|
||||
Pause(1)
|
||||
'If InStr(ComboBox2.Text, ".mpd") Or InStr(ComboBox2.Text, ".m3u8") Then
|
||||
|
||||
Dim exepath As String = Application.StartupPath + "\ffmpeg.exe"
|
||||
Dim startinfo As New System.Diagnostics.ProcessStartInfo
|
||||
Dim sr As StreamReader
|
||||
Dim cmd As String = "-headers " + My.Resources.ffmpeg_user_agend + " -i " + Chr(34) + ComboBox2.Text + Chr(34) 'start ffmpeg with command strFFCMD string
|
||||
'
|
||||
Dim ffmpegOutput As String = Nothing
|
||||
Dim ffmpegOutputLine As String = Nothing
|
||||
Dim ffmpegOutputLine2 As String = Nothing
|
||||
|
||||
Dim NetworkScanTime As String = Nothing
|
||||
|
||||
' all parameters required to run the process
|
||||
startinfo.FileName = exepath
|
||||
startinfo.Arguments = cmd
|
||||
startinfo.UseShellExecute = False
|
||||
startinfo.WindowStyle = ProcessWindowStyle.Hidden
|
||||
startinfo.RedirectStandardError = True
|
||||
startinfo.RedirectStandardOutput = True
|
||||
startinfo.CreateNoWindow = True
|
||||
Dim proc As New Process
|
||||
proc.StartInfo = startinfo
|
||||
proc.Start() ' start the process
|
||||
sr = proc.StandardError 'standard error is used by ffmpeg
|
||||
|
||||
Do
|
||||
ffmpegOutputLine = sr.ReadLine
|
||||
ffmpegOutput = ffmpegOutput + vbNewLine + ffmpegOutputLine
|
||||
|
||||
Loop Until proc.HasExited 'And ffmpegOutputLine = Nothing Or ffmpegOutputLine = ""
|
||||
|
||||
Dim ffmpegOutput2() As String = ffmpegOutput.Split(New String() {vbNewLine}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
For i As Integer = 0 To ffmpegOutput2.Count - 1
|
||||
|
||||
If InStr(ffmpegOutput2(i), ": Video:") Then
|
||||
Dim ZeileReso() As String = ffmpegOutput2(i).Split(New String() {" ["}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim ZeileReso2() As String = ZeileReso(0).Split(New String() {"x"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim ZeileReso3() As String = ffmpegOutput2(i).Split(New String() {": Video:"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim ZeileReso4() As String = ZeileReso3(0).Split(New String() {"Stream #"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
|
||||
ComboBox3.Items.Add(ZeileReso2(ZeileReso2.Count - 1).Trim + ":--:" + ZeileReso4(1))
|
||||
ElseIf InStr(ffmpegOutput2(i), "Duration: N/A, bitrate: N/A") Then
|
||||
|
||||
ElseIf InStr(ffmpegOutput2(i), "Subtitle: ") Then
|
||||
Dim Format As String() = ffmpegOutput2(i).Split(New String() {"Subtitle: "}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
SubtitleFormat = Format(1)
|
||||
|
||||
ElseIf InStr(ffmpegOutput2(i), "Duration: ") Then
|
||||
Dim ZeitGesamt As String() = ffmpegOutput2(i).Split(New String() {"Duration: "}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim ZeitGesamt2 As String() = ZeitGesamt(1).Split(New [Char]() {System.Convert.ToChar(".")})
|
||||
NetworkScanTime = ZeitGesamt2(0)
|
||||
ElseIf InStr(ffmpegOutput2(i), "At least one output file must be specified") Then
|
||||
|
||||
ElseIf InStr(ffmpegOutput2(i), "Invalid data found when processing input") Then
|
||||
NetworkStatusLabel.Text = "Invalid data found when processing input"
|
||||
Exit Sub
|
||||
End If
|
||||
Next
|
||||
If SubtitleFormat IsNot Nothing Then
|
||||
NetworkStatusLabel.Text = "Subtitle found with format: " + SubtitleFormat
|
||||
pictureBox4.Enabled = True
|
||||
pictureBox4.Image = My.Resources.main_button_download_default
|
||||
ElseIf NetworkScanTime = Nothing Then
|
||||
If ComboBox3.Items.Count > 0 Then
|
||||
NetworkStatusLabel.Text = "Duration check failed but it found valid streams."
|
||||
ComboBox3.Enabled = True
|
||||
Else
|
||||
NetworkStatusLabel.Text = "No video stream found in that url."
|
||||
End If
|
||||
Else
|
||||
NetworkStatusLabel.Text = "Video found with a duration of: " + NetworkScanTime
|
||||
ComboBox3.Enabled = True
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ComboBox3_SelectedIndexChanged_1(sender As Object, e As EventArgs) Handles ComboBox3.SelectedIndexChanged
|
||||
pictureBox4.Enabled = True
|
||||
pictureBox4.Image = My.Resources.main_button_download_default
|
||||
End Sub
|
||||
|
||||
Private Sub pictureBox4_Click(sender As Object, e As EventArgs) Handles pictureBox4.Click
|
||||
pictureBox4.Enabled = False
|
||||
pictureBox4.Image = My.Resources.main_button_download_deactivate
|
||||
|
||||
Dim FileName As String = Main.WebbrowserTitle.Replace(" - Watch on VRV", "").Replace("Free Streaming", "").Replace("Tubi", "")
|
||||
FileName = Main.RemoveExtraSpaces(System.Text.RegularExpressions.Regex.Replace(FileName, "[^\w\\-]", " "))
|
||||
Dim FilePfad As String = Main.Pfad + "\" + FileName
|
||||
|
||||
Dim client0 As New WebClient
|
||||
client0.Encoding = Encoding.UTF8
|
||||
If Main.WebbrowserCookie = Nothing Then
|
||||
Else
|
||||
client0.Headers.Add(HttpRequestHeader.Cookie, Main.WebbrowserCookie)
|
||||
End If
|
||||
|
||||
Dim RequestURL As String = ComboBox2.Text
|
||||
|
||||
ComboBox2.Text = Nothing
|
||||
|
||||
Dim RequestReso As String = Nothing
|
||||
Dim RequestMap As String = Nothing
|
||||
If ComboBox3.Enabled = True Then
|
||||
Dim ResoSplit() As String = ComboBox3.Text.Split(New String() {":--:"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
RequestReso = ResoSplit(0)
|
||||
RequestMap = ResoSplit(1)
|
||||
End If
|
||||
|
||||
If ComboBox1.SelectedItem.ToString = "Video Stream" Then
|
||||
|
||||
If InStr(RequestURL, ".m3u8") Then
|
||||
Main.m3u8List.Remove(RequestURL)
|
||||
ElseIf InStr(RequestURL, ".mpd") Then
|
||||
Main.mpdList.Remove(RequestURL)
|
||||
End If
|
||||
|
||||
'Me.Invoke(New Action(Function()
|
||||
' MsgBox(m3u8_Master_url)
|
||||
' Return Nothing
|
||||
' End Function))
|
||||
'My.Computer.FileSystem.WriteAllText(Application.StartupPath + "\Test.txt", text, False)
|
||||
Dim thumbnail As String() = Nothing
|
||||
Dim thumbnail2 As String() = Nothing
|
||||
Dim thumbnail4 As String = "https://abload.de/img/main-delx4krg.png"
|
||||
Try
|
||||
If InStr(Main.WebbrowserText, "thumbnail") Then
|
||||
thumbnail = Main.WebbrowserText.Split(New String() {"thumbnail"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
Try
|
||||
For i As Integer = 0 To thumbnail.Count - 1
|
||||
If InStr(thumbnail(i), ".jpg") Then
|
||||
If InStr(thumbnail(i), "https:") Then
|
||||
thumbnail2 = thumbnail(i).Split(New String() {".jpg"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim thumbnail3 As String() = thumbnail2(0).Split(New String() {"https:"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
thumbnail4 = "https:" + thumbnail3(thumbnail3.Count - 1).Replace("&", "&").Replace("/u0026", "&").Replace("\u002F", "/").Replace("\/", "/") + ".jpg"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
|
||||
|
||||
Dim m3u8Final As String = "-headers " + My.Resources.ffmpeg_user_agend + " -i " + Chr(34) + RequestURL + Chr(34) + " -map " + RequestMap + " -map 0:a" + Main.ffmpeg_command
|
||||
'MsgBox(m3u8Final)
|
||||
Dim DisplayReso As String = RequestReso.ToString + "p"
|
||||
Dim Pfad2 As String = Chr(34) + FilePfad + ".mp4" + Chr(34)
|
||||
Dim Title As String = FileName '+ ".mp4"
|
||||
Dim L1Name_Split As String() = Main.WebbrowserURL.Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim L1Name As String = L1Name_Split(1)
|
||||
Me.Invoke(New Action(Function()
|
||||
Main.ListItemAdd(Main.Pfad, L1Name, Title, DisplayReso, "Unknown", "None", thumbnail4, m3u8Final, Pfad2)
|
||||
Main.liList.Add(My.Resources.htmlvorThumbnail + thumbnail4 + My.Resources.htmlnachTumbnail + "<br>" + Title + My.Resources.htmlvorAufloesung + "[Auto]" + My.Resources.htmlvorSoftSubs + vbNewLine + "None" + My.Resources.htmlvorHardSubs + "null" + My.Resources.htmlnachHardSubs + "<!-- " + Title + "-->")
|
||||
Return Nothing
|
||||
End Function))
|
||||
|
||||
ElseIf ComboBox1.SelectedItem.ToString = "Subtile" Then
|
||||
Dim CheckFile As String = Nothing
|
||||
Main.txtList.Remove(RequestURL)
|
||||
If SubtitleFormat IsNot Nothing Then
|
||||
client0.DownloadFileAsync(New Uri(RequestURL), FilePfad + "." + SubtitleFormat)
|
||||
CheckFile = FilePfad + "." + SubtitleFormat
|
||||
ElseIf InStr(RequestURL, ".txt") Then
|
||||
client0.DownloadFileAsync(New Uri(RequestURL), FilePfad + ".txt")
|
||||
CheckFile = FilePfad + ".txt"
|
||||
ElseIf InStr(RequestURL, ".vtt") Then
|
||||
client0.DownloadFileAsync(New Uri(RequestURL), FilePfad + ".vtt")
|
||||
CheckFile = FilePfad + ".vtt"
|
||||
ElseIf InStr(RequestURL, ".srt") Then
|
||||
client0.DownloadFileAsync(New Uri(RequestURL), FilePfad + ".srt")
|
||||
CheckFile = FilePfad + ".srt"
|
||||
ElseIf InStr(RequestURL, ".ass") Then
|
||||
client0.DownloadFileAsync(New Uri(RequestURL), FilePfad + ".ass")
|
||||
CheckFile = FilePfad + ".ass"
|
||||
ElseIf InStr(RequestURL, ".ssa") Then
|
||||
client0.DownloadFileAsync(New Uri(RequestURL), FilePfad + ".ssa")
|
||||
CheckFile = FilePfad + ".ssa"
|
||||
ElseIf InStr(RequestURL, ".dfxp") Then
|
||||
client0.DownloadFileAsync(New Uri(RequestURL), FilePfad + ".dfxp")
|
||||
CheckFile = FilePfad + ".dfxp"
|
||||
End If
|
||||
Pause(5)
|
||||
If File.Exists(CheckFile) Then
|
||||
NetworkStatusLabel.Text = "Subtitles have been Downloaded"
|
||||
Else
|
||||
Pause(5)
|
||||
If File.Exists(CheckFile) Then
|
||||
NetworkStatusLabel.Text = "Subtitles have been Downloaded"
|
||||
Else
|
||||
'NetworkStatusLabel.Text = "Subtitles have been Downloaded"
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ComboBox2_Click(sender As Object, e As EventArgs) Handles ComboBox2.Click
|
||||
ComboBox3.Enabled = False
|
||||
ComboBox3.Items.Clear()
|
||||
ComboBox3.Text = Nothing
|
||||
ComboBox2.Items.Clear()
|
||||
ComboBox2.Text = Nothing
|
||||
SubtitleFormat = Nothing
|
||||
pictureBox4.Enabled = False
|
||||
pictureBox4.Image = My.Resources.main_button_download_deactivate
|
||||
If ComboBox1.SelectedItem.ToString = "Video Stream" Then
|
||||
If Main.m3u8List.Count > 0 Then
|
||||
For i As Integer = 0 To Main.m3u8List.Count - 1
|
||||
ComboBox2.Items.Add(Main.m3u8List.Item(i))
|
||||
Next
|
||||
ElseIf Main.mpdList.Count > 0 Then
|
||||
If Main.mpdList.Count > 0 Then
|
||||
For i As Integer = 0 To Main.mpdList.Count - 1
|
||||
ComboBox2.Items.Add(Main.mpdList.Item(i))
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
ElseIf ComboBox1.SelectedItem.ToString = "Subtile" Then
|
||||
If Main.txtList.Count > 0 Then
|
||||
For i As Integer = 0 To Main.txtList.Count - 1
|
||||
ComboBox2.Items.Add(Main.txtList.Item(i))
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
||||
11dcefd4d648c4dece2d5b0632ae9f091b805be2
|
||||
c7f8608471fd943c0c1b12134a8ae5b4c671fe88
|
||||
|
@ -143,3 +143,4 @@ D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0 - UI
|
||||
D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0\Crunchyroll Downloader\bin\x86\Debug\MetroFramework.dll
|
||||
D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0\Crunchyroll Downloader\bin\x86\Debug\MetroFramework.pdb
|
||||
D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0\Crunchyroll Downloader\obj\x86\Debug\Crunchyroll_Downloader.ErrorDialog.resources
|
||||
D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0\Crunchyroll Downloader\obj\x86\Debug\Crunchyroll_Downloader.network_scan.resources
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user