moved queue to own UI

moved queue to own UI #650
This commit is contained in:
hama3254 2023-01-07 19:04:56 +01:00
parent ab58ee056c
commit bc5d9aac10
19 changed files with 837 additions and 790 deletions

Binary file not shown.

View File

@ -23,7 +23,6 @@ Partial Class Anime_Add
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Anime_Add))
Me.groupBox1 = New System.Windows.Forms.GroupBox()
Me.SubTitlesOnlyCB = New MetroFramework.Controls.MetroComboBox()
@ -38,18 +37,12 @@ Partial Class Anime_Add
Me.ComboBox1 = New MetroFramework.Controls.MetroComboBox()
Me.comboBox3 = New MetroFramework.Controls.MetroComboBox()
Me.Add_Display = New MetroFramework.Controls.MetroLabel()
Me.GroupBox3 = New System.Windows.Forms.GroupBox()
Me.ListBox1 = New System.Windows.Forms.ListBox()
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
Me.Timer2 = New System.Windows.Forms.Timer(Me.components)
Me.Btn_min = New System.Windows.Forms.PictureBox()
Me.Btn_Close = New System.Windows.Forms.PictureBox()
Me.btn_dl = New System.Windows.Forms.Button()
Me.Timer3 = New System.Windows.Forms.Timer(Me.components)
Me.BackgroundWorker1 = New System.ComponentModel.BackgroundWorker()
Me.groupBox1.SuspendLayout()
Me.groupBox2.SuspendLayout()
Me.GroupBox3.SuspendLayout()
CType(Me.Btn_min, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.Btn_Close, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
@ -304,38 +297,6 @@ Partial Class Anime_Add
Me.Add_Display.Text = "..."
Me.Add_Display.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'GroupBox3
'
Me.GroupBox3.BackColor = System.Drawing.Color.Transparent
Me.GroupBox3.Controls.Add(Me.ListBox1)
Me.GroupBox3.Location = New System.Drawing.Point(15, 70)
Me.GroupBox3.Name = "GroupBox3"
Me.GroupBox3.Size = New System.Drawing.Size(720, 280)
Me.GroupBox3.TabIndex = 46
Me.GroupBox3.TabStop = False
Me.GroupBox3.Visible = False
'
'ListBox1
'
Me.ListBox1.BackColor = System.Drawing.Color.FromArgb(CType(CType(243, Byte), Integer), CType(CType(243, Byte), Integer), CType(CType(243, Byte), Integer))
Me.ListBox1.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.ListBox1.FormattingEnabled = True
Me.ListBox1.ItemHeight = 15
Me.ListBox1.Location = New System.Drawing.Point(13, 30)
Me.ListBox1.Name = "ListBox1"
Me.ListBox1.Size = New System.Drawing.Size(693, 229)
Me.ListBox1.TabIndex = 0
'
'Timer1
'
Me.Timer1.Enabled = True
Me.Timer1.Interval = 500
'
'Timer2
'
Me.Timer2.Enabled = True
Me.Timer2.Interval = 2500
'
'Btn_min
'
Me.Btn_min.BackColor = System.Drawing.Color.Transparent
@ -379,11 +340,6 @@ Partial Class Anime_Add
Me.btn_dl.Text = "Download"
Me.btn_dl.UseVisualStyleBackColor = True
'
'Timer3
'
Me.Timer3.Enabled = True
Me.Timer3.Interval = 2000
'
'Anime_Add
'
Me.ApplyImageInvert = True
@ -393,9 +349,8 @@ Partial Class Anime_Add
Me.Controls.Add(Me.btn_dl)
Me.Controls.Add(Me.Btn_min)
Me.Controls.Add(Me.Btn_Close)
Me.Controls.Add(Me.groupBox1)
Me.Controls.Add(Me.GroupBox3)
Me.Controls.Add(Me.groupBox2)
Me.Controls.Add(Me.groupBox1)
Me.Font = New System.Drawing.Font("Arial", 24.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Name = "Anime_Add"
Me.Padding = New System.Windows.Forms.Padding(10, 60, 20, 20)
@ -403,7 +358,6 @@ Partial Class Anime_Add
Me.TextAlign = MetroFramework.Forms.MetroFormTextAlign.Center
Me.groupBox1.ResumeLayout(False)
Me.groupBox2.ResumeLayout(False)
Me.GroupBox3.ResumeLayout(False)
CType(Me.Btn_min, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.Btn_Close, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
@ -411,10 +365,6 @@ Partial Class Anime_Add
End Sub
Public WithEvents groupBox2 As GroupBox
Public WithEvents groupBox1 As GroupBox
Public WithEvents GroupBox3 As GroupBox
Friend WithEvents Timer1 As Timer
Private WithEvents Timer2 As Timer
Public WithEvents ListBox1 As ListBox
Public WithEvents StatusLabel As MetroFramework.Controls.MetroLabel
Public WithEvents Add_Display As MetroFramework.Controls.MetroLabel
Friend WithEvents MetroTextBox1 As MetroFramework.Controls.MetroTextBox
@ -429,7 +379,6 @@ Partial Class Anime_Add
Private WithEvents Btn_Close As PictureBox
Public WithEvents SubTitlesOnlyCB As MetroFramework.Controls.MetroComboBox
Friend WithEvents btn_dl As Button
Friend WithEvents Timer3 As Timer
Friend WithEvents BackgroundWorker1 As System.ComponentModel.BackgroundWorker
Friend WithEvents bt_Cancel_mass As Button
End Class

View File

@ -117,12 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="Timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="Timer2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>117, 19</value>
</metadata>
<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>
@ -131,10 +125,7 @@
CwDMqs/abpOXAGBZcgDKSBvlblfsRgAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="Timer3.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>206, 19</value>
</metadata>
<metadata name="BackgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>295, 19</value>
<value>24, 23</value>
</metadata>
</root>

View File

@ -16,304 +16,6 @@ Public Class Anime_Add
Public List_DL_Cancel As Boolean = False
Public Function GetCookiesFromFile(ByVal Host As String) As String
Dim Cookies As String = "Cookie: "
Dim Cookie_txt As String = My.Computer.FileSystem.ReadAllText("cookies.txt")
Dim LineChar As String = vbCrLf
If CBool(InStr(Cookie_txt, vbCr)) Then
LineChar = vbCr
'Debug.WriteLine("vbCr")
ElseIf CBool(InStr(Cookie_txt, vbLf)) Then
LineChar = vbLf
'Debug.WriteLine("vbLf")
End If
Dim Cookie_txt1() As String = Cookie_txt.Split(New String() {LineChar}, System.StringSplitOptions.RemoveEmptyEntries)
Debug.WriteLine("got txt")
For i As Integer = 0 To Cookie_txt1.Count - 1
Dim Cookie_txt2() As String = Cookie_txt1(i).Split(New String() {Chr(9)}, System.StringSplitOptions.RemoveEmptyEntries)
If CBool(InStr(Cookie_txt2(0), Host)) = True Then
If CBool(InStr(Cookie_txt2(5), "_evidon_suppress")) = True Then
Continue For
End If
Cookies = Cookies + Cookie_txt2(5) + "=" + Cookie_txt2(6) + ";"
End If
Next
'Debug.WriteLine(Cookies)
Return Cookies
End Function
Public Sub LoadBrowser(ByVal Url As String)
Main.LoadingUrl = Url
Main.LoadedUrls.Clear()
Dim NoBrowser As Boolean = False
'Browser.WebView2.Source = New Uri(Url)
'Exit Sub
'MsgBox(Url)
If CBool(InStr(Url, "crunchyroll.com")) = True And CBool(InStr(Url, "series")) = True Or CBool(InStr(Url, "crunchyroll.com")) = True And CBool(InStr(Url, "watch")) = True Then
#Region "Get Cookies"
Main.CR_Cookies = "Cookie: "
'MsgBox("Cookies")
If File.Exists("cookies.txt") = True Then
Main.CR_Cookies = GetCookiesFromFile("crunchyroll.com")
NoBrowser = True
Main.CrBetaBasic = "Basic bm9haWhkZXZtXzZpeWcwYThsMHE6"
'MsgBox(True.ToString)
Else
Browser.GetCookies(Url)
Debug.WriteLine(Main.CookieList.Count.ToString)
If Main.CookieList.Count = 0 Then
Browser.WebView2.CoreWebView2.Navigate(Url)
StatusLabel.Text = "Status: loading in browser..."
Main.Text = "Status: loading in browser..."
Exit Sub
End If
For i As Integer = 0 To Main.CookieList.Count - 1
If CBool(InStr(Main.CookieList.Item(i).Domain, ".crunchyroll.com")) And CBool(InStr(Main.CookieList.Item(i).Name, "_evidon_suppress")) = False Then
Main.CR_Cookies = Main.CR_Cookies + Main.CookieList.Item(i).Name + "=" + Main.CookieList.Item(i).Value + ";"
End If
Next
End If
'MsgBox(Main.CR_Cookies)
Dim DeviceRegion As String = Nothing
If CBool(InStr(Url, "/series")) Then
Dim locale1() As String = Url.Split(New String() {"crunchyroll.com/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim locale2() As String = locale1(1).Split(New String() {"/series"}, System.StringSplitOptions.RemoveEmptyEntries)
Main.locale = Main.Convert_locale(locale2(0))
If Main.locale = "en-US" Then
Main.Url_locale = ""
Else
Main.Url_locale = locale2(0)
End If
ElseIf CBool(InStr(Url, "/watch")) Then
Dim locale1() As String = Url.Split(New String() {"crunchyroll.com/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim locale2() As String = locale1(1).Split(New String() {"/watch"}, System.StringSplitOptions.RemoveEmptyEntries)
'MsgBox(locale2(0))
Main.locale = Main.Convert_locale(locale2(0))
'End If
If Main.locale = "en-US" Then
Main.Url_locale = ""
Else
Main.Url_locale = locale2(0)
End If
End If
Dim Loc_CR_Cookies = " -H " + Chr(34) + Main.CR_Cookies + Chr(34)
#End Region
Dim Auth As String = " -H " + Chr(34) + "Authorization: " + Main.CrBetaBasic + Chr(34)
Dim Post As String = " -d " + Chr(34) + "grant_type=etp_rt_cookie" + Chr(34) + " -X POST"
Dim CRBetaBearer As String = "Bearer "
Dim v1Token As String = Main.CurlPost("https://www.crunchyroll.com/auth/v1/token", Loc_CR_Cookies, Auth, Post)
If CBool(InStr(v1Token, "curl:")) = True And CBool(InStr(v1Token, "400")) = True Then
v1Token = Main.CurlPost("https://www.crunchyroll.com/auth/v1/token", Loc_CR_Cookies, Auth, Post.Replace("etp_rt_cookie", "client_id"))
End If
'MsgBox(v1Token)
If CBool(InStr(v1Token, "curl:")) = True And CBool(InStr(v1Token, "400")) = True Then
Me.StatusLabel.Text = "Status: Failed - bad request, check CR login"
Main.Text = "Status: Failed - bad request, check CR login"
Debug.WriteLine("Status: Failed - bad request, check CR login")
If GroupBox3.Visible = True Then
GroupBox3.Visible = False
groupBox2.Visible = False
groupBox1.Visible = True
List_DL_Cancel = False
btn_dl.BackgroundImage = My.Resources.main_button_download_default
End If
Main.b = True
Exit Sub
ElseIf CBool(InStr(v1Token, "curl:")) = True Then
v1Token = Main.CurlPost("https://www.crunchyroll.com/auth/v1/token", Loc_CR_Cookies, Auth, Post)
End If
'MsgBox(v1Token)
If CBool(InStr(v1Token, "curl:")) = True Then
Browser.WebView2.CoreWebView2.Navigate(Url)
StatusLabel.Text = "Status: loading in browser..."
Exit Sub
End If
'
Dim Token() As String = v1Token.Split(New String() {Chr(34) + "access_token" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim Token2() As String = Token(1).Split(New String() {Chr(34) + "," + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
CRBetaBearer = CRBetaBearer + Token2(0)
Dim ObjectsUrl As String = Nothing
Dim Auth2 As String = " -H " + Chr(34) + "Authorization: " + CRBetaBearer + Chr(34)
If CBool(InStr(Url, "crunchyroll.com")) = True And CBool(InStr(Url, "series/")) = True Then
Dim v2Content As String = Main.CurlAuth("https://www.crunchyroll.com/index/v2", Main.CR_Cookies, Auth2)
If CBool(InStr(v2Content, "curl:")) = True Then
v2Content = Main.CurlAuth("https://www.crunchyroll.com/index/v2", Main.CR_Cookies, Auth2)
End If
If CBool(InStr(v2Content, "curl:")) = True Then
Browser.WebView2.CoreWebView2.Navigate(Url)
StatusLabel.Text = "Status: loading in browser..."
Exit Sub
End If
Dim v2ContentBeta() As String = v2Content.Split(New String() {Chr(34) + "cms_web" + Chr(34) + ":"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim bucket() As String = v2ContentBeta(1).Split(New String() {Chr(34) + "bucket" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim bucket2() As String = bucket(1).Split(New String() {Chr(34) + "," + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim policy() As String = v2ContentBeta(1).Split(New String() {Chr(34) + "policy" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim policy2() As String = policy(1).Split(New String() {Chr(34) + "," + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim signature() As String = v2ContentBeta(1).Split(New String() {Chr(34) + "signature" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim signature2() As String = signature(1).Split(New String() {Chr(34) + "," + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim key_pair_id() As String = v2ContentBeta(1).Split(New String() {Chr(34) + "key_pair_id" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim key_pair_id2() As String = key_pair_id(1).Split(New String() {Chr(34) + "," + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim Series_idUrlBuilder() As String = Url.Split(New String() {"series/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim Series_idUrlBuilder2() As String = Series_idUrlBuilder(1).Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim SeriesUrl As String = "https://www.crunchyroll.com/cms/v2" + bucket2(0) + "/seasons?series_id=" + Series_idUrlBuilder2(0) + "&locale=" + Main.locale + "&Signature=" + signature2(0) + "&Policy=" + policy2(0) + "&Key-Pair-Id=" + key_pair_id2(0)
'MsgBox(SeriesUrl)
Main.GetBetaSeasons(SeriesUrl)
ElseIf CBool(InStr(Url, "crunchyroll.com")) = True And CBool(InStr(Url, "watch/")) = True And CBool(Main.CrBetaBasic = Nothing) = False Then
'MsgBox(Url)
Dim ObjectsURLBuilder3() As String = Url.Split(New String() {"watch/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim ObjectsURLBuilder4() As String = ObjectsURLBuilder3(1).Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
ObjectsUrl = "https://www.crunchyroll.com/content/v2/cms/objects/" + ObjectsURLBuilder4(0) + "?locale=" + Main.locale '+ "&Signature=" + signature2(0) + "&Policy=" + policy2(0) + "&Key-Pair-Id=" + key_pair_id2(0)
'End Using
'MsgBox(ObjectsUrl)
Debug.WriteLine("ObjectsUrl: " + ObjectsUrl)
Dim StreamsUrl As String = Nothing
Dim ObjectJson As String
Try
ObjectJson = Main.CurlAuth(ObjectsUrl, Loc_CR_Cookies, Auth2)
'"curl:" 'Main.Curl(ObjectsUrl)
'MsgBox(ObjectJson)
'If CBool(InStr(ObjectJson, "curl:")) = True Then
' ObjectJson = Main.Curl(ObjectsUrl)
'End If
If CBool(InStr(ObjectJson, "curl:")) = True Then
Browser.WebView2.CoreWebView2.Navigate(ObjectsUrl)
Main.LoadingUrl = ObjectsUrl
Exit Sub
ElseIf CBool(InStr(ObjectJson, "videos/")) = False Then
StatusLabel.Text = "Status: Failed - no video, check CR login"
Main.Text = "Status: Failed - no video, check CR login"
Debug.WriteLine("Status: Failed - no video, check CR login")
If GroupBox3.Visible = True Then
GroupBox3.Visible = False
groupBox2.Visible = False
groupBox1.Visible = True
List_DL_Cancel = False
btn_dl.BackgroundImage = My.Resources.main_button_download_default
End If
Exit Sub
End If
Catch ex As Exception
Browser.WebView2.CoreWebView2.Navigate(Url)
Exit Sub
End Try
Try
Dim StreamsUrlBuilder() As String = ObjectJson.Split(New String() {"videos/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim StreamsUrlBuilder2() As String = StreamsUrlBuilder(1).Split(New String() {"/streams"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim StreamsUrlBuilder3() As String = ObjectsUrl.Split(New String() {"objects/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim StreamsUrlBuilder4() As String = StreamsUrlBuilder3(1).Split(New String() {"?"}, System.StringSplitOptions.RemoveEmptyEntries)
StreamsUrl = StreamsUrlBuilder3(0) + "videos/" + StreamsUrlBuilder2(0) + "/streams?" + StreamsUrlBuilder4(1)
' Debug.WriteLine(StreamsUrl)
Catch ex As Exception
Browser.WebView2.CoreWebView2.Navigate(Url)
Exit Sub
End Try
Main.GetBetaVideoProxy(StreamsUrl, Auth2, Url)
Else
Browser.WebView2.CoreWebView2.Navigate(Url)
End If
Else
'to do
End If
End Sub
Private Sub ComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox2.SelectedIndexChanged
Try
If ComboBox2.Text = SubFolder_Nothing Then
@ -343,8 +45,7 @@ Public Class Anime_Add
Btn_Close.Image = Main.CloseImg
Btn_min.Image = Main.MinImg
ListBox1.BackColor = Main.BackColorValue
ListBox1.ForeColor = Main.ForeColorValue
Try
@ -353,26 +54,7 @@ Public Class Anime_Add
End Try
Try
Dim ListBox1List As New List(Of String)
'Jeder Eintrag in der Combobox durchgehen
For Each item As String In Main.ListBoxList
'Wenn der Combobox-Eintrag noch nicht in der Result-List vorhanden ist, Eintrag der Result-List hinzufügen
If ListBox1List.Contains(item) = False Then
ListBox1List.Add(item)
End If
Next
ListBox1.Items.Clear()
'Die Result-List der Combobox hinzufügen
ListBox1.Items.AddRange(ListBox1List.ToArray)
'For i As Integer = 0 To Main.ListBoxList.Count - 1
' ListBox1.Items.Add(Main.ListBoxList.Item(i))
'Next
Catch ex As Exception
End Try
Try
Main.waveOutSetVolume(0, 0)
Catch ex As Exception
@ -473,7 +155,8 @@ Public Class Anime_Add
'Else
If Main.RunningDownloads >= Main.MaxDL Then
Debug.WriteLine("Max_Dl")
ListBox1.Items.Add(textBox1.Text)
'ListBox1.Items.Add(textBox1.Text)
Main.ListBoxList.Add(textBox1.Text)
textBox1.ForeColor = Color.FromArgb(9248044)
Pause(2)
textBox1.ForeColor = Color.Black
@ -513,7 +196,7 @@ Public Class Anime_Add
Main.b = False
Debug.WriteLine("what's going on?: " + Date.Now.ToString)
StatusLabel.Text = "Status: loading ...."
LoadBrowser(textBox1.Text)
Main.LoadBrowser(textBox1.Text)
Else
Debug.WriteLine("Not Ready!")
End If
@ -522,7 +205,7 @@ Public Class Anime_Add
ElseIf CBool(InStr(textBox1.Text, "Test=true")) Then
LoadBrowser(textBox1.Text)
Main.LoadBrowser(textBox1.Text)
Else
MsgBox(Main.URL_Invaild, MsgBoxStyle.OkOnly)
@ -537,7 +220,6 @@ Public Class Anime_Add
If Mass_DL_Cancel = True Then
Mass_DL_Cancel = False
GroupBox3.Visible = False
groupBox2.Visible = False
Main.Grapp_Abord = True
Main.b = True
@ -576,12 +258,7 @@ Public Class Anime_Add
End If
ElseIf GroupBox3.Visible = True Then
GroupBox3.Visible = False
groupBox2.Visible = False
groupBox1.Visible = True
List_DL_Cancel = False
btn_dl.BackgroundImage = My.Resources.main_button_download_default
End If
btn_dl.Enabled = True
@ -750,7 +427,7 @@ Public Class Anime_Add
Debug.WriteLine("error- getting EpisodeJson data")
Debug.WriteLine(ex.ToString)
Main.FunimationJsonBrowser = "EpisodeJson"
LoadBrowser(EpisodeJsonURL)
Main.LoadBrowser(EpisodeJsonURL)
Exit Sub
End Try
@ -815,129 +492,8 @@ Public Class Anime_Add
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
If ListBox1.Items.Count > 0 Then
If StatusLabel.Text = "Status: idle" Then
StatusLabel.Cursor = Cursors.Hand
StatusLabel.Text = "Status: items in queue, click me to work off."
End If
If CBool(InStr(Main.Text, "Crunchyroll Downloader")) Or CBool(InStr(Main.Text, " downloads in queue")) Then
Main.Text = "Status: " + ListBox1.Items.Count.ToString + " downloads in queue" + vbNewLine + "open the add window to continue"
End If
Else
If CBool(InStr(Main.Text, " downloads in queue")) Then
Main.Text = "Crunchyroll Downloader"
End If
StatusLabel.Cursor = Cursors.Default
End If
End Sub
#Region "Listbox"
Private Sub Timer2_Tick(sender As Object, e As EventArgs) Handles Timer2.Tick
If GroupBox3.Visible = True Then
If ListBox1.Items.Count = 0 Then
GroupBox3.Visible = False
groupBox2.Visible = False
groupBox1.Visible = True
List_DL_Cancel = False
btn_dl.BackgroundImage = My.Resources.main_button_download_default
End If
End If
Try
Dim ItemFinshedCount As Integer = 0
Dim Item As New List(Of CRD_List_Item)
Item.AddRange(Main.Panel1.Controls.OfType(Of CRD_List_Item))
For i As Integer = 0 To Item.Count - 1
Debug.WriteLine(Item(i).GetIsStatusFinished().ToString)
If Item(i).GetIsStatusFinished() = True Then
ItemFinshedCount = ItemFinshedCount + 1
End If
Next
Main.RunningDownloads = Item.Count - ItemFinshedCount
Catch ex As Exception
Main.RunningDownloads = Main.Panel1.Controls.Count
End Try
If Main.RunningDownloads < Main.MaxDL Then
If ListBox1.Items.Count > 0 Then
If GroupBox3.Visible = True Then
If CBool(InStr(ListBox1.GetItemText(ListBox1.Items(0)), "funimation.com")) Then
If Main.Funimation_Grapp_RDY = True Then
Dim UriUsed As String = ListBox1.GetItemText(ListBox1.Items(0))
If CBool(InStr(UriUsed, "funimation.com/v/")) Then
Dim Episode0() As String = textBox1.Text.Split(New String() {"?"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim Episode() As String = Episode0(0).Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim v1JsonUrl As String = "https://d33et77evd9bgg.cloudfront.net/data/v1/episodes/" + Episode(Episode.Length - 1) + ".json"
Dim v1Json As String = Nothing
Try
Using client As New WebClient()
client.Encoding = System.Text.Encoding.UTF8
client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), ""))
v1Json = client.DownloadString(v1JsonUrl)
End Using
Main.Funimation_Grapp_RDY = False
Main.WebbrowserURL = UriUsed
ListBox1.Items.Remove(ListBox1.Items(0))
Main.b = False
Main.Invalidate()
Main.GetFunimationNewJS_VideoProxy(Nothing, v1Json)
Exit Sub
Catch ex As Exception
Debug.WriteLine("error- getting v1Json data for the bypasss")
Debug.WriteLine(ex.ToString)
End Try
End If
Main.Funimation_Grapp_RDY = False
Main.WebbrowserURL = UriUsed
ListBox1.Items.Remove(ListBox1.Items(0))
Main.b = False
StatusLabel.Text = "Status: loading in browser"
Main.Text = "Status: loading in browser"
LoadBrowser(UriUsed)
Main.Invalidate()
End If
Else
If Main.Grapp_RDY = True Then
Main.Grapp_RDY = False
StatusLabel.Text = "Status: loading ..."
Main.Text = "Status: loading ..."
LoadBrowser(ListBox1.GetItemText(ListBox1.Items(0)))
ListBox1.Items.Remove(ListBox1.Items(0))
Main.b = False
Main.Invalidate()
End If
End If
End If
End If
End If
End Sub
Private Sub StatusLabel_Click(sender As Object, e As EventArgs) Handles StatusLabel.Click
If StatusLabel.Text = "Status: items in queue, click me to work off." Then
groupBox1.Visible = False
groupBox2.Visible = False
GroupBox3.Visible = True
btn_dl.Text = "Cancel"
List_DL_Cancel = True
End If
End Sub
@ -949,18 +505,6 @@ Public Class Anime_Add
End Sub
Private Sub ListBox1_DoubleClick(sender As Object, e As EventArgs) Handles ListBox1.DoubleClick
ListBox1.Items.Remove(ListBox1.SelectedItem)
End Sub
#End Region
Private Sub Anime_Add_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)
@ -971,12 +515,7 @@ Public Class Anime_Add
End Sub
Private Sub Btn_Close_Click(sender As Object, e As EventArgs) Handles Btn_Close.Click
Main.ListBoxList.Clear()
If ListBox1.Items.Count > 0 Then
For i As Integer = 0 To ListBox1.Items.Count - 1
Main.ListBoxList.Add(ListBox1.Items.Item(i).ToString)
Next
End If
Me.Close()
End Sub
@ -1057,9 +596,6 @@ Public Class Anime_Add
End If
End Sub
'Private Sub Timer3_Tick(sender As Object, e As EventArgs) Handles Timer3.Tick
' Timer3.Enabled = False
' 'MsgBox(True.ToString)
'End Sub
End Class

View File

@ -359,6 +359,9 @@
<Content Include="bin\x86\Debug\Lib\swiftshader\libEGL.dll" />
<Content Include="bin\x86\Debug\Lib\swiftshader\libGLESv2.dll" />
<Content Include="icon.ico" />
<None Include="Resources\main-queue_invert_dark.png" />
<None Include="Resources\main-queue_invert.png" />
<None Include="Resources\main-queue.png" />
<None Include="Resources\main_close_hover.png" />
<None Include="Resources\main-mini_dark_hover.png" />
<None Include="Resources\main-close_dark_hover.png" />

View File

@ -39,6 +39,7 @@ Partial Class Main
Me.Btn_min = New System.Windows.Forms.Button()
Me.Btn_Close = New System.Windows.Forms.Button()
Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.QueueToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ToggleDebugModeToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.OpenSettingsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.Funimation_Token = New System.Windows.Forms.ToolStripMenuItem()
@ -53,7 +54,7 @@ Partial Class Main
Me.DummyItemToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.ScanTimeout = New System.Windows.Forms.Timer(Me.components)
Me.QueueToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.Btn_Queue = New System.Windows.Forms.Button()
CType(Me.PictureBox5, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.ConsoleBar, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.MetroStyleManager1, System.ComponentModel.ISupportInitialize).BeginInit()
@ -166,6 +167,11 @@ Partial Class Main
Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
resources.ApplyResources(Me.ContextMenuStrip1, "ContextMenuStrip1")
'
'QueueToolStripMenuItem
'
Me.QueueToolStripMenuItem.Name = "QueueToolStripMenuItem"
resources.ApplyResources(Me.QueueToolStripMenuItem, "QueueToolStripMenuItem")
'
'ToggleDebugModeToolStripMenuItem
'
Me.ToggleDebugModeToolStripMenuItem.Name = "ToggleDebugModeToolStripMenuItem"
@ -235,10 +241,16 @@ Partial Class Main
'
Me.ScanTimeout.Interval = 1000
'
'QueueToolStripMenuItem
'Btn_Queue
'
Me.QueueToolStripMenuItem.Name = "QueueToolStripMenuItem"
resources.ApplyResources(Me.QueueToolStripMenuItem, "QueueToolStripMenuItem")
Me.Btn_Queue.BackColor = System.Drawing.Color.Transparent
resources.ApplyResources(Me.Btn_Queue, "Btn_Queue")
Me.Btn_Queue.Cursor = System.Windows.Forms.Cursors.Hand
Me.Btn_Queue.FlatAppearance.BorderSize = 0
Me.Btn_Queue.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent
Me.Btn_Queue.Image = Global.Crunchyroll_Downloader.My.Resources.Resources.main_queue
Me.Btn_Queue.Name = "Btn_Queue"
Me.Btn_Queue.UseVisualStyleBackColor = False
'
'Main
'
@ -246,6 +258,7 @@ Partial Class Main
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None
Me.BorderStyle = MetroFramework.Forms.MetroFormBorderStyle.FixedSingle
resources.ApplyResources(Me, "$this")
Me.Controls.Add(Me.Btn_Queue)
Me.Controls.Add(Me.Panel1)
Me.Controls.Add(Me.Btn_Close)
Me.Controls.Add(Me.Btn_min)
@ -299,4 +312,5 @@ Partial Class Main
Public WithEvents Panel1 As Panel
Friend WithEvents ScanTimeout As Timer
Friend WithEvents QueueToolStripMenuItem As ToolStripMenuItem
Friend WithEvents Btn_Queue As Button
End Class

View File

@ -132,7 +132,7 @@
<value>0, 0, 0, 0</value>
</data>
<data name="PictureBox5.Size" type="System.Drawing.Size, System.Drawing">
<value>840, 6</value>
<value>900, 6</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="PictureBox5.TabIndex" type="System.Int32, mscorlib">
@ -148,7 +148,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;PictureBox5.ZOrder" xml:space="preserve">
<value>9</value>
<value>10</value>
</data>
<metadata name="ToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>383, 18</value>
@ -187,7 +187,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;TheTextBox.ZOrder" xml:space="preserve">
<value>7</value>
<value>8</value>
</data>
<data name="ConsoleBar.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Stretch</value>
@ -199,7 +199,7 @@
<value>0, 0, 0, 0</value>
</data>
<data name="ConsoleBar.Size" type="System.Drawing.Size, System.Drawing">
<value>840, 6</value>
<value>900, 6</value>
</data>
<data name="ConsoleBar.TabIndex" type="System.Int32, mscorlib">
<value>68</value>
@ -214,7 +214,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;ConsoleBar.ZOrder" xml:space="preserve">
<value>8</value>
<value>9</value>
</data>
<metadata name="MetroStyleExtender1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
@ -229,7 +229,37 @@
<value>87</value>
</metadata>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>842, 630</value>
<value>900, 630</value>
</data>
<data name="Btn_Queue.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="Btn_Queue.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
<value>Flat</value>
</data>
<data name="Btn_Queue.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="Btn_Queue.Location" type="System.Drawing.Point, System.Drawing">
<value>575, 18</value>
</data>
<data name="Btn_Queue.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 35</value>
</data>
<data name="Btn_Queue.TabIndex" type="System.Int32, mscorlib">
<value>70</value>
</data>
<data name="&gt;&gt;Btn_Queue.Name" xml:space="preserve">
<value>Btn_Queue</value>
</data>
<data name="&gt;&gt;Btn_Queue.Type" xml:space="preserve">
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;Btn_Queue.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;Btn_Queue.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="Panel1.AutoScroll" type="System.Boolean, mscorlib">
<value>True</value>
@ -238,10 +268,10 @@
<value>1, 71</value>
</data>
<data name="Panel1.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>798, 403</value>
<value>898, 403</value>
</data>
<data name="Panel1.Size" type="System.Drawing.Size, System.Drawing">
<value>840, 546</value>
<value>898, 546</value>
</data>
<data name="Panel1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@ -256,7 +286,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;Panel1.ZOrder" xml:space="preserve">
<value>1</value>
<value>2</value>
</data>
<data name="Btn_Close.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
@ -271,7 +301,7 @@
<value>800, 1</value>
</data>
<data name="Btn_Close.Size" type="System.Drawing.Size, System.Drawing">
<value>40, 40</value>
<value>35, 35</value>
</data>
<data name="Btn_Close.TabIndex" type="System.Int32, mscorlib">
<value>5</value>
@ -286,7 +316,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;Btn_Close.ZOrder" xml:space="preserve">
<value>2</value>
<value>3</value>
</data>
<data name="Btn_min.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>None</value>
@ -301,7 +331,7 @@
<value>757, 1</value>
</data>
<data name="Btn_min.Size" type="System.Drawing.Size, System.Drawing">
<value>40, 40</value>
<value>30, 30</value>
</data>
<data name="Btn_min.TabIndex" type="System.Int32, mscorlib">
<value>4</value>
@ -316,7 +346,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;Btn_min.ZOrder" xml:space="preserve">
<value>3</value>
<value>4</value>
</data>
<data name="Btn_Settings.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Zoom</value>
@ -328,7 +358,7 @@
<value>NoControl</value>
</data>
<data name="Btn_Settings.Location" type="System.Drawing.Point, System.Drawing">
<value>641, 18</value>
<value>665, 18</value>
</data>
<data name="Btn_Settings.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 35</value>
@ -346,7 +376,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;Btn_Settings.ZOrder" xml:space="preserve">
<value>4</value>
<value>5</value>
</data>
<data name="Btn_Browser.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Zoom</value>
@ -355,7 +385,7 @@
<value>Flat</value>
</data>
<data name="Btn_Browser.Location" type="System.Drawing.Point, System.Drawing">
<value>124, 18</value>
<value>140, 18</value>
</data>
<data name="Btn_Browser.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 35</value>
@ -373,7 +403,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;Btn_Browser.ZOrder" xml:space="preserve">
<value>5</value>
<value>6</value>
</data>
<data name="Btn_add.BackgroundImageLayout" type="System.Windows.Forms.ImageLayout, System.Windows.Forms">
<value>Zoom</value>
@ -385,7 +415,7 @@
<value>NoControl</value>
</data>
<data name="Btn_add.Location" type="System.Drawing.Point, System.Drawing">
<value>11, 18</value>
<value>20, 18</value>
</data>
<data name="Btn_add.Size" type="System.Drawing.Size, System.Drawing">
<value>80, 35</value>
@ -403,7 +433,7 @@
<value>$this</value>
</data>
<data name="&gt;&gt;Btn_add.ZOrder" xml:space="preserve">
<value>6</value>
<value>7</value>
</data>
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
<value>Microsoft Sans Serif, 8.25pt</value>
@ -412,7 +442,7 @@
<value>0, 0, 0, 0</value>
</data>
<data name="$this.MinimumSize" type="System.Drawing.Size, System.Drawing">
<value>840, 630</value>
<value>900, 630</value>
</data>
<data name="$this.Text" xml:space="preserve">
<value>Crunchyroll Downloader</value>
@ -453,6 +483,12 @@
<data name="&gt;&gt;Timer4.Type" xml:space="preserve">
<value>System.Windows.Forms.Timer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;QueueToolStripMenuItem.Name" xml:space="preserve">
<value>QueueToolStripMenuItem</value>
</data>
<data name="&gt;&gt;QueueToolStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;ToggleDebugModeToolStripMenuItem.Name" xml:space="preserve">
<value>ToggleDebugModeToolStripMenuItem</value>
</data>
@ -531,12 +567,6 @@
<data name="&gt;&gt;ScanTimeout.Type" xml:space="preserve">
<value>System.Windows.Forms.Timer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;QueueToolStripMenuItem.Name" xml:space="preserve">
<value>QueueToolStripMenuItem</value>
</data>
<data name="&gt;&gt;QueueToolStripMenuItem.Type" xml:space="preserve">
<value>System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>Main</value>
</data>
@ -628,7 +658,7 @@
<value>Dummy_Item</value>
</data>
<data name="ContextMenuStrip1.Size" type="System.Drawing.Size, System.Drawing">
<value>234, 312</value>
<value>234, 290</value>
</data>
<data name="&gt;&gt;ContextMenuStrip1.Name" xml:space="preserve">
<value>ContextMenuStrip1</value>

View File

@ -194,6 +194,10 @@ Public Class Main
#Region "UI"
Private Sub Main_TextChanged(sender As Object, e As EventArgs) Handles Me.TextChanged
Me.Invalidate()
End Sub
Public CloseImg As Bitmap = My.Resources.main_del
@ -259,6 +263,20 @@ Public Class Main
Btn_Settings.Image = My.Resources.main_settings
End Sub
Private Sub Btn_Queue_MouseEnter(sender As Object, e As EventArgs) Handles Btn_Queue.MouseEnter, Btn_Queue.GotFocus
If Manager.Theme = MetroThemeStyle.Dark Then
Btn_Queue.Image = My.Resources.main_queue_invert_dark
Else
Btn_Queue.Image = My.Resources.main_queue_invert
End If
End Sub
Private Sub Btn_Queue_MouseLeave(sender As Object, e As EventArgs) Handles Btn_Queue.MouseLeave, Btn_Queue.LostFocus
Btn_Queue.Image = My.Resources.main_queue
End Sub
Private Sub Btn_min_MouseEnter(sender As Object, e As EventArgs) Handles Btn_min.MouseEnter, Btn_min.GotFocus
If Manager.Theme = MetroThemeStyle.Dark Then
Btn_min.Image = My.Resources.main_mini_dark_hover
@ -317,9 +335,10 @@ Public Class Main
ConsoleBar.Width = Me.Width - 40
TheTextBox.Location = New Point(1, Me.Height - ListViewHeightOffset + 7)
TheTextBox.Width = Me.Width - 2
Btn_Close.Location = New Point(Me.Width - 41, 1)
Btn_min.Location = New Point(Me.Width - 82, 1)
Btn_Settings.Location = New Point(Me.Width - 190, 17)
Btn_Close.Location = New Point(Me.Width - 36, 1)
Btn_min.Location = New Point(Me.Width - 67, 1)
Btn_Settings.Location = New Point(Me.Width - 165, 17)
Btn_Queue.Location = New Point(Me.Width - 265, 17)
Try
Panel1.AutoScrollPosition = New Point(0, 0)
@ -390,8 +409,12 @@ Public Class Main
Private Sub Main_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'
FillArray()
#Region "settings path"
Dim mySettings As New DirectorySettings
@ -1002,7 +1025,8 @@ Public Class Main
'MsgBox("dl_abourd")
End If
If UseQueue = True Then
Anime_Add.ListBox1.Items.Add(ListOfEpisodes(i))
'Anime_Add.ListBox1.Items.Add(ListOfEpisodes(i))
ListBoxList.Add(ListOfEpisodes(i))
Anime_Add.Add_Display.ForeColor = Color.FromArgb(9248044)
Pause(1)
Anime_Add.Add_Display.ForeColor = Color.Black
@ -1010,7 +1034,7 @@ Public Class Main
Grapp_RDY = False
b = False
Debug.WriteLine("b: " + b.ToString)
Anime_Add.LoadBrowser(ListOfEpisodes(i))
LoadBrowser(ListOfEpisodes(i))
End If
Anime_Add.Add_Display.Text = (i - First + 1).ToString + " / " + (Last - First + 1).ToString
Next
@ -1024,14 +1048,12 @@ Public Class Main
Gesamt = 0.ToString
Anime_Add.groupBox1.Visible = True
Anime_Add.groupBox2.Visible = False
Anime_Add.GroupBox3.Visible = False
Anime_Add.Mass_DL_Cancel = False
Anime_Add.btn_dl.Text = "Download" 'btn_dl.BackgroundImage = My.Resources.main_button_download_default
End Try
Pause(5)
Anime_Add.groupBox1.Visible = True
Anime_Add.groupBox2.Visible = False
Anime_Add.GroupBox3.Visible = False
Anime_Add.Mass_DL_Cancel = False
Anime_Add.btn_dl.Text = "Download" 'Anime_Add.btn_dl.BackgroundImage = My.Resources.main_button_download_default
End Sub
@ -2322,7 +2344,8 @@ Public Class Main
'MsgBox("dl_abourd")
End If
If UseQueue = True Then
Anime_Add.ListBox1.Items.Add(ListOfEpisodes(i))
'Anime_Add.ListBox1.Items.Add(ListOfEpisodes(i))
ListBoxList.Add(ListOfEpisodes(i))
Anime_Add.Add_Display.ForeColor = Color.FromArgb(9248044)
Pause(1)
Anime_Add.Add_Display.ForeColor = Color.Black
@ -2367,7 +2390,6 @@ Public Class Main
Gesamt = 0.ToString
Anime_Add.groupBox1.Visible = True
Anime_Add.groupBox2.Visible = False
Anime_Add.GroupBox3.Visible = False
Anime_Add.Mass_DL_Cancel = False
Anime_Add.btn_dl.Text = "Download" 'Anime_Add.btn_dl.BackgroundImage = My.Resources.main_button_download_default
End Try
@ -2375,7 +2397,6 @@ Public Class Main
Pause(5)
Anime_Add.groupBox1.Visible = True
Anime_Add.groupBox2.Visible = False
Anime_Add.GroupBox3.Visible = False
Anime_Add.Mass_DL_Cancel = False
Anime_Add.btn_dl.Text = "Download" 'Anime_Add.btn_dl.BackgroundImage = My.Resources.main_button_download_default
End Sub
@ -3676,18 +3697,18 @@ Public Class Main
Dim html() As String = htmlReq.Split(New String() {"HTMLMass="}, System.StringSplitOptions.RemoveEmptyEntries)
Dim DecodedHTML As String = UrlDecode(html(1))
Dim URLSplit() As String = DecodedHTML.Split(New String() {"javascript:"}, System.StringSplitOptions.RemoveEmptyEntries)
If Application.OpenForms().OfType(Of Anime_Add).Any = True Then
For i As Integer = 0 To URLSplit.Count - 1
Dim ii As Integer = i
Me.Invoke(New Action(Function() As Object
If Anime_Add.ListBox1.Items.Contains(URLSplit(ii)) = False Then
Anime_Add.ListBox1.Items.Add(URLSplit(ii))
End If
'If Application.OpenForms().OfType(Of Anime_Add).Any = True Then
' For i As Integer = 0 To URLSplit.Count - 1
' Dim ii As Integer = i
' Me.Invoke(New Action(Function() As Object
' If Anime_Add.ListBox1.Items.Contains(URLSplit(ii)) = False Then
' Anime_Add.ListBox1.Items.Add(URLSplit(ii))
Return Nothing
End Function))
Next
Else
' End If
' 'Anime_Add.ListBox1.Items.Add(URLSplit(ii))
' Return Nothing
' End Function))
' Next
'Else
For i As Integer = 0 To URLSplit.Count - 1
If ListBoxList.Contains(URLSplit(i)) = False Then
ListBoxList.Add(URLSplit(i))
@ -3698,7 +3719,7 @@ Public Class Main
Me.Invalidate()
Return Nothing
End Function))
End If
'End If
strRequest = rootPath & "Post_Mass_Sucess.html" 'PostPage
SendHTMLResponse(stream, strRequest)
Catch abort As ThreadAbortException
@ -3722,18 +3743,18 @@ Public Class Main
SystemWebBrowserCookie = CookieSplit(1)
Dim URLSplit() As String = CookieSplit(0).Split(New String() {"FunimationMass="}, System.StringSplitOptions.RemoveEmptyEntries)
Dim URLSplit2() As String = URLSplit(1).Split(New String() {"javascript:"}, System.StringSplitOptions.RemoveEmptyEntries)
If Application.OpenForms().OfType(Of Anime_Add).Any = True Then
For i As Integer = 0 To URLSplit2.Count - 1
Dim ii As Integer = i
Me.Invoke(New Action(Function() As Object
If Anime_Add.ListBox1.Items.Contains(URLSplit2(ii)) = False Then
Anime_Add.ListBox1.Items.Add(URLSplit2(ii))
End If
'Anime_Add.ListBox1.Items.Add(URLSplit(ii))
Return Nothing
End Function))
Next
Else
'If Application.OpenForms().OfType(Of Anime_Add).Any = True Then
' For i As Integer = 0 To URLSplit2.Count - 1
' Dim ii As Integer = i
' Me.Invoke(New Action(Function() As Object
' If Anime_Add.ListBox1.Items.Contains(URLSplit2(ii)) = False Then
' Anime_Add.ListBox1.Items.Add(URLSplit2(ii))
' End If
' 'Anime_Add.ListBox1.Items.Add(URLSplit(ii))
' Return Nothing
' End Function))
' Next
'Else
For i As Integer = 0 To URLSplit2.Count - 1
If ListBoxList.Contains(URLSplit2(i)) = False Then
ListBoxList.Add(URLSplit2(i))
@ -3744,7 +3765,7 @@ Public Class Main
Me.Invalidate()
Return Nothing
End Function))
End If
'End If
strRequest = rootPath & "Post_Mass_Sucess.html" 'PostPage
SendHTMLResponse(stream, strRequest)
End If
@ -3829,14 +3850,14 @@ Public Class Main
b = False
End If
Else
If Application.OpenForms().OfType(Of Anime_Add).Any = True Then
Me.Invoke(New Action(Function() As Object
If Anime_Add.ListBox1.Items.Contains(WebbrowserURL) = False Then
Anime_Add.ListBox1.Items.Add(WebbrowserURL)
End If
Return Nothing
End Function))
Else
'If Application.OpenForms().OfType(Of Anime_Add).Any = True Then
' Me.Invoke(New Action(Function() As Object
' If Anime_Add.ListBox1.Items.Contains(WebbrowserURL) = False Then
' Anime_Add.ListBox1.Items.Add(WebbrowserURL)
' End If
' Return Nothing
' End Function))
'Else
If ListBoxList.Contains(WebbrowserURL) = False Then
ListBoxList.Add(WebbrowserURL)
End If
@ -3845,7 +3866,7 @@ Public Class Main
Me.Invalidate()
Return Nothing
End Function))
End If
'End If
End If
strRequest = rootPath & "Post_Single_Sucess.html" 'PostPage
SendHTMLResponse(stream, strRequest)
@ -4042,21 +4063,23 @@ Public Class Main
Private Sub Timer4_Tick(sender As Object, e As EventArgs) Handles Timer4.Tick
If Application.OpenForms().OfType(Of Anime_Add).Any = False Then
If ListBoxList.Count > 0 Then
If CBool(InStr(Me.Text, "Crunchyroll Downloader")) Or CBool(InStr(Me.Text, " downloads in queue")) Then
Me.Text = "Status: " + ListBoxList.Count.ToString + " downloads in queue" + vbNewLine + "open the add window to continue"
End If
End If
End If
'If Application.OpenForms().OfType(Of Anime_Add).Any = False Then
' If ListBoxList.Count > 0 Then
' If CBool(InStr(Me.Text, "Crunchyroll Downloader")) Or CBool(InStr(Me.Text, " downloads in queue")) Then
' Me.Text = "Status: " + ListBoxList.Count.ToString + " downloads in queue" + vbNewLine + "open the add window to continue"
' End If
' End If
'End If
End Sub
Private Sub Main_Shown(sender As Object, e As EventArgs) Handles Me.Shown
Btn_add.Image = My.Resources.main_add
Panel1.Select()
End Sub
End Sub
Private Async Sub Funimation_Token_Click(sender As Object, e As EventArgs) Handles Funimation_Token.Click
Dim Token As String = Nothing
Try
@ -4227,12 +4250,324 @@ Public Class Main
Queue.Show()
End Sub
Private Sub Btn_Queue_Click(sender As Object, e As EventArgs) Handles Btn_Queue.Click
If File.Exists("cookies.txt") = False Then
If Application.OpenForms().OfType(Of Browser).Any = True Then
Else
UserBowser = False
Browser.Show()
End If
End If
If Queue.WindowState = System.Windows.Forms.FormWindowState.Minimized Then
Queue.WindowState = System.Windows.Forms.FormWindowState.Normal
Else
Queue.Show()
End If
End Sub
#End Region
#Region "Process Urls"
Public Sub LoadBrowser(ByVal Url As String)
LoadingUrl = Url
LoadedUrls.Clear()
Dim NoBrowser As Boolean = False
'Browser.WebView2.Source = New Uri(Url)
'Exit Sub
'MsgBox(Url)
If CBool(InStr(Url, "crunchyroll.com")) = True And CBool(InStr(Url, "series")) = True Or CBool(InStr(Url, "crunchyroll.com")) = True And CBool(InStr(Url, "watch")) = True Then
#Region "Get Cookies"
CR_Cookies = "Cookie: "
'MsgBox("Cookies")
If File.Exists("cookies.txt") = True Then
CR_Cookies = GetCookiesFromFile("crunchyroll.com")
NoBrowser = True
CrBetaBasic = "Basic bm9haWhkZXZtXzZpeWcwYThsMHE6"
'MsgBox(True.ToString)
Else
Browser.GetCookies(Url)
Debug.WriteLine(CookieList.Count.ToString)
If CookieList.Count = 0 Then
Browser.WebView2.CoreWebView2.Navigate(Url)
SetStatusLabel("Status: loading in browser...")
Me.Text = "Status: loading in browser..."
Exit Sub
End If
For i As Integer = 0 To CookieList.Count - 1
If CBool(InStr(CookieList.Item(i).Domain, ".crunchyroll.com")) And CBool(InStr(CookieList.Item(i).Name, "_evidon_suppress")) = False Then
CR_Cookies = CR_Cookies + CookieList.Item(i).Name + "=" + CookieList.Item(i).Value + ";"
End If
Next
End If
'MsgBox(Main.CR_Cookies)
Dim DeviceRegion As String = Nothing
If CBool(InStr(Url, "/series")) Then
Dim locale1() As String = Url.Split(New String() {"crunchyroll.com/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim locale2() As String = locale1(1).Split(New String() {"/series"}, System.StringSplitOptions.RemoveEmptyEntries)
locale = Convert_locale(locale2(0))
If locale = "en-US" Then
Url_locale = ""
Else
Url_locale = locale2(0)
End If
ElseIf CBool(InStr(Url, "/watch")) Then
Dim locale1() As String = Url.Split(New String() {"crunchyroll.com/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim locale2() As String = locale1(1).Split(New String() {"/watch"}, System.StringSplitOptions.RemoveEmptyEntries)
'MsgBox(locale2(0))
locale = Convert_locale(locale2(0))
'End If
If locale = "en-US" Then
Url_locale = ""
Else
Url_locale = locale2(0)
End If
End If
Dim Loc_CR_Cookies = " -H " + Chr(34) + CR_Cookies + Chr(34)
#End Region
Dim Auth As String = " -H " + Chr(34) + "Authorization: " + CrBetaBasic + Chr(34)
Dim Post As String = " -d " + Chr(34) + "grant_type=etp_rt_cookie" + Chr(34) + " -X POST"
Dim CRBetaBearer As String = "Bearer "
Dim v1Token As String = CurlPost("https://www.crunchyroll.com/auth/v1/token", Loc_CR_Cookies, Auth, Post)
If CBool(InStr(v1Token, "curl:")) = True And CBool(InStr(v1Token, "400")) = True Then
v1Token = CurlPost("https://www.crunchyroll.com/auth/v1/token", Loc_CR_Cookies, Auth, Post.Replace("etp_rt_cookie", "client_id"))
End If
'MsgBox(v1Token)
If CBool(InStr(v1Token, "curl:")) = True And CBool(InStr(v1Token, "400")) = True Then
SetStatusLabel("Status: Failed - bad request, check CR login")
Me.Text = "Status: Failed - bad request, check CR login"
Debug.WriteLine("Status: Failed - bad request, check CR login")
b = True
Exit Sub
ElseIf CBool(InStr(v1Token, "curl:")) = True Then
v1Token = CurlPost("https://www.crunchyroll.com/auth/v1/token", Loc_CR_Cookies, Auth, Post)
End If
'MsgBox(v1Token)
If CBool(InStr(v1Token, "curl:")) = True Then
Browser.WebView2.CoreWebView2.Navigate(Url)
SetStatusLabel("Status: loading in browser...")
Exit Sub
End If
'
Dim Token() As String = v1Token.Split(New String() {Chr(34) + "access_token" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim Token2() As String = Token(1).Split(New String() {Chr(34) + "," + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
CRBetaBearer = CRBetaBearer + Token2(0)
Dim ObjectsUrl As String = Nothing
Dim Auth2 As String = " -H " + Chr(34) + "Authorization: " + CRBetaBearer + Chr(34)
If CBool(InStr(Url, "crunchyroll.com")) = True And CBool(InStr(Url, "series/")) = True Then
Dim v2Content As String = CurlAuth("https://www.crunchyroll.com/index/v2", CR_Cookies, Auth2)
If CBool(InStr(v2Content, "curl:")) = True Then
v2Content = CurlAuth("https://www.crunchyroll.com/index/v2", CR_Cookies, Auth2)
End If
If CBool(InStr(v2Content, "curl:")) = True Then
Browser.WebView2.CoreWebView2.Navigate(Url)
SetStatusLabel("Status: loading in browser...")
Exit Sub
End If
Dim v2ContentBeta() As String = v2Content.Split(New String() {Chr(34) + "cms_web" + Chr(34) + ":"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim bucket() As String = v2ContentBeta(1).Split(New String() {Chr(34) + "bucket" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim bucket2() As String = bucket(1).Split(New String() {Chr(34) + "," + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim policy() As String = v2ContentBeta(1).Split(New String() {Chr(34) + "policy" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim policy2() As String = policy(1).Split(New String() {Chr(34) + "," + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim signature() As String = v2ContentBeta(1).Split(New String() {Chr(34) + "signature" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim signature2() As String = signature(1).Split(New String() {Chr(34) + "," + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim key_pair_id() As String = v2ContentBeta(1).Split(New String() {Chr(34) + "key_pair_id" + Chr(34) + ":" + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim key_pair_id2() As String = key_pair_id(1).Split(New String() {Chr(34) + "," + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
Dim Series_idUrlBuilder() As String = Url.Split(New String() {"series/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim Series_idUrlBuilder2() As String = Series_idUrlBuilder(1).Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim SeriesUrl As String = "https://www.crunchyroll.com/cms/v2" + bucket2(0) + "/seasons?series_id=" + Series_idUrlBuilder2(0) + "&locale=" + locale + "&Signature=" + signature2(0) + "&Policy=" + policy2(0) + "&Key-Pair-Id=" + key_pair_id2(0)
'MsgBox(SeriesUrl)
GetBetaSeasons(SeriesUrl)
ElseIf CBool(InStr(Url, "crunchyroll.com")) = True And CBool(InStr(Url, "watch/")) = True And CBool(CrBetaBasic = Nothing) = False Then
'MsgBox(Url)
Dim ObjectsURLBuilder3() As String = Url.Split(New String() {"watch/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim ObjectsURLBuilder4() As String = ObjectsURLBuilder3(1).Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
ObjectsUrl = "https://www.crunchyroll.com/content/v2/cms/objects/" + ObjectsURLBuilder4(0) + "?locale=" + locale '+ "&Signature=" + signature2(0) + "&Policy=" + policy2(0) + "&Key-Pair-Id=" + key_pair_id2(0)
'End Using
'MsgBox(ObjectsUrl)
Debug.WriteLine("ObjectsUrl: " + ObjectsUrl)
Dim StreamsUrl As String = Nothing
Dim ObjectJson As String
Try
ObjectJson = CurlAuth(ObjectsUrl, Loc_CR_Cookies, Auth2)
'"curl:" 'Main.Curl(ObjectsUrl)
'MsgBox(ObjectJson)
'If CBool(InStr(ObjectJson, "curl:")) = True Then
' ObjectJson = Main.Curl(ObjectsUrl)
'End If
If CBool(InStr(ObjectJson, "curl:")) = True Then
Browser.WebView2.CoreWebView2.Navigate(ObjectsUrl)
LoadingUrl = ObjectsUrl
Exit Sub
ElseIf CBool(InStr(ObjectJson, "videos/")) = False Then
SetStatusLabel("Status: Failed - no video, check CR login")
Me.Text = "Status: Failed - no video, check CR login"
Debug.WriteLine("Status: Failed - no video, check CR login")
Exit Sub
End If
Catch ex As Exception
Browser.WebView2.CoreWebView2.Navigate(Url)
Exit Sub
End Try
Try
Dim StreamsUrlBuilder() As String = ObjectJson.Split(New String() {"videos/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim StreamsUrlBuilder2() As String = StreamsUrlBuilder(1).Split(New String() {"/streams"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim StreamsUrlBuilder3() As String = ObjectsUrl.Split(New String() {"objects/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim StreamsUrlBuilder4() As String = StreamsUrlBuilder3(1).Split(New String() {"?"}, System.StringSplitOptions.RemoveEmptyEntries)
StreamsUrl = StreamsUrlBuilder3(0) + "videos/" + StreamsUrlBuilder2(0) + "/streams?" + StreamsUrlBuilder4(1)
' Debug.WriteLine(StreamsUrl)
Catch ex As Exception
Browser.WebView2.CoreWebView2.Navigate(Url)
Exit Sub
End Try
GetBetaVideoProxy(StreamsUrl, Auth2, Url)
Else
Browser.WebView2.CoreWebView2.Navigate(Url)
End If
Else
'to do
End If
End Sub
Public Function GetCookiesFromFile(ByVal Host As String) As String
Dim Cookies As String = "Cookie: "
Dim Cookie_txt As String = My.Computer.FileSystem.ReadAllText("cookies.txt")
Dim LineChar As String = vbCrLf
If CBool(InStr(Cookie_txt, vbCr)) Then
LineChar = vbCr
'Debug.WriteLine("vbCr")
ElseIf CBool(InStr(Cookie_txt, vbLf)) Then
LineChar = vbLf
'Debug.WriteLine("vbLf")
End If
Dim Cookie_txt1() As String = Cookie_txt.Split(New String() {LineChar}, System.StringSplitOptions.RemoveEmptyEntries)
Debug.WriteLine("got txt")
For i As Integer = 0 To Cookie_txt1.Count - 1
Dim Cookie_txt2() As String = Cookie_txt1(i).Split(New String() {Chr(9)}, System.StringSplitOptions.RemoveEmptyEntries)
If CBool(InStr(Cookie_txt2(0), Host)) = True Then
If CBool(InStr(Cookie_txt2(5), "_evidon_suppress")) = True Then
Continue For
End If
Cookies = Cookies + Cookie_txt2(5) + "=" + Cookie_txt2(6) + ";"
End If
Next
'Debug.WriteLine(Cookies)
Return Cookies
End Function
Sub SetStatusLabel(ByVal txt As String)
If Application.OpenForms().OfType(Of Anime_Add).Any = True Then
Anime_Add.StatusLabel.Text = txt
End If
End Sub
#End Region
End Class

View File

@ -887,6 +887,36 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
'''</summary>
Friend ReadOnly Property main_queue() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("main_queue", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
'''</summary>
Friend ReadOnly Property main_queue_invert() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("main_queue_invert", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
'''</summary>
Friend ReadOnly Property main_queue_invert_dark() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("main_queue_invert_dark", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
'''</summary>

View File

@ -565,4 +565,13 @@ title=Ending</value>
<data name="htmlReplace" xml:space="preserve">
<value>&lt;html&gt;&lt;head&gt;&lt;meta name="color-scheme" content="light dark"&gt;&lt;/head&gt;&lt;pre style="word-wrap: break-word; white-space: pre-wrap;"&gt;</value>
</data>
<data name="main_queue" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\main-queue.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="main_queue_invert" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\main-queue_invert.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="main_queue_invert_dark" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\main-queue_invert_dark.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -115,13 +115,13 @@ Partial Class Einstellungen
Me.CB_SoftSubSettings = New MetroFramework.Controls.MetroComboBox()
Me.GB_Filename_Pre = New System.Windows.Forms.GroupBox()
Me.CB_Ignore = New MetroFramework.Controls.MetroComboBox()
Me.KodiSupport = New MetroFramework.Controls.MetroToggle()
Me.MetroLink1 = New MetroFramework.Controls.MetroLink()
Me.GroupBox12 = New System.Windows.Forms.GroupBox()
Me.DD_Episode_Prefix = New MetroFramework.Controls.MetroTextBox()
Me.DD_Season_Prefix = New MetroFramework.Controls.MetroTextBox()
Me.CB_EpisodeName = New MetroFramework.Controls.MetroCheckBox()
Me.CB_AnimeDub = New MetroFramework.Controls.MetroCheckBox()
Me.CB_EpisodeNR = New MetroFramework.Controls.MetroCheckBox()
Me.CB_AnimeSub = New MetroFramework.Controls.MetroCheckBox()
Me.CB_Kodi = New MetroFramework.Controls.MetroCheckBox()
Me.CB_Season = New MetroFramework.Controls.MetroCheckBox()
Me.CB_Anime = New MetroFramework.Controls.MetroCheckBox()
Me.TB_NameString = New MetroFramework.Controls.MetroTextBox()
@ -159,8 +159,6 @@ Partial Class Einstellungen
Me.Label5 = New MetroFramework.Controls.MetroLabel()
Me.BackgroundWorker1 = New System.ComponentModel.BackgroundWorker()
Me.Btn_Save = New System.Windows.Forms.Button()
Me.DD_Season_Prefix = New MetroFramework.Controls.MetroTextBox()
Me.DD_Episode_Prefix = New MetroFramework.Controls.MetroTextBox()
CType(Me.pictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.GroupBox14.SuspendLayout()
Me.SoftSubs.SuspendLayout()
@ -413,10 +411,10 @@ Partial Class Einstellungen
Me.TabPage2.HorizontalScrollbarBarColor = True
Me.TabPage2.HorizontalScrollbarHighlightOnWheel = False
Me.TabPage2.HorizontalScrollbarSize = 10
Me.TabPage2.Location = New System.Drawing.Point(4, 44)
Me.TabPage2.Location = New System.Drawing.Point(4, 35)
Me.TabPage2.Name = "TabPage2"
Me.TabPage2.Padding = New System.Windows.Forms.Padding(3)
Me.TabPage2.Size = New System.Drawing.Size(501, 519)
Me.TabPage2.Size = New System.Drawing.Size(501, 528)
Me.TabPage2.TabIndex = 1
Me.TabPage2.Text = "Output"
Me.TabPage2.VerticalScrollbarBarColor = True
@ -1206,14 +1204,14 @@ Partial Class Einstellungen
'GB_Filename_Pre
'
Me.GB_Filename_Pre.BackColor = System.Drawing.Color.Transparent
Me.GB_Filename_Pre.Controls.Add(Me.DD_Season_Prefix)
Me.GB_Filename_Pre.Controls.Add(Me.DD_Episode_Prefix)
Me.GB_Filename_Pre.Controls.Add(Me.CB_Ignore)
Me.GB_Filename_Pre.Controls.Add(Me.KodiSupport)
Me.GB_Filename_Pre.Controls.Add(Me.MetroLink1)
Me.GB_Filename_Pre.Font = New System.Drawing.Font("Arial", 9.75!)
Me.GB_Filename_Pre.ForeColor = System.Drawing.Color.Black
Me.GB_Filename_Pre.Location = New System.Drawing.Point(5, 230)
Me.GB_Filename_Pre.Location = New System.Drawing.Point(5, 172)
Me.GB_Filename_Pre.Name = "GB_Filename_Pre"
Me.GB_Filename_Pre.Size = New System.Drawing.Size(490, 65)
Me.GB_Filename_Pre.Size = New System.Drawing.Size(490, 123)
Me.GB_Filename_Pre.TabIndex = 22
Me.GB_Filename_Pre.TabStop = False
Me.GB_Filename_Pre.Text = "Filename Extras"
@ -1226,44 +1224,19 @@ Partial Class Einstellungen
Me.CB_Ignore.IntegralHeight = False
Me.CB_Ignore.ItemHeight = 23
Me.CB_Ignore.Items.AddRange(New Object() {"[Default] use season numbers", "ignore Season 1", "ignore all season numbers"})
Me.CB_Ignore.Location = New System.Drawing.Point(248, 21)
Me.CB_Ignore.Location = New System.Drawing.Point(123, 21)
Me.CB_Ignore.Name = "CB_Ignore"
Me.CB_Ignore.Size = New System.Drawing.Size(225, 29)
Me.CB_Ignore.TabIndex = 40
Me.CB_Ignore.UseSelectable = True
'
'KodiSupport
'
Me.KodiSupport.AutoSize = True
Me.KodiSupport.Location = New System.Drawing.Point(125, 27)
Me.KodiSupport.Name = "KodiSupport"
Me.KodiSupport.Size = New System.Drawing.Size(80, 20)
Me.KodiSupport.TabIndex = 11
Me.KodiSupport.Text = "Aus"
Me.KodiSupport.UseSelectable = True
'
'MetroLink1
'
Me.MetroLink1.FontSize = MetroFramework.MetroLinkSize.Medium
Me.MetroLink1.ForeColor = System.Drawing.Color.SteelBlue
Me.MetroLink1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.MetroLink1.Location = New System.Drawing.Point(17, 21)
Me.MetroLink1.Name = "MetroLink1"
Me.MetroLink1.Size = New System.Drawing.Size(102, 32)
Me.MetroLink1.TabIndex = 39
Me.MetroLink1.Text = "Kodi naming"
Me.MetroLink1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.MetroLink1.UseSelectable = True
'
'GroupBox12
'
Me.GroupBox12.BackColor = System.Drawing.Color.Transparent
Me.GroupBox12.Controls.Add(Me.DD_Episode_Prefix)
Me.GroupBox12.Controls.Add(Me.DD_Season_Prefix)
Me.GroupBox12.Controls.Add(Me.CB_EpisodeName)
Me.GroupBox12.Controls.Add(Me.CB_AnimeDub)
Me.GroupBox12.Controls.Add(Me.CB_EpisodeNR)
Me.GroupBox12.Controls.Add(Me.CB_AnimeSub)
Me.GroupBox12.Controls.Add(Me.CB_Kodi)
Me.GroupBox12.Controls.Add(Me.CB_Season)
Me.GroupBox12.Controls.Add(Me.CB_Anime)
Me.GroupBox12.Controls.Add(Me.TB_NameString)
@ -1271,11 +1244,75 @@ Partial Class Einstellungen
Me.GroupBox12.ForeColor = System.Drawing.Color.Black
Me.GroupBox12.Location = New System.Drawing.Point(5, 11)
Me.GroupBox12.Name = "GroupBox12"
Me.GroupBox12.Size = New System.Drawing.Size(490, 215)
Me.GroupBox12.Size = New System.Drawing.Size(490, 155)
Me.GroupBox12.TabIndex = 21
Me.GroupBox12.TabStop = False
Me.GroupBox12.Text = "Filename"
'
'DD_Episode_Prefix
'
'
'
'
Me.DD_Episode_Prefix.CustomButton.Image = Nothing
Me.DD_Episode_Prefix.CustomButton.Location = New System.Drawing.Point(197, 1)
Me.DD_Episode_Prefix.CustomButton.Name = ""
Me.DD_Episode_Prefix.CustomButton.Size = New System.Drawing.Size(27, 27)
Me.DD_Episode_Prefix.CustomButton.Style = MetroFramework.MetroColorStyle.Blue
Me.DD_Episode_Prefix.CustomButton.TabIndex = 1
Me.DD_Episode_Prefix.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light
Me.DD_Episode_Prefix.CustomButton.UseSelectable = True
Me.DD_Episode_Prefix.CustomButton.Visible = False
Me.DD_Episode_Prefix.FontSize = MetroFramework.MetroTextBoxSize.Medium
Me.DD_Episode_Prefix.Lines = New String(-1) {}
Me.DD_Episode_Prefix.Location = New System.Drawing.Point(248, 69)
Me.DD_Episode_Prefix.MaxLength = 32767
Me.DD_Episode_Prefix.Name = "DD_Episode_Prefix"
Me.DD_Episode_Prefix.PasswordChar = Global.Microsoft.VisualBasic.ChrW(0)
Me.DD_Episode_Prefix.ScrollBars = System.Windows.Forms.ScrollBars.None
Me.DD_Episode_Prefix.SelectedText = ""
Me.DD_Episode_Prefix.SelectionLength = 0
Me.DD_Episode_Prefix.SelectionStart = 0
Me.DD_Episode_Prefix.ShortcutsEnabled = True
Me.DD_Episode_Prefix.Size = New System.Drawing.Size(225, 29)
Me.DD_Episode_Prefix.TabIndex = 34
Me.DD_Episode_Prefix.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
Me.DD_Episode_Prefix.UseSelectable = True
Me.DD_Episode_Prefix.WaterMarkColor = System.Drawing.Color.FromArgb(CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer))
Me.DD_Episode_Prefix.WaterMarkFont = New System.Drawing.Font("Segoe UI", 12.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel)
'
'DD_Season_Prefix
'
'
'
'
Me.DD_Season_Prefix.CustomButton.Image = Nothing
Me.DD_Season_Prefix.CustomButton.Location = New System.Drawing.Point(197, 1)
Me.DD_Season_Prefix.CustomButton.Name = ""
Me.DD_Season_Prefix.CustomButton.Size = New System.Drawing.Size(27, 27)
Me.DD_Season_Prefix.CustomButton.Style = MetroFramework.MetroColorStyle.Blue
Me.DD_Season_Prefix.CustomButton.TabIndex = 1
Me.DD_Season_Prefix.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light
Me.DD_Season_Prefix.CustomButton.UseSelectable = True
Me.DD_Season_Prefix.CustomButton.Visible = False
Me.DD_Season_Prefix.FontSize = MetroFramework.MetroTextBoxSize.Medium
Me.DD_Season_Prefix.Lines = New String(-1) {}
Me.DD_Season_Prefix.Location = New System.Drawing.Point(6, 69)
Me.DD_Season_Prefix.MaxLength = 32767
Me.DD_Season_Prefix.Name = "DD_Season_Prefix"
Me.DD_Season_Prefix.PasswordChar = Global.Microsoft.VisualBasic.ChrW(0)
Me.DD_Season_Prefix.ScrollBars = System.Windows.Forms.ScrollBars.None
Me.DD_Season_Prefix.SelectedText = ""
Me.DD_Season_Prefix.SelectionLength = 0
Me.DD_Season_Prefix.SelectionStart = 0
Me.DD_Season_Prefix.ShortcutsEnabled = True
Me.DD_Season_Prefix.Size = New System.Drawing.Size(225, 29)
Me.DD_Season_Prefix.TabIndex = 33
Me.DD_Season_Prefix.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
Me.DD_Season_Prefix.UseSelectable = True
Me.DD_Season_Prefix.WaterMarkColor = System.Drawing.Color.FromArgb(CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer))
Me.DD_Season_Prefix.WaterMarkFont = New System.Drawing.Font("Segoe UI", 12.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel)
'
'CB_EpisodeName
'
Me.CB_EpisodeName.AutoSize = True
@ -1312,18 +1349,17 @@ Partial Class Einstellungen
Me.CB_EpisodeNR.Text = "Episode Number"
Me.CB_EpisodeNR.UseSelectable = True
'
'CB_AnimeSub
'CB_Kodi
'
Me.CB_AnimeSub.AutoSize = True
Me.CB_AnimeSub.Enabled = False
Me.CB_AnimeSub.FontSize = MetroFramework.MetroCheckBoxSize.Medium
Me.CB_AnimeSub.ForeColor = System.Drawing.Color.Black
Me.CB_AnimeSub.Location = New System.Drawing.Point(320, 124)
Me.CB_AnimeSub.Name = "CB_AnimeSub"
Me.CB_AnimeSub.Size = New System.Drawing.Size(135, 19)
Me.CB_AnimeSub.TabIndex = 32
Me.CB_AnimeSub.Text = "Subtitle Language"
Me.CB_AnimeSub.UseSelectable = True
Me.CB_Kodi.AutoSize = True
Me.CB_Kodi.FontSize = MetroFramework.MetroCheckBoxSize.Medium
Me.CB_Kodi.ForeColor = System.Drawing.Color.Black
Me.CB_Kodi.Location = New System.Drawing.Point(320, 124)
Me.CB_Kodi.Name = "CB_Kodi"
Me.CB_Kodi.Size = New System.Drawing.Size(102, 19)
Me.CB_Kodi.TabIndex = 32
Me.CB_Kodi.Text = "Kodi naming"
Me.CB_Kodi.UseSelectable = True
'
'CB_Season
'
@ -1830,70 +1866,6 @@ Partial Class Einstellungen
Me.Btn_Save.TabIndex = 9
Me.Btn_Save.UseVisualStyleBackColor = False
'
'DD_Season_Prefix
'
'
'
'
Me.DD_Season_Prefix.CustomButton.Image = Nothing
Me.DD_Season_Prefix.CustomButton.Location = New System.Drawing.Point(197, 1)
Me.DD_Season_Prefix.CustomButton.Name = ""
Me.DD_Season_Prefix.CustomButton.Size = New System.Drawing.Size(27, 27)
Me.DD_Season_Prefix.CustomButton.Style = MetroFramework.MetroColorStyle.Blue
Me.DD_Season_Prefix.CustomButton.TabIndex = 1
Me.DD_Season_Prefix.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light
Me.DD_Season_Prefix.CustomButton.UseSelectable = True
Me.DD_Season_Prefix.CustomButton.Visible = False
Me.DD_Season_Prefix.FontSize = MetroFramework.MetroTextBoxSize.Medium
Me.DD_Season_Prefix.Lines = New String(-1) {}
Me.DD_Season_Prefix.Location = New System.Drawing.Point(6, 165)
Me.DD_Season_Prefix.MaxLength = 32767
Me.DD_Season_Prefix.Name = "DD_Season_Prefix"
Me.DD_Season_Prefix.PasswordChar = Global.Microsoft.VisualBasic.ChrW(0)
Me.DD_Season_Prefix.ScrollBars = System.Windows.Forms.ScrollBars.None
Me.DD_Season_Prefix.SelectedText = ""
Me.DD_Season_Prefix.SelectionLength = 0
Me.DD_Season_Prefix.SelectionStart = 0
Me.DD_Season_Prefix.ShortcutsEnabled = True
Me.DD_Season_Prefix.Size = New System.Drawing.Size(225, 29)
Me.DD_Season_Prefix.TabIndex = 33
Me.DD_Season_Prefix.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
Me.DD_Season_Prefix.UseSelectable = True
Me.DD_Season_Prefix.WaterMarkColor = System.Drawing.Color.FromArgb(CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer))
Me.DD_Season_Prefix.WaterMarkFont = New System.Drawing.Font("Segoe UI", 12.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel)
'
'DD_Episode_Prefix
'
'
'
'
Me.DD_Episode_Prefix.CustomButton.Image = Nothing
Me.DD_Episode_Prefix.CustomButton.Location = New System.Drawing.Point(197, 1)
Me.DD_Episode_Prefix.CustomButton.Name = ""
Me.DD_Episode_Prefix.CustomButton.Size = New System.Drawing.Size(27, 27)
Me.DD_Episode_Prefix.CustomButton.Style = MetroFramework.MetroColorStyle.Blue
Me.DD_Episode_Prefix.CustomButton.TabIndex = 1
Me.DD_Episode_Prefix.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light
Me.DD_Episode_Prefix.CustomButton.UseSelectable = True
Me.DD_Episode_Prefix.CustomButton.Visible = False
Me.DD_Episode_Prefix.FontSize = MetroFramework.MetroTextBoxSize.Medium
Me.DD_Episode_Prefix.Lines = New String(-1) {}
Me.DD_Episode_Prefix.Location = New System.Drawing.Point(248, 165)
Me.DD_Episode_Prefix.MaxLength = 32767
Me.DD_Episode_Prefix.Name = "DD_Episode_Prefix"
Me.DD_Episode_Prefix.PasswordChar = Global.Microsoft.VisualBasic.ChrW(0)
Me.DD_Episode_Prefix.ScrollBars = System.Windows.Forms.ScrollBars.None
Me.DD_Episode_Prefix.SelectedText = ""
Me.DD_Episode_Prefix.SelectionLength = 0
Me.DD_Episode_Prefix.SelectionStart = 0
Me.DD_Episode_Prefix.ShortcutsEnabled = True
Me.DD_Episode_Prefix.Size = New System.Drawing.Size(225, 29)
Me.DD_Episode_Prefix.TabIndex = 34
Me.DD_Episode_Prefix.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
Me.DD_Episode_Prefix.UseSelectable = True
Me.DD_Episode_Prefix.WaterMarkColor = System.Drawing.Color.FromArgb(CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer), CType(CType(109, Byte), Integer))
Me.DD_Episode_Prefix.WaterMarkFont = New System.Drawing.Font("Segoe UI", 12.0!, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel)
'
'Einstellungen
'
Me.ApplyImageInvert = True
@ -1943,7 +1915,6 @@ Partial Class Einstellungen
Me.GroupBox17.ResumeLayout(False)
Me.GroupBox3.ResumeLayout(False)
Me.GB_Filename_Pre.ResumeLayout(False)
Me.GB_Filename_Pre.PerformLayout()
Me.GroupBox12.ResumeLayout(False)
Me.GroupBox12.PerformLayout()
Me.MetroTabPage1.ResumeLayout(False)
@ -2073,8 +2044,6 @@ Partial Class Einstellungen
Friend WithEvents DD_DLMode As MetroFramework.Controls.MetroComboBox
Friend WithEvents MetroTabPage2 As MetroFramework.Controls.MetroTabPage
Friend WithEvents GB_Filename_Pre As GroupBox
Friend WithEvents KodiSupport As MetroFramework.Controls.MetroToggle
Friend WithEvents MetroLink1 As MetroFramework.Controls.MetroLink
Friend WithEvents GroupBox12 As GroupBox
Friend WithEvents LeadingZeroDD As MetroFramework.Controls.MetroComboBox
Friend WithEvents GroupBox17 As GroupBox
@ -2100,7 +2069,7 @@ Partial Class Einstellungen
Public WithEvents CB_EpisodeName As MetroFramework.Controls.MetroCheckBox
Public WithEvents CB_AnimeDub As MetroFramework.Controls.MetroCheckBox
Public WithEvents CB_EpisodeNR As MetroFramework.Controls.MetroCheckBox
Public WithEvents CB_AnimeSub As MetroFramework.Controls.MetroCheckBox
Public WithEvents CB_Kodi As MetroFramework.Controls.MetroCheckBox
Public WithEvents CB_Season As MetroFramework.Controls.MetroCheckBox
Public WithEvents CB_Anime As MetroFramework.Controls.MetroCheckBox
Friend WithEvents TB_NameString As MetroFramework.Controls.MetroTextBox

View File

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

View File

@ -53,7 +53,7 @@ Public Class Einstellungen
End If
If Main.KodiNaming = True Then
KodiSupport.Checked = True
CB_Kodi.Checked = True
End If
If Main.DubMode = True Then
@ -326,13 +326,11 @@ Public Class Einstellungen
CB_EpisodeName.Checked = True
ElseIf NameParts(i) = "AnimeDub" Then
CB_AnimeDub.Checked = True
ElseIf NameParts(i) = "AnimeSub" Then
CB_AnimeSub.Checked = True
End If
Next
CB_AnimeSub.Checked = False ' to be continued
@ -404,7 +402,7 @@ Public Class Einstellungen
My.Settings.Curl_insecure = False
End If
If KodiSupport.Checked = True Then
If CB_Kodi.Checked = True Then
Main.KodiNaming = True
My.Settings.KodiSupport = True
Else
@ -1234,7 +1232,7 @@ Public Class Einstellungen
End Sub
#Region "Build Name String"
Private Sub CB_Anime_CheckedChanged(sender As Object, e As EventArgs) Handles CB_Anime.CheckedChanged, CB_Season.CheckedChanged, CB_EpisodeNR.CheckedChanged, CB_EpisodeName.CheckedChanged, CB_AnimeDub.CheckedChanged, CB_AnimeSub.CheckedChanged
Private Sub CB_Anime_CheckedChanged(sender As Object, e As EventArgs) Handles CB_Anime.CheckedChanged, CB_Season.CheckedChanged, CB_EpisodeNR.CheckedChanged, CB_EpisodeName.CheckedChanged, CB_AnimeDub.CheckedChanged, CB_Kodi.CheckedChanged
If CB_Anime.Checked = True And CBool(InStr(TB_NameString.Text, "AnimeTitle;")) = False Then
TB_NameString.AppendText("AnimeTitle;")
ElseIf CB_Anime.Checked = False Then
@ -1265,11 +1263,7 @@ Public Class Einstellungen
TB_NameString.Text = TB_NameString.Text.Replace("AnimeDub;", "")
End If
If CB_AnimeSub.Checked = True And CBool(InStr(TB_NameString.Text, "AnimeSub;")) = False Then
TB_NameString.AppendText("AnimeSub;")
ElseIf CB_AnimeSub.Checked = False Then
TB_NameString.Text = TB_NameString.Text.Replace("AnimeSub;", "")
End If
End Sub

View File

@ -22,9 +22,32 @@ Partial Class Queue
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.ListBox1 = New System.Windows.Forms.ListBox()
Me.UpdateListTimer = New System.Windows.Forms.Timer(Me.components)
Me.Btn_Close = New System.Windows.Forms.Button()
Me.Btn_min = New System.Windows.Forms.Button()
Me.RunQueue = New MetroFramework.Controls.MetroToggle()
Me.Label1 = New MetroFramework.Controls.MetroLabel()
Me.RunQueueTimer = New System.Windows.Forms.Timer(Me.components)
Me.SuspendLayout()
'
'ListBox1
'
Me.ListBox1.BackColor = System.Drawing.Color.FromArgb(CType(CType(243, Byte), Integer), CType(CType(243, Byte), Integer), CType(CType(243, Byte), Integer))
Me.ListBox1.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.ListBox1.FormattingEnabled = True
Me.ListBox1.ItemHeight = 20
Me.ListBox1.Location = New System.Drawing.Point(25, 65)
Me.ListBox1.Name = "ListBox1"
Me.ListBox1.Size = New System.Drawing.Size(700, 304)
Me.ListBox1.TabIndex = 0
'
'UpdateListTimer
'
Me.UpdateListTimer.Enabled = True
Me.UpdateListTimer.Interval = 1000
'
'Btn_Close
'
Me.Btn_Close.BackColor = System.Drawing.Color.Transparent
@ -36,22 +59,76 @@ Partial Class Queue
Me.Btn_Close.ForeColor = System.Drawing.Color.Transparent
Me.Btn_Close.Image = Global.Crunchyroll_Downloader.My.Resources.Resources.main_close
Me.Btn_Close.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.Btn_Close.Location = New System.Drawing.Point(282, 169)
Me.Btn_Close.Location = New System.Drawing.Point(695, 4)
Me.Btn_Close.Name = "Btn_Close"
Me.Btn_Close.Size = New System.Drawing.Size(40, 40)
Me.Btn_Close.TabIndex = 37
Me.Btn_Close.Size = New System.Drawing.Size(35, 35)
Me.Btn_Close.TabIndex = 49
Me.Btn_Close.UseVisualStyleBackColor = False
'
'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.FlatAppearance.BorderSize = 0
Me.Btn_min.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent
Me.Btn_min.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Btn_min.ForeColor = System.Drawing.Color.Transparent
Me.Btn_min.Image = Global.Crunchyroll_Downloader.My.Resources.Resources.main_mini
Me.Btn_min.ImeMode = System.Windows.Forms.ImeMode.NoControl
Me.Btn_min.Location = New System.Drawing.Point(652, 4)
Me.Btn_min.Name = "Btn_min"
Me.Btn_min.Size = New System.Drawing.Size(30, 30)
Me.Btn_min.TabIndex = 48
Me.Btn_min.UseVisualStyleBackColor = False
'
'RunQueue
'
Me.RunQueue.Location = New System.Drawing.Point(325, 415)
Me.RunQueue.Name = "RunQueue"
Me.RunQueue.Size = New System.Drawing.Size(96, 20)
Me.RunQueue.TabIndex = 50
Me.RunQueue.Text = "Aus"
Me.RunQueue.UseSelectable = True
'
'Label1
'
Me.Label1.FontWeight = MetroFramework.MetroLabelWeight.Regular
Me.Label1.Location = New System.Drawing.Point(25, 385)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(700, 22)
Me.Label1.TabIndex = 51
Me.Label1.Text = "Process Queue"
Me.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'RunQueueTimer
'
Me.RunQueueTimer.Interval = 2500
'
'Queue
'
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None
Me.ClientSize = New System.Drawing.Size(604, 378)
Me.BorderStyle = MetroFramework.Forms.MetroFormBorderStyle.FixedSingle
Me.ClientSize = New System.Drawing.Size(750, 450)
Me.ControlBox = False
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.RunQueue)
Me.Controls.Add(Me.ListBox1)
Me.Controls.Add(Me.Btn_Close)
Me.Controls.Add(Me.Btn_min)
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "Queue"
Me.Text = "Queue"
Me.TextAlign = MetroFramework.Forms.MetroFormTextAlign.Center
Me.ResumeLayout(False)
End Sub
Public WithEvents ListBox1 As ListBox
Friend WithEvents UpdateListTimer As Timer
Friend WithEvents Btn_Close As Button
Friend WithEvents Btn_min As Button
Friend WithEvents RunQueue As MetroFramework.Controls.MetroToggle
Friend WithEvents Label1 As MetroFramework.Controls.MetroLabel
Friend WithEvents RunQueueTimer As Timer
End Class

View File

@ -117,4 +117,10 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="UpdateListTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="RunQueueTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>142, 17</value>
</metadata>
</root>

View File

@ -1,26 +1,30 @@
Option Strict On
Imports System.ComponentModel
Imports System.Net
Imports System.Windows.Forms.VisualStyles.VisualStyleElement
Imports System.Windows.Forms.VisualStyles.VisualStyleElement.Button
Imports MetroFramework
Imports MetroFramework.Components
Public Class Queue
Dim Manager As MetroStyleManager = Main.Manager
Dim bs As BindingSource = New BindingSource
Private Sub Reso_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Manager.Owner = Me
Me.StyleManager = Manager
ListBox1.BackColor = Main.BackColorValue
ListBox1.ForeColor = Main.ForeColorValue
bs.DataSource = Main.ListBoxList
ListBox1.DataSource = bs
Btn_min.Image = Main.MinImg
Btn_Close.Image = Main.CloseImg
End Sub
Private Sub Btn_Close_Click(sender As Object, e As EventArgs) Handles Btn_Close.Click
Me.Close()
End Sub
@ -38,7 +42,104 @@ Public Class Queue
Btn_Close.Image = Main.CloseImg
End Sub
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles UpdateListTimer.Tick
If Main.ListBoxList.Count <> ListBox1.Items.Count Then
bs.ResetBindings(False)
End If
End Sub
Private Sub Queue_Resize(sender As Object, e As EventArgs) Handles Me.Resize
Btn_Close.Location = New Point(Me.Width - 36, 1)
Btn_min.Location = New Point(Me.Width - 67, 1)
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 RunQueue_CheckedChanged(sender As Object, e As EventArgs) Handles RunQueue.CheckedChanged
RunQueueTimer.Enabled = RunQueue.Checked
End Sub
Private Sub RunQueueTimer_Tick(sender As Object, e As EventArgs) Handles RunQueueTimer.Tick
Try
Dim ItemFinshedCount As Integer = 0
Dim Item As New List(Of CRD_List_Item)
Item.AddRange(Main.Panel1.Controls.OfType(Of CRD_List_Item))
For i As Integer = 0 To Item.Count - 1
Debug.WriteLine(Item(i).GetIsStatusFinished().ToString)
If Item(i).GetIsStatusFinished() = True Then
ItemFinshedCount = ItemFinshedCount + 1
End If
Next
Main.RunningDownloads = Item.Count - ItemFinshedCount
Catch ex As Exception
Main.RunningDownloads = Main.Panel1.Controls.Count
End Try
If Main.RunningDownloads < Main.MaxDL Then
If Main.ListBoxList.Count > 0 Then
If CBool(InStr(ListBox1.GetItemText(Main.ListBoxList(0)), "funimation.com")) Then
If Main.Funimation_Grapp_RDY = True Then
Dim UriUsed As String = ListBox1.GetItemText(Main.ListBoxList(0))
If CBool(InStr(UriUsed, "funimation.com/v/")) Then
Dim Episode0() As String = UriUsed.Split(New String() {"?"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim Episode() As String = Episode0(0).Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim v1JsonUrl As String = "https://d33et77evd9bgg.cloudfront.net/data/v1/episodes/" + Episode(Episode.Length - 1) + ".json"
Dim v1Json As String = Nothing
Try
Using client As New WebClient()
client.Encoding = System.Text.Encoding.UTF8
client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), ""))
v1Json = client.DownloadString(v1JsonUrl)
End Using
Main.Funimation_Grapp_RDY = False
Main.WebbrowserURL = UriUsed
Main.ListBoxList.Remove(UriUsed)
Main.b = False
Main.Invalidate()
Main.GetFunimationNewJS_VideoProxy(Nothing, v1Json)
Exit Sub
Catch ex As Exception
Debug.WriteLine("error- getting v1Json data for the bypasss")
Debug.WriteLine(ex.ToString)
End Try
End If
Main.Funimation_Grapp_RDY = False
Main.WebbrowserURL = UriUsed
Main.ListBoxList.Remove(UriUsed)
Main.b = False
Main.Text = "Status: loading in browser"
Main.LoadBrowser(UriUsed)
End If
Else
Dim UriUsed As String = ListBox1.GetItemText(Main.ListBoxList(0))
If Main.Grapp_RDY = True Then
Main.Grapp_RDY = False
Main.Text = "Status: loading ..."
Main.LoadBrowser(UriUsed)
Main.ListBoxList.Remove(UriUsed)
Main.b = False
End If
End If
End If
End If
End Sub
End Class