Update v3.5

-added funitmaiton and crunchyroll setting(s)
-added 'hybrid' download
This commit is contained in:
hama3254 2020-09-30 18:24:45 +02:00
parent 9a9954b52d
commit 104dd6ba9b
74 changed files with 775 additions and 88 deletions

View File

@ -305,7 +305,7 @@ Partial Class Anime_Add
Public WithEvents PictureBox1 As PictureBox Public WithEvents PictureBox1 As PictureBox
Public WithEvents groupBox1 As GroupBox Public WithEvents groupBox1 As GroupBox
Public WithEvents GroupBox3 As GroupBox Public WithEvents GroupBox3 As GroupBox
Friend WithEvents ListBox1 As ListBox
Friend WithEvents Timer1 As Timer Friend WithEvents Timer1 As Timer
Private WithEvents Timer2 As Timer Private WithEvents Timer2 As Timer
Public WithEvents ListBox1 As ListBox
End Class End Class

View File

@ -180,8 +180,8 @@ Public Class Anime_Add
End Sub End Sub
Private Sub PictureBox3_Click(sender As Object, e As EventArgs) Handles pictureBox3.Click Private Sub PictureBox3_Click(sender As Object, e As EventArgs) Handles pictureBox3.Click
Main.ListBoxList.Clear()
If ListBox1.Items.Count > 0 Then If ListBox1.Items.Count > 0 Then
Main.ListBoxList.Clear()
For i As Integer = 0 To ListBox1.Items.Count - 1 For i As Integer = 0 To ListBox1.Items.Count - 1
Main.ListBoxList.Add(ListBox1.Items.Item(i)) Main.ListBoxList.Add(ListBox1.Items.Item(i))
Next Next
@ -194,7 +194,7 @@ Public Class Anime_Add
Main.LoginOnly = "Download Mode!" Main.LoginOnly = "Download Mode!"
If groupBox1.Visible = True Then If groupBox1.Visible = True Then
Try Try
If CBool(InStr(textBox1.Text, "crunchyroll.com")) Then If CBool(InStr(textBox1.Text, "crunchyroll.com")) Or CBool(InStr(textBox1.Text, "funimation.com")) Then
If StatusLabel.Text = "Status: waiting for episode selection" Then If StatusLabel.Text = "Status: waiting for episode selection" Then
If MessageBox.Show("Are you sure you want cancel the advanced download?", "confirm?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then If MessageBox.Show("Are you sure you want cancel the advanced download?", "confirm?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = DialogResult.Yes Then
StatusLabel.Text = "Status: idle" StatusLabel.Text = "Status: idle"
@ -286,10 +286,7 @@ Public Class Anime_Add
List_DL_Cancel = False List_DL_Cancel = False
pictureBox4.Image = My.Resources.main_button_download_default pictureBox4.Image = My.Resources.main_button_download_default
End If End If
If InStr(My.Computer.Info.OSFullName, "Server") Then
MsgBox("Windows Server is not supported!", MsgBoxStyle.Critical)
Me.Close()
End If
pictureBox4.Enabled = True pictureBox4.Enabled = True
End Sub End Sub
@ -402,13 +399,25 @@ Public Class Anime_Add
If Main.RunningDownloads < Main.MaxDL Then If Main.RunningDownloads < Main.MaxDL Then
If ListBox1.Items.Count > 0 Then If ListBox1.Items.Count > 0 Then
If GroupBox3.Visible = True Then If GroupBox3.Visible = True Then
If Main.Grapp_RDY = True Then If InStr(ListBox1.GetItemText(ListBox1.Items(0)), "funimation.com") Then
GeckoFX.WebBrowser1.Navigate(ListBox1.GetItemText(ListBox1.Items(0))) If Main.Funimation_Grapp_RDY = True Then
ListBox1.Items.Remove(ListBox1.Items(0)) GeckoFX.WebBrowser1.Navigate(ListBox1.GetItemText(ListBox1.Items(0)))
Main.Grapp_RDY = False ListBox1.Items.Remove(ListBox1.Items(0))
Main.b = False Main.Funimation_Grapp_RDY = False
Main.b = False
End If
Else
If Main.Grapp_RDY = True Then
GeckoFX.WebBrowser1.Navigate(ListBox1.GetItemText(ListBox1.Items(0)))
ListBox1.Items.Remove(ListBox1.Items(0))
Main.Grapp_RDY = False
Main.b = False
End If
End If End If
End If End If
End If End If
End If End If

View File

@ -34,7 +34,7 @@ Namespace My
Try Try
Dim sUserAgent As String = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0" Dim sUserAgent As String = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/79.0"
'sUserAgent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36" 'sUserAgent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36"
'MsgBox(Xpcom.XulRunnerVersion) 'MsgBox(Xpcom.XulRunnerVersion)

View File

@ -76,10 +76,10 @@
End Sub End Sub
Private Sub Button2_Click_1(sender As Object, e As EventArgs) Handles Button2.Click Private Sub Button2_Click_1(sender As Object, e As EventArgs) Handles Button2.Click
Main.FFMPEG_Reso(RichTextBox2.Text) 'Main.FFMPEG_Reso(RichTextBox2.Text)
End Sub End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
MsgBox(Main.ResoAvalibe) 'MsgBox(Main.ResoAvalibe)
End Sub End Sub
End Class End Class

View File

@ -26,6 +26,7 @@ Partial Class GeckoFX
Me.TextBox1 = New System.Windows.Forms.TextBox() Me.TextBox1 = New System.Windows.Forms.TextBox()
Me.Button1 = New System.Windows.Forms.Button() Me.Button1 = New System.Windows.Forms.Button()
Me.Button2 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button()
Me.Button3 = New System.Windows.Forms.Button()
Me.SuspendLayout() Me.SuspendLayout()
' '
'WebBrowser1 'WebBrowser1
@ -42,14 +43,14 @@ Partial Class GeckoFX
' '
Me.TextBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle Me.TextBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.TextBox1.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.TextBox1.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.TextBox1.Location = New System.Drawing.Point(289, 1) Me.TextBox1.Location = New System.Drawing.Point(418, 1)
Me.TextBox1.Name = "TextBox1" Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(988, 26) Me.TextBox1.Size = New System.Drawing.Size(859, 26)
Me.TextBox1.TabIndex = 1 Me.TextBox1.TabIndex = 1
' '
'Button1 'Button1
' '
Me.Button1.Location = New System.Drawing.Point(187, 1) Me.Button1.Location = New System.Drawing.Point(316, 1)
Me.Button1.Name = "Button1" Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(96, 26) Me.Button1.Size = New System.Drawing.Size(96, 26)
Me.Button1.TabIndex = 2 Me.Button1.TabIndex = 2
@ -59,18 +60,28 @@ Partial Class GeckoFX
'Button2 'Button2
' '
Me.Button2.Enabled = False Me.Button2.Enabled = False
Me.Button2.Location = New System.Drawing.Point(3, 2) Me.Button2.Location = New System.Drawing.Point(132, 1)
Me.Button2.Name = "Button2" Me.Button2.Name = "Button2"
Me.Button2.Size = New System.Drawing.Size(178, 26) Me.Button2.Size = New System.Drawing.Size(178, 26)
Me.Button2.TabIndex = 3 Me.Button2.TabIndex = 3
Me.Button2.Text = "Start network scan" Me.Button2.Text = "Start network scan"
Me.Button2.UseVisualStyleBackColor = True Me.Button2.UseVisualStyleBackColor = True
' '
'Button3
'
Me.Button3.Location = New System.Drawing.Point(2, 2)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(126, 26)
Me.Button3.TabIndex = 4
Me.Button3.Text = "Funimation"
Me.Button3.UseVisualStyleBackColor = True
'
'GeckoFX 'GeckoFX
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(1279, 750) Me.ClientSize = New System.Drawing.Size(1279, 750)
Me.Controls.Add(Me.Button3)
Me.Controls.Add(Me.Button2) Me.Controls.Add(Me.Button2)
Me.Controls.Add(Me.Button1) Me.Controls.Add(Me.Button1)
Me.Controls.Add(Me.TextBox1) Me.Controls.Add(Me.TextBox1)
@ -90,4 +101,5 @@ Partial Class GeckoFX
Friend WithEvents TextBox1 As TextBox Friend WithEvents TextBox1 As TextBox
Friend WithEvents Button1 As Button Friend WithEvents Button1 As Button
Friend WithEvents Button2 As Button Friend WithEvents Button2 As Button
Friend WithEvents Button3 As Button
End Class End Class

View File

@ -15,10 +15,6 @@ Public Class GeckoFX
Dim t As Thread Dim t As Thread
Dim ScanTrue As Boolean = False Dim ScanTrue As Boolean = False
Private Sub GeckoWebBrowser1_DocumentCompleted(sender As Object, e As EventArgs) Handles WebBrowser1.DocumentCompleted Private Sub GeckoWebBrowser1_DocumentCompleted(sender As Object, e As EventArgs) Handles WebBrowser1.DocumentCompleted
If InStr(My.Computer.Info.OSFullName, "Server") Then
MsgBox("Windows Server is not supported!", MsgBoxStyle.Critical)
Me.Close()
End If
If ScanTrue = False Then If ScanTrue = False Then
Button2.Enabled = True Button2.Enabled = True
@ -43,9 +39,9 @@ Public Class GeckoFX
WebBrowser1.Navigate("https://www.crunchyroll.com/logout") WebBrowser1.Navigate("https://www.crunchyroll.com/logout")
Main.Pause(5) Main.Pause(5)
WebBrowser1.Navigate("javascript:document.cookie =" + Chr(34) + "session_id=" + keks + "; expires=Thu, 05 Jan 2021 00:00:00 UTC; path=/;" + Chr(34) + ";") WebBrowser1.Navigate("javascript:document.cookie =" + Chr(34) + "session_id=" + keks + "; expires=Thu, 04 Jan 2022 00:00:00 UTC; path=/;" + Chr(34) + ";")
Main.Pause(1) Main.Pause(1)
WebBrowser1.Navigate("javascript:document.cookie =" + Chr(34) + "sess_id=" + keks + "; expires=Thu, 05 Jan 2021 00:00:00 UTC; path=/;" + Chr(34) + ";") WebBrowser1.Navigate("javascript:document.cookie =" + Chr(34) + "sess_id=" + keks + "; expires=Thu, 04 Jan 2022 00:00:00 UTC; path=/;" + Chr(34) + ";")
Main.Pause(1) Main.Pause(1)
If Main.LoginDialog = True Then If Main.LoginDialog = True Then
'Login.ShowDialog() 'Login.ShowDialog()
@ -132,11 +128,13 @@ Public Class GeckoFX
Main.MassGrapp() Main.MassGrapp()
End If End If
Else Else
Main.b = True
MsgBox(Main.No_Stream, MsgBoxStyle.OkOnly) MsgBox(Main.No_Stream, MsgBoxStyle.OkOnly)
Anime_Add.StatusLabel.Text = "Status: idle"
End If End If
Catch ex As Exception Catch ex As Exception
MsgBox(ex.ToString) MsgBox(ex.ToString)
Main.LabelUpdate = "Status: idle" Anime_Add.StatusLabel.Text = "Status: idle"
End Try End Try
ElseIf Main.c = False Then ElseIf Main.c = False Then
If CBool(InStr(WebBrowser1.Document.Body.OuterHtml, "hardsub_lang")) Then If CBool(InStr(WebBrowser1.Document.Body.OuterHtml, "hardsub_lang")) Then
@ -158,6 +156,28 @@ Public Class GeckoFX
End If End If
'ElseIf CBool(InStr(WebBrowser1.Url.ToString, "https://www.anime-on-demand.de/anime/")) Then 'ElseIf CBool(InStr(WebBrowser1.Url.ToString, "https://www.anime-on-demand.de/anime/")) Then
'MsgBox(Main.WebbrowserSoftSubURL)
' Anime_Add.StatusLabel.Text =
ElseIf CBool(InStr(WebBrowser1.Url.ToString, "funimation.com")) Then
If Main.b = False Then
If InStr(WebBrowser1.Document.Body.OuterHtml, My.Resources.Funimation_Player_ID) Then
Main.WebbrowserURL = WebBrowser1.Url.ToString
Main.WebbrowserText = WebBrowser1.Document.Body.OuterHtml
Main.WebbrowserTitle = WebBrowser1.DocumentTitle
Main.WebbrowserHeadText = WebBrowser1.Document.Head.InnerHtml
Main.WebbrowserCookie = WebBrowser1.Document.Cookie
Main.b = True
t = New Thread(AddressOf Main.Funitmation_Grapp)
t.Priority = ThreadPriority.Normal
t.IsBackground = True
t.Start()
Else
Anime_Add.StatusLabel.Text = "fail?"
End If
End If
Else Else
If Main.b = False Then If Main.b = False Then
@ -302,6 +322,20 @@ Public Class GeckoFX
End Sub End Sub
Private Sub GeckoFX_Load(sender As Object, e As EventArgs) Handles MyBase.Load Private Sub GeckoFX_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If Me.Width > My.Computer.Screen.Bounds.Width Then
Me.Width = My.Computer.Screen.Bounds.Width
WebBrowser1.Width = Me.Size.Width - 15 ', Me.Size.Height - 69)
WebBrowser1.Location = New Point(0, 30)
TextBox1.Width = My.Computer.Screen.Bounds.Width - 435
End If
If Me.Size.Height > My.Computer.Screen.Bounds.Height Then
Me.Height = My.Computer.Screen.Bounds.Height
WebBrowser1.Height = Me.Size.Height - 69
WebBrowser1.Location = New Point(0, 30)
End If
If Main.Debug2 = True Then If Main.Debug2 = True Then
Debug_Mode.Show() Debug_Mode.Show()
Debug_Mode.Location = New Point(Me.Location.X + Me.Width - 15, Me.Location.Y) Debug_Mode.Location = New Point(Me.Location.X + Me.Width - 15, Me.Location.Y)
@ -377,6 +411,8 @@ Public Class GeckoFX
'Main.GrappURL() 'Main.GrappURL()
Try Try
My.Computer.Clipboard.SetText(WebBrowser1.Url.ToString) My.Computer.Clipboard.SetText(WebBrowser1.Url.ToString)
'My.Computer.Clipboard.SetText(WebBrowser1.Document.Cookie)
MsgBox("copied: " + Chr(34) + WebBrowser1.Url.ToString + Chr(34)) MsgBox("copied: " + Chr(34) + WebBrowser1.Url.ToString + Chr(34))
Catch ex As Exception Catch ex As Exception
End Try End Try
@ -600,34 +636,34 @@ Public Class GeckoFX
Next Next
End If End If
If Main.txtList.Count > 0 Then 'InStr(HTMLString, ".mpd?") Then 'If Main.txtList.Count > 0 Then 'InStr(HTMLString, ".mpd?") Then
HTMLString = Main.mpdList.Item(0) ' HTMLString = Main.mpdList.Item(0)
'Button2.Text = "found mpd!" ' 'Button2.Text = "found mpd!"
Main.LogBrowserData = False ' Main.LogBrowserData = False
GeckoPreferences.Default("logging.config.LOG_FILE") = "gecko-network.txt" ' GeckoPreferences.Default("logging.config.LOG_FILE") = "gecko-network.txt"
GeckoPreferences.Default("logging.nsHttp") = 0 ' GeckoPreferences.Default("logging.nsHttp") = 0
Dim URL As String = Nothing ' Dim URL As String = Nothing
Dim HTMLSplit() As String = HTMLString.Split(New String() {vbNewLine}, System.StringSplitOptions.RemoveEmptyEntries) ' Dim HTMLSplit() As String = HTMLString.Split(New String() {vbNewLine}, System.StringSplitOptions.RemoveEmptyEntries)
For i As Integer = 0 To HTMLSplit.Count - 1 ' For i As Integer = 0 To HTMLSplit.Count - 1
If InStr(HTMLSplit(i), ".mpd?") Then ' If InStr(HTMLSplit(i), ".mpd?") Then
Dim URLPart2() As String = HTMLSplit(i).Split(New String() {" GET "}, System.StringSplitOptions.RemoveEmptyEntries) ' Dim URLPart2() As String = HTMLSplit(i).Split(New String() {" GET "}, System.StringSplitOptions.RemoveEmptyEntries)
Dim URLPart2Split2() As String = URLPart2(1).Split(New String() {" HTTP/"}, System.StringSplitOptions.RemoveEmptyEntries) ' Dim URLPart2Split2() As String = URLPart2(1).Split(New String() {" HTTP/"}, System.StringSplitOptions.RemoveEmptyEntries)
Dim URLPart1() As String = HTMLSplit(i + 1).Split(New String() {" Host: "}, System.StringSplitOptions.RemoveEmptyEntries) ' Dim URLPart1() As String = HTMLSplit(i + 1).Split(New String() {" Host: "}, System.StringSplitOptions.RemoveEmptyEntries)
Main.NonCR_URL = "https://" + URLPart1(1) + URLPart2Split2(0) ' Main.NonCR_URL = "https://" + URLPart1(1) + URLPart2Split2(0)
'MsgBox(Main.NonCR_URL) ' 'MsgBox(Main.NonCR_URL)
'RichTextBox1.Text = RichTextBox1.Text + vbNewLine + URL_Final ' 'RichTextBox1.Text = RichTextBox1.Text + vbNewLine + URL_Final
Main.FFMPEG_Reso(Main.NonCR_URL) ' Main.FFMPEG_Reso(Main.NonCR_URL)
t = New Thread(AddressOf Main.Grapp_non_CR) ' t = New Thread(AddressOf Main.Grapp_non_CR)
t.Priority = ThreadPriority.Normal ' t.Priority = ThreadPriority.Normal
t.IsBackground = True ' t.IsBackground = True
t.Start() ' t.Start()
Button2.Text = "Start network scan" ' Button2.Text = "Start network scan"
Exit For ' Exit For
End If ' End If
Next ' Next
End If 'End If
ScanTrue = False ScanTrue = False
Button2.Enabled = True Button2.Enabled = True
Catch ex As Exception Catch ex As Exception
@ -652,4 +688,20 @@ Public Class GeckoFX
'Debug_Mode.TopMost = False 'Debug_Mode.TopMost = False
End Sub End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
If InStr(WebBrowser1.Url.ToString, "funimation.com") Then
Dim Funimation_List As New List(Of String)
Dim Funimation_list1() As String = WebBrowser1.Document.Body.OuterHtml.Split(New String() {My.Resources.Funimation_Split_1}, System.StringSplitOptions.RemoveEmptyEntries)
For i As Integer = 1 To Funimation_list1.Count - 1
Dim Funimation_list2() As String = Funimation_list1(i).Split(New String() {My.Resources.Funimation_Split_2}, System.StringSplitOptions.RemoveEmptyEntries)
Funimation_List.Add("https://www.funimation.com" + Funimation_list2(0))
Main.ListBoxList.Add("https://www.funimation.com" + Funimation_list2(0))
Next
MsgBox(Funimation_List.Count.ToString + " episodes added to Download queue")
'For ii As Integer = 0 To Funimation_List.Count - 1
' MsgBox(Funimation_List.Item(ii))
'Next
End If
End Sub
End Class End Class

View File

@ -126,6 +126,9 @@
<metadata name="Timer2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="Timer2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>205, 17</value> <value>205, 17</value>
</metadata> </metadata>
<metadata name="Timer3.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>294, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>87</value> <value>87</value>
</metadata> </metadata>

View File

@ -66,6 +66,26 @@
Catch ex As Exception Catch ex As Exception
End Try End Try
ElseIf Main.DialogTaskString = "Funimation_Resolution" Then
StatusLabel.Text = Main.LabelResoNotFoundText
Dim ResoList As New List(Of String)
Dim m3u8_split As String() = Main.ResoNotFoundString.Split(New String() {vbLf}, System.StringSplitOptions.RemoveEmptyEntries)
For i As Integer = 0 To m3u8_split.Count - 1
If InStr(m3u8_split(i), "RESOLUTION=") Then
ResoList.Add(m3u8_split(i))
End If
Next
Dim Reso_avaible1 As String() = Main.ResoNotFoundString.Split(New String() {"RESOLUTION="}, System.StringSplitOptions.RemoveEmptyEntries)
For i As Integer = 0 To ResoList.Count - 1
Dim Reso_avaible As String() = ResoList.Item(i).Split(New String() {"RESOLUTION="}, System.StringSplitOptions.RemoveEmptyEntries)
ComboBox1.Items.Add(Reso_avaible(1))
Next
SurroundingSub()
Try
ComboBox1.SelectedIndex = 0
Catch ex As Exception
End Try
End If End If
End Sub End Sub
@ -130,4 +150,7 @@
pictureBox3.BackColor = Color.Transparent pictureBox3.BackColor = Color.Transparent
End Sub End Sub
Private Sub Reso_MouseDoubleClick(sender As Object, e As MouseEventArgs) Handles Me.MouseDoubleClick
MsgBox(Main.ResoNotFoundString)
End Sub
End Class End Class

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 793 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

@ -0,0 +1,34 @@
var episodeCount = document.getElementsByClassName("episode").length;
var i;
for (i = 0; i < episodeCount; i++) {
document.getElementsByClassName("episode")[i].setAttribute('href', "javascript:" + document.getElementsByClassName("episode")[i].href);
document.getElementsByClassName("episode")[i].setAttribute('onclick', 'deselect(this.id)')
//document.getElementsByClassName("episode")[i].style.background = "#f78c25";
document.getElementsByClassName("episode")[i].setAttribute('id', makeid(8))
//document.getElementsByClassName("episode")[i].classList.add('CRD-Selected')
}
function deselect(clicked_id) {
var seleceted = document.getElementById(clicked_id).classList.contains('CRD-Selected')
if (seleceted == true) {
document.getElementById(clicked_id).classList.remove('CRD-Selected')
document.getElementById(clicked_id).style.background = "#ffffff";
} else {
document.getElementById(clicked_id).classList.add('CRD-Selected')
document.getElementById(clicked_id).style.background = "#f78c25";
}
}
function makeid(length) {
var result = '';
var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
var charactersLength = characters.length;
for (var i = 0; i < length; i++) {
result += characters.charAt(Math.floor(Math.random() * charactersLength));
}
return result;
}

View File

@ -0,0 +1,34 @@
var episodeCount = document.getElementsByClassName("episode").length;
var i;
for (i = 0; i < episodeCount; i++) {
document.getElementsByClassName("episode")[i].setAttribute('href', "javascript:" + document.getElementsByClassName("episode")[i].href);
document.getElementsByClassName("episode")[i].setAttribute('onclick', 'deselect(this.id)')
//document.getElementsByClassName("episode")[i].style.background = "#f78c25";
document.getElementsByClassName("episode")[i].setAttribute('id', makeid(8))
//document.getElementsByClassName("episode")[i].classList.add('CRD-Selected')
}
function deselect(clicked_id) {
var seleceted = document.getElementById(clicked_id).classList.contains('CRD-Selected')
if (seleceted == true) {
document.getElementById(clicked_id).classList.remove('CRD-Selected')
document.getElementById(clicked_id).style.background = "#ffffff";
} else {
document.getElementById(clicked_id).classList.add('CRD-Selected')
document.getElementById(clicked_id).style.background = "#f78c25";
}
}
function makeid(length) {
var result = '';
var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
var charactersLength = characters.length;
for (var i = 0; i < length; i++) {
result += characters.charAt(Math.floor(Math.random() * charactersLength));
}
return result;
}

View File

@ -0,0 +1,26 @@
{
"manifest_version": 2,
"name": "Crunchyroll Downloader Addon",
"version": "0.1.1",
"description": "A Firefox Addon for my Crunchyroll Downloader",
"icons": {
"48": "icons/icon-48.png"
},
"permissions": [
"activeTab",
"tabs"
],
"browser_action": {
"default_icon": {
"128": "icons/icon-128.png",
"48": "icons/icon-48.png",
"20": "icons/icon-20.png"
},
"default_title": "CR-Downloader",
"default_popup": "popup.html"
}
}

View File

@ -0,0 +1,15 @@
.btn_class {
background-color: #ff8000;
border: none;
color: white;
padding: 10px;
text-align: center;
text-decoration: none;
font-size: 16px;
margin-left:12px;
margin-right:12px;
margin-Top:12px;
margin-Bottom:12px;
border-radius: 12px;
cursor:pointer;
}

View File

@ -0,0 +1,34 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="popup.css" />
<meta charset="utf-8" />
<title>CR Unblocker plugin popup</title>
<style>
.body{background-color: #f2f2f2;}
.main-bg {background-color:#757575;}
.frame{height: 70px; width: 770px}
</style>
</head>
<body>
<center>
<div id="frame2" class="frame" >
<button type="button" class='btn_class' id='btn_enable_funimation_select'>Select Episodes</button>
<button type="button" class='btn_class' id='btn_add_funimation'>Add this Funimation Episode</button>
<button type="button" class='btn_class' id='btn_add'>Add this Crunchyroll Episode</button>
<button type="button" class='btn_class' id='btn_add_mass'>Add selected Episodes</button>
<button type="button" class='btn_class' id='btn_enable_select'>Select Episodes</button>
<button type="button" class='btn_class' id='btn_select_all'>Select All</button>
<button type="button" class='btn_class' id='btn_select_none'>Deselect All</button>
</div>
<iframe src="http://127.0.0.1" id="CRD-Webserver" width="760px" height="320px" frameborder="0"></iframe>
</center>
<script type="text/javascript" src="popup.js"></script>
</body>
</html>

View File

@ -0,0 +1,282 @@
browser.tabs.query({
currentWindow: true,
active: true
}).then((tabs) => {
let tab = tabs[0]; // Safe to assume there will only be one resultconsole.log(tab.url);
console.log(tab.url);
if (tab.url.includes('crunchyroll.com')) {
var crunchyroll = browser.tabs.executeScript({
code: 'document.getElementsByClassName("episode")[0].href;'
});
crunchyroll.then(onExecuted, onError);
} else if (tab.url.includes('funimation.com')) {
var funimation = browser.tabs.executeScript({
code: 'document.getElementsByClassName("trackVideo")[0].href'
});
funimation.then(FunimationSuccess, FunimationError);
} else {
document.getElementById("btn_add").hidden = true;
document.getElementById("btn_enable_select").hidden = true;
document.getElementById("btn_add_mass").hidden = true;
document.getElementById("btn_select_all").hidden = true;
document.getElementById("btn_select_none").hidden = true;
document.getElementById("btn_enable_funimation_select").hidden = true;
document.getElementById("btn_add_funimation").hidden = true;
}
}, console.error)
document.getElementById('btn_enable_select').addEventListener('click', () => {
browser.tabs.executeScript({
code: 'var script=document.createElement("script");script.type="text/javascript",script.src="http://127.0.0.1/inject.js",document.head.appendChild(script);'
}); //load script from local CRD Server included in https://github.com/hama3254/Crunchyroll-Downloader-v3.0
document.getElementById("btn_add_mass").hidden = false;
document.getElementById("btn_select_all").hidden = false;
document.getElementById("btn_select_none").hidden = false;
document.getElementById("btn_enable_select").hidden = true;
document.getElementById("btn_add").hidden = true;
document.getElementById("btn_enable_funimation_select").hidden = true;
document.getElementById("btn_add_funimation").hidden = true;
});
document.getElementById('btn_select_all').addEventListener('click', () => {
browser.tabs.query({
currentWindow: true,
active: true
}).then((tabs) => {
let tab = tabs[0];
if (tab.url.includes('crunchyroll.com')) {
browser.tabs.executeScript({
code: 'var i,episodeCount=document.getElementsByClassName("episode").length;for(i=0;i<episodeCount;i++)document.getElementsByClassName("episode")[i].style.background="#f78c25",document.getElementsByClassName("episode")[i].classList.add("CRD-Selected");'
});
} else if (tab.url.includes('funimation.com')) {
browser.tabs.executeScript({
code: 'var i,episodeCount=document.getElementsByClassName("fullEpisodeThumbs").length;for(i=0;i<episodeCount;i++)document.getElementsByClassName("fullEpisodeThumbs")[i].style.background="#f78c25",document.getElementsByClassName("fullEpisodeThumbs")[i].classList.add("CRD-Selected");'
});
} else {}
}, console.error)
});
document.getElementById('btn_select_none').addEventListener('click', () => {
browser.tabs.query({
currentWindow: true,
active: true
}).then((tabs) => {
let tab = tabs[0];
if (tab.url.includes('crunchyroll.com')) {
browser.tabs.executeScript({
code: 'var i,episodeCount=document.getElementsByClassName("episode").length;for(i=0;i<episodeCount;i++)document.getElementsByClassName("episode")[i].style.background="#ffffff",document.getElementsByClassName("episode")[i].classList.remove("CRD-Selected");'
});
} else if (tab.url.includes('funimation.com')) {
browser.tabs.executeScript({
code: 'var i,episodeCount=document.getElementsByClassName("fullEpisodeThumbs").length;for(i=0;i<episodeCount;i++)document.getElementsByClassName("fullEpisodeThumbs")[i].style.background="#ffffff",document.getElementsByClassName("fullEpisodeThumbs")[i].classList.remove("CRD-Selected");'
});
} else {}
}, console.error)
});
document.getElementById('btn_add').addEventListener('click', () => {
var add_one = browser.tabs.executeScript({
code: "document.getElementsByClassName('no-js')[0].innerHTML;"
});
add_one.then(add_one_ok, add_one_error);
});
document.getElementById('btn_add_funimation').addEventListener('click', () => {
var add_fun = browser.tabs.executeScript({
code: "document.getElementsByClassName('no-touchevents')[0].innerHTML;"
});
add_fun.then(add_fun_ok, add_one_error);
});
document.getElementById('btn_add_mass').addEventListener('click', () => {
var add_mass = browser.tabs.executeScript({
code: 'var i,URLList="";for(i=0;i<document.getElementsByClassName("CRD-Selected").length;i++)URLList+=document.getElementsByClassName("CRD-Selected")[i].getAttribute("href");URLList;'
});
add_mass.then(add_mass_ok, add_mass_error);
});
function onExecuted(result) {
console.log(result[0]);
if (result[0].includes('javascript:')) {
document.getElementById("btn_add").hidden = true;
document.getElementById("btn_add_mass").hidden = false;
document.getElementById("btn_select_all").hidden = false;
document.getElementById("btn_select_none").hidden = false;
document.getElementById("btn_enable_select").hidden = true;
document.getElementById("btn_add_funimation").hidden = true;
document.getElementById("btn_enable_funimation_select").hidden = true;
console.log(true);
} else {
document.getElementById("btn_add").hidden = true;
document.getElementById("btn_enable_select").hidden = false;
document.getElementById("btn_add_mass").hidden = true;
document.getElementById("btn_select_all").hidden = true;
document.getElementById("btn_select_none").hidden = true;
document.getElementById("btn_add_funimation").hidden = true;
document.getElementById("btn_enable_funimation_select").hidden = true;
console.log(false);
}
}
function onError(error) {
console.log(`Error: ${error}`);
document.getElementById("btn_add").hidden = false;
document.getElementById("btn_add_mass").hidden = true;
document.getElementById("btn_select_all").hidden = true;
document.getElementById("btn_select_none").hidden = true;
document.getElementById("btn_enable_select").hidden = true;
document.getElementById("btn_add_funimation").hidden = true;
document.getElementById("btn_enable_funimation_select").hidden = true;
}
function add_fun_ok(result) {
browser.tabs.query({
currentWindow: true,
active: true
}).then((tabs) => {
let tab = tabs[0]; // Safe to assume there will only be one resultconsole.log(tab.url);
console.log(tab.url);
const form = document.createElement('form');
form.method = 'post';
form.action = "http://127.0.0.1";
const hiddenField = document.createElement('input');
hiddenField.type = 'hidden';
hiddenField.name = "FunimationHTML";
hiddenField.value = result;
form.appendChild(hiddenField);
const hiddenField2 = document.createElement('input');
hiddenField2.type = 'hidden';
hiddenField2.name = "FunimationURL";
hiddenField2.value = tab.url;
form.appendChild(hiddenField2);
document.body.appendChild(form);
form.submit();
}, console.error)
}
function add_one_ok(result) {
const form = document.createElement('form');
form.method = 'post';
form.action = "http://127.0.0.1";
const hiddenField = document.createElement('input');
hiddenField.type = 'hidden';
hiddenField.name = "HTMLSingle";
hiddenField.value = result;
form.appendChild(hiddenField);
document.body.appendChild(form);
form.submit();
}
function add_one_error(error) {
console.log(`Error: ${error}`);
}
function add_mass_ok(result) {
const form = document.createElement('form');
form.method = 'post';
form.action = "http://127.0.0.1";
const hiddenField = document.createElement('input');
hiddenField.type = 'hidden';
hiddenField.name = "HTMLMass";
hiddenField.value = result;
form.appendChild(hiddenField);
document.body.appendChild(form);
form.submit();
}
function add_mass_error(error) {
console.log(`Error: ${error}`);
}
//funimation
document.getElementById('btn_enable_funimation_select').addEventListener('click', () => {
browser.tabs.executeScript({
code: 'var script=document.createElement("script");script.type="text/javascript",script.src="http://127.0.0.1/inject_funimation.js",document.head.appendChild(script);'
}); //load script from local CRD Server included in https://github.com/hama3254/Crunchyroll-Downloader-v3.0
document.getElementById("btn_add_mass").hidden = false;
document.getElementById("btn_select_all").hidden = false;
document.getElementById("btn_select_none").hidden = false;
document.getElementById("btn_enable_select").hidden = true;
document.getElementById("btn_add").hidden = true;
document.getElementById("btn_add_funimation").hidden = true;
});
function FunimationSuccess(result) {
console.log(result[0]);
if (result[0].includes('javascript:')) {
document.getElementById("btn_add").hidden = true;
document.getElementById("btn_add_mass").hidden = false;
document.getElementById("btn_select_all").hidden = false;
document.getElementById("btn_select_none").hidden = false;
document.getElementById("btn_enable_select").hidden = true;
document.getElementById("btn_enable_funimation_select").hidden = true;
document.getElementById("btn_add_funimation").hidden = true;
console.log(true);
} else {
document.getElementById("btn_add").hidden = true;
document.getElementById("btn_add_funimation").hidden = true;
document.getElementById("btn_enable_select").hidden = true;
document.getElementById("btn_add_mass").hidden = true;
document.getElementById("btn_select_all").hidden = true;
document.getElementById("btn_select_none").hidden = true;
document.getElementById("btn_enable_funimation_select").hidden = false;
console.log(false);
}
}
function FunimationError(error) {
console.log(`Error: ${error}`);
document.getElementById("btn_add").hidden = true;
document.getElementById("btn_add_mass").hidden = true;
document.getElementById("btn_select_all").hidden = true;
document.getElementById("btn_select_none").hidden = true;
document.getElementById("btn_enable_select").hidden = true;
document.getElementById("btn_add_funimation").hidden = false;
document.getElementById("btn_enable_funimation_select").hidden = true;
}

View File

@ -3,4 +3,9 @@
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/>
</startup> </startup>
<system.net>
<settings>
<httpWebRequest useUnsafeHeaderParsing="true" />
</settings>
</system.net>
</configuration> </configuration>

Binary file not shown.

View File

@ -0,0 +1,55 @@
<html>
<meta charset="UTF-8">
<head>
</head>
<style>
body {
text-align: center;
padding: 40px 0;
background: #EBF0F5;
}
h1 {
color: #88B04B;
font-family: sans-serif;
font-weight: 900;
font-size: 40px;
margin-bottom: 10px;
}
p {
color: #404F5E;
font-family: sans-serif;
font-size:20px;
margin: 0;
}
i {
color: #9ABC66;
font-size: 100px;
line-height: 200px;
margin-left:-15px;
}
.card {
background: white;
padding: 60px;
border-radius: 4px;
box-shadow: 0 2px 3px #C8D0D8;
display: inline-block;
margin: 0 auto;
}
</style>
<body>
<div class="card">
<div style="border-radius:200px; height:200px; width:200px; background: #F8FAF5; margin:0 auto;">
<i class="checkmark"></i>
</div>
<h1>Success</h1>
<p>Your Downloads have been added to the queue!</p>
</div>
<script>
setInterval(function loadXMLDoc() {
window.close();
}, 3000);
</script>
</body>
</html>

View File

@ -0,0 +1,56 @@
<html>
<head>
<meta charset="UTF-8">
</head>
<style>
body {
text-align: center;
padding: 40px 0;
background: #EBF0F5;
}
h1 {
color: #88B04B;
font-family: sans-serif;
font-weight: 900;
font-size: 40px;
margin-bottom: 10px;
}
p {
color: #404F5E;
font-family: sans-serif;
font-size:20px;
margin: 0;
}
i {
color: #9ABC66;
font-size: 100px;
line-height: 200px;
margin-left:-15px;
}
.card {
background: white;
padding: 60px;
border-radius: 4px;
box-shadow: 0 2px 3px #C8D0D8;
display: inline-block;
margin: 0 auto;
}
</style>
<body>
<div class="card">
<div style="border-radius:200px; height:200px; width:200px; background: #F8FAF5; margin:0 auto;">
<i class="checkmark"></i>
</div>
<h1>Success</h1>
<p>Your Download was added!</p>
</div>
<script>
setInterval(function loadXMLDoc() {
window.close();
}, 3000);
</script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

View File

@ -28,34 +28,6 @@
<body id="bodypage" class="main-bg" > <body id="bodypage" class="main-bg" >
<img alt="image error" src="balken.png" class="class-balken"> <img alt="image error" src="balken.png" class="class-balken">
<div class="div-episode">
<img alt="image error" src="https://img1.ak.crunchyroll.com/i/spire3-tmb/36929076130ec5236c9026b1dc98fc371408055947_fwide.jpg" class="imagestyle">
<div>
<span class="titel" dir="auto">RWBY <br> Staffel 2 Folge 4</span>
<div class="progressbar">
<div class="progressbar-value" style="width:100%"></div>
</div>
<span dir="auto" class='percenttext'>Finished - 131,46MB</span>
<div>
<br>
<span dir="auto" class="resotext">360p</span>
<a href="#" class="cc-wert" title="Softsubs:
"> <img alt="image error" src="cc.png" class="class-cc">Deutsch</a>
</div>
</div>
</div>
<img alt="image error" src="balken.png" class="class-balken"><!-- RWBY Staffel 2 Folge 4-->
<script> <script>
setInterval(function loadXMLDoc() { setInterval(function loadXMLDoc() {

View File

@ -0,0 +1,34 @@
var episodeCount = document.getElementsByClassName("episode").length;
var i;
for (i = 0; i < episodeCount; i++) {
document.getElementsByClassName("episode")[i].setAttribute('href', "javascript:" + document.getElementsByClassName("episode")[i].href);
document.getElementsByClassName("episode")[i].setAttribute('onclick', 'deselect(this.id)')
//document.getElementsByClassName("episode")[i].style.background = "#f78c25";
document.getElementsByClassName("episode")[i].setAttribute('id', makeid(8))
//document.getElementsByClassName("episode")[i].classList.add('CRD-Selected')
}
function deselect(clicked_id) {
var seleceted = document.getElementById(clicked_id).classList.contains('CRD-Selected')
if (seleceted == true) {
document.getElementById(clicked_id).classList.remove('CRD-Selected')
document.getElementById(clicked_id).style.background = "#ffffff";
} else {
document.getElementById(clicked_id).classList.add('CRD-Selected')
document.getElementById(clicked_id).style.background = "#f78c25";
}
}
function makeid(length) {
var result = '';
var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
var charactersLength = characters.length;
for (var i = 0; i < length; i++) {
result += characters.charAt(Math.floor(Math.random() * charactersLength));
}
return result;
}

View File

@ -0,0 +1,44 @@
var episodeCount = document.getElementsByClassName("fullEpisodeThumbs").length;
var i;
for (i = 0; i < episodeCount; i++) {
document.getElementsByClassName("trackVideo")[i * 3].setAttribute('href', "javascript:" + document.getElementsByClassName("trackVideo")[i * 3].href);
document.getElementsByClassName("trackVideo")[i * 3 + 1].setAttribute('href', "javascript:" + document.getElementsByClassName("trackVideo")[i * 3 + 1].href);
document.getElementsByClassName("trackVideo")[i * 3 + 2].setAttribute('href', "javascript:" + document.getElementsByClassName("trackVideo")[i * 3 + 2].href);
//document.getElementsByClassName("fullEpisodeThumbs")[i].setAttribute('href', "javascript:" + document.getElementsByClassName("trackVideo")[i].href);
document.getElementsByClassName("fullEpisodeThumbs")[i].setAttribute('href', document.getElementsByClassName("trackVideo")[i * 3].href);
document.getElementsByClassName("fullEpisodeThumbs")[i].setAttribute('onclick', 'deselect(this.id)')
//document.getElementsByClassName("fullEpisodeThumbs")[i].style.background = "#f78c25";
document.getElementsByClassName("fullEpisodeThumbs")[i].setAttribute('id', makeid(8))
//document.getElementsByClassName("fullEpisodeThumbs")[i].classList.add('CRD-Selected')
}
function deselect(clicked_id) {
var seleceted = document.getElementById(clicked_id).classList.contains('CRD-Selected')
if (seleceted == true) {
document.getElementById(clicked_id).classList.remove('CRD-Selected')
document.getElementById(clicked_id).style.background = "#ffffff";
} else {
document.getElementById(clicked_id).classList.add('CRD-Selected')
document.getElementById(clicked_id).style.background = "#f78c25";
}
}
function makeid(length) {
var result = '';
var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
var charactersLength = characters.length;
for (var i = 0; i < length; i++) {
result += characters.charAt(Math.floor(Math.random() * charactersLength));
}
return result;
}

View File

@ -120,13 +120,10 @@
<metadata name="ToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="ToolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<metadata name="MenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>346, 17</value>
</metadata>
<metadata name="MenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>346, 17</value>
</metadata>
<metadata name="ToolTip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="ToolTip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>461, 17</value> <value>461, 17</value>
</metadata> </metadata>
<metadata name="MenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>346, 17</value>
</metadata>
</root> </root>

View File

@ -1 +1 @@
25ed57b25ba196544106a73de4a1d6420dfa6a5e 64a74a91b1ca2ab5e4fa2938a066d3645c70969f

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Geckofx60.32" version="60.0.46" targetFramework="net452" /> <package id="Geckofx60.32" version="60.0.47" targetFramework="net452" />
</packages> </packages>