mirror of
https://github.com/hama3254/Crunchyroll-Downloader-v3.0.git
synced 2024-12-24 15:11:48 +01:00
Funimation dub setting improvements
Funimation dub setting now overrides existing tags in the url firefox addon post method changed
This commit is contained in:
parent
7e3cd83a55
commit
8e907e05d0
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -19,16 +19,16 @@ browser.tabs.query({
|
||||
code: 'document.getElementsByClassName("trackVideo")[0].href'
|
||||
});
|
||||
funimation.then(FunimationSuccess, FunimationError);
|
||||
} else if (tab.url.includes('anime-on-demand.de/anime/')) {
|
||||
} else if (tab.url.includes('anime-on-demand.de/anime/')) {
|
||||
|
||||
document.getElementById("btn_add").hidden = true;
|
||||
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;
|
||||
document.getElementById("btn_add_AoD").hidden = false;
|
||||
document.getElementById("btn_add_AoD").hidden = true; //false if implemented
|
||||
|
||||
} else {
|
||||
|
||||
@ -39,26 +39,26 @@ browser.tabs.query({
|
||||
document.getElementById("btn_select_none").hidden = true;
|
||||
document.getElementById("btn_enable_funimation_select").hidden = true;
|
||||
document.getElementById("btn_add_funimation").hidden = true;
|
||||
document.getElementById("btn_add_AoD").hidden = true;
|
||||
document.getElementById("btn_add_AoD").hidden = true;
|
||||
}
|
||||
}, console.error)
|
||||
|
||||
document.getElementById('btn_add_AoD').addEventListener('click', () => {
|
||||
//browser.cookies.getAllCookieStores().then((cookie) => {
|
||||
// browser.cookies.getAll({
|
||||
// name: "_aod_session"
|
||||
// }).then((cookie) => {
|
||||
//console.log(cookie)
|
||||
//browser.cookies.getAllCookieStores().then((cookie) => {
|
||||
// browser.cookies.getAll({
|
||||
// name: "_aod_session"
|
||||
// }).then((cookie) => {
|
||||
//console.log(cookie)
|
||||
|
||||
//}, console.error)
|
||||
//}, console.error)
|
||||
|
||||
var cookies = {};
|
||||
var cookies = {};
|
||||
|
||||
cookies.all = url => new Promise(resolve => chrome.cookies.getAll({
|
||||
url
|
||||
}, resolve));
|
||||
cookies.all = url => new Promise(resolve => chrome.cookies.getAll({
|
||||
url
|
||||
}, resolve));
|
||||
|
||||
console.log(cookies)
|
||||
console.log(cookies)
|
||||
});
|
||||
|
||||
document.getElementById('btn_enable_select').addEventListener('click', () => {
|
||||
@ -73,7 +73,7 @@ document.getElementById('btn_enable_select').addEventListener('click', () => {
|
||||
document.getElementById("btn_add").hidden = true;
|
||||
document.getElementById("btn_enable_funimation_select").hidden = true;
|
||||
document.getElementById("btn_add_funimation").hidden = true;
|
||||
document.getElementById("btn_add_AoD").hidden = true;
|
||||
document.getElementById("btn_add_AoD").hidden = true;
|
||||
});
|
||||
|
||||
document.getElementById('btn_select_all').addEventListener('click', () => {
|
||||
@ -160,7 +160,7 @@ function onExecuted(result) {
|
||||
document.getElementById("btn_enable_select").hidden = true;
|
||||
document.getElementById("btn_add_funimation").hidden = true;
|
||||
document.getElementById("btn_enable_funimation_select").hidden = true;
|
||||
document.getElementById("btn_add_AoD").hidden = true;
|
||||
document.getElementById("btn_add_AoD").hidden = true;
|
||||
console.log(true);
|
||||
} else {
|
||||
document.getElementById("btn_add").hidden = true;
|
||||
@ -170,7 +170,7 @@ function onExecuted(result) {
|
||||
document.getElementById("btn_select_none").hidden = true;
|
||||
document.getElementById("btn_add_funimation").hidden = true;
|
||||
document.getElementById("btn_enable_funimation_select").hidden = true;
|
||||
document.getElementById("btn_add_AoD").hidden = true;
|
||||
document.getElementById("btn_add_AoD").hidden = true;
|
||||
|
||||
console.log(false);
|
||||
}
|
||||
@ -186,7 +186,7 @@ function onError(error) {
|
||||
document.getElementById("btn_enable_select").hidden = true;
|
||||
document.getElementById("btn_add_funimation").hidden = true;
|
||||
document.getElementById("btn_enable_funimation_select").hidden = true;
|
||||
document.getElementById("btn_add_AoD").hidden = true;
|
||||
document.getElementById("btn_add_AoD").hidden = true;
|
||||
|
||||
}
|
||||
function add_fun_ok(result) {
|
||||
@ -197,41 +197,40 @@ function add_fun_ok(result) {
|
||||
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/post";
|
||||
document.getElementById("btn_add_funimation").disabled = true;
|
||||
document.getElementById("btn_add_funimation").style.background = "#c9c9c9"
|
||||
|
||||
//const hiddenField = document.createElement('input');
|
||||
//hiddenField.type = 'hidden';
|
||||
//hiddenField.name = "FunimationHTML";
|
||||
//hiddenField.value = result;
|
||||
//form.appendChild(hiddenField);
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.open("POST", "http://127.0.0.1/post", true);
|
||||
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
||||
xhttp.send("FunimationURL=" + tab.url);
|
||||
|
||||
const hiddenField2 = document.createElement('input');
|
||||
hiddenField2.type = 'hidden';
|
||||
hiddenField2.name = "FunimationURL";
|
||||
hiddenField2.value = tab.url;
|
||||
form.appendChild(hiddenField2);
|
||||
setTimeout(function () {
|
||||
document.getElementById("btn_add_funimation").style.background = "#ff8000"
|
||||
}, 10000);
|
||||
setTimeout(function () {
|
||||
document.getElementById("btn_add_funimation").disabled = false;
|
||||
}, 10000);
|
||||
|
||||
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/post";
|
||||
document.getElementById("btn_add").disabled = true;
|
||||
document.getElementById("btn_add").style.background = "#c9c9c9"
|
||||
|
||||
const hiddenField = document.createElement('input');
|
||||
hiddenField.type = 'hidden';
|
||||
hiddenField.name = "HTMLSingle";
|
||||
hiddenField.value = result;
|
||||
form.appendChild(hiddenField);
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.open("POST", "http://127.0.0.1/post", true);
|
||||
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
||||
xhttp.send("HTMLSingle=" + result);
|
||||
|
||||
document.body.appendChild(form);
|
||||
form.submit();
|
||||
setTimeout(function () {
|
||||
document.getElementById("btn_add").style.background = "#ff8000"
|
||||
}, 10000);
|
||||
setTimeout(function () {
|
||||
document.getElementById("btn_add").disabled = false;
|
||||
}, 10000);
|
||||
|
||||
}
|
||||
|
||||
@ -240,18 +239,20 @@ function add_one_error(error) {
|
||||
}
|
||||
function add_mass_ok(result) {
|
||||
|
||||
const form = document.createElement('form');
|
||||
form.method = 'post';
|
||||
form.action = "http://127.0.0.1/post";
|
||||
document.getElementById("btn_add_mass").disabled = true;
|
||||
document.getElementById("btn_add_mass").style.background = "#c9c9c9"
|
||||
|
||||
const hiddenField = document.createElement('input');
|
||||
hiddenField.type = 'hidden';
|
||||
hiddenField.name = "HTMLMass";
|
||||
hiddenField.value = result;
|
||||
form.appendChild(hiddenField);
|
||||
var xhttp = new XMLHttpRequest();
|
||||
xhttp.open("POST", "http://127.0.0.1/post", true);
|
||||
xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
|
||||
xhttp.send("HTMLMass=" + result);
|
||||
|
||||
document.body.appendChild(form);
|
||||
form.submit();
|
||||
setTimeout(function () {
|
||||
document.getElementById("btn_add_mass").style.background = "#ff8000"
|
||||
}, 10000);
|
||||
setTimeout(function () {
|
||||
document.getElementById("btn_add_mass").disabled = false;
|
||||
}, 10000);
|
||||
|
||||
}
|
||||
|
||||
@ -272,7 +273,7 @@ document.getElementById('btn_enable_funimation_select').addEventListener('click'
|
||||
document.getElementById("btn_enable_select").hidden = true;
|
||||
document.getElementById("btn_add").hidden = true;
|
||||
document.getElementById("btn_add_funimation").hidden = true;
|
||||
document.getElementById("btn_add_AoD").hidden = true;
|
||||
document.getElementById("btn_add_AoD").hidden = true;
|
||||
|
||||
});
|
||||
|
||||
@ -285,11 +286,11 @@ function FunimationSuccess(result) {
|
||||
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_AoD").hidden = true;
|
||||
document.getElementById("btn_add_AoD").hidden = true;
|
||||
|
||||
document.getElementById("btn_enable_funimation_select").hidden = true;
|
||||
document.getElementById("btn_add_funimation").hidden = true;
|
||||
document.getElementById("btn_add_AoD").hidden = true;
|
||||
document.getElementById("btn_add_AoD").hidden = true;
|
||||
console.log(true);
|
||||
} else {
|
||||
document.getElementById("btn_add").hidden = true;
|
||||
@ -299,7 +300,7 @@ function FunimationSuccess(result) {
|
||||
document.getElementById("btn_select_all").hidden = true;
|
||||
document.getElementById("btn_select_none").hidden = true;
|
||||
document.getElementById("btn_enable_funimation_select").hidden = false;
|
||||
document.getElementById("btn_add_AoD").hidden = true;
|
||||
document.getElementById("btn_add_AoD").hidden = true;
|
||||
|
||||
console.log(false);
|
||||
}
|
||||
@ -315,6 +316,6 @@ function FunimationError(error) {
|
||||
document.getElementById("btn_enable_select").hidden = true;
|
||||
document.getElementById("btn_add_funimation").hidden = false;
|
||||
document.getElementById("btn_enable_funimation_select").hidden = true;
|
||||
document.getElementById("btn_add_AoD").hidden = true;
|
||||
document.getElementById("btn_add_AoD").hidden = true;
|
||||
|
||||
}
|
||||
|
6
Crunchyroll Downloader/Anime_Add.Designer.vb
generated
6
Crunchyroll Downloader/Anime_Add.Designer.vb
generated
@ -211,9 +211,9 @@ Partial Class Anime_Add
|
||||
Me.pictureBox4.BackColor = System.Drawing.Color.Transparent
|
||||
Me.pictureBox4.Cursor = System.Windows.Forms.Cursors.Hand
|
||||
Me.pictureBox4.Image = Global.Crunchyroll_Downloader.My.Resources.Resources.main_button_download_default
|
||||
Me.pictureBox4.Location = New System.Drawing.Point(42, 231)
|
||||
Me.pictureBox4.Location = New System.Drawing.Point(46, 231)
|
||||
Me.pictureBox4.Name = "pictureBox4"
|
||||
Me.pictureBox4.Size = New System.Drawing.Size(537, 50)
|
||||
Me.pictureBox4.Size = New System.Drawing.Size(538, 50)
|
||||
Me.pictureBox4.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
|
||||
Me.pictureBox4.TabIndex = 42
|
||||
Me.pictureBox4.TabStop = False
|
||||
@ -362,9 +362,9 @@ Partial Class Anime_Add
|
||||
Me.Controls.Add(Me.Btn_min)
|
||||
Me.Controls.Add(Me.Btn_Close)
|
||||
Me.Controls.Add(Me.pictureBox4)
|
||||
Me.Controls.Add(Me.groupBox1)
|
||||
Me.Controls.Add(Me.GroupBox3)
|
||||
Me.Controls.Add(Me.groupBox2)
|
||||
Me.Controls.Add(Me.groupBox1)
|
||||
Me.Name = "Anime_Add"
|
||||
Me.Padding = New System.Windows.Forms.Padding(10, 60, 20, 20)
|
||||
Me.Text = "Add Video"
|
||||
|
@ -48,6 +48,11 @@ Public Class Anime_Add
|
||||
Me.StyleManager = Manager
|
||||
Btn_Close.Image = Main.CloseImg
|
||||
Btn_min.Image = Main.MinImg
|
||||
|
||||
ListBox1.BackColor = Main.BackColorValue
|
||||
ListBox1.ForeColor = Main.ForeColorValue
|
||||
|
||||
|
||||
Try
|
||||
Me.Icon = My.Resources.icon
|
||||
Catch ex As Exception
|
||||
@ -158,16 +163,49 @@ Public Class Anime_Add
|
||||
Try
|
||||
If CBool(InStr(textBox1.Text, "crunchyroll.com")) Or CBool(InStr(textBox1.Text, "funimation.com")) Then 'Or CBool(InStr(textBox1.Text, "anime-on-demand.de")) Then
|
||||
If InStr(textBox1.Text, "funimation.com") Then
|
||||
If InStr(textBox1.Text, "lang=") Then
|
||||
|
||||
If Main.DubFunimation = "Disabled" Then
|
||||
Else
|
||||
If InStr(textBox1.Text, "?") Then
|
||||
If InStr(textBox1.Text, "?lang=") Then
|
||||
Dim ClearUri As String() = textBox1.Text.Split(New String() {"?lang="}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
If ClearUri.Count > 1 Then
|
||||
If InStr(ClearUri(1), "&") Then
|
||||
Dim ClearUri2 As String() = ClearUri(1).Split(New String() {"&"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim Parms As String = Nothing
|
||||
For i As Integer = 0 To ClearUri2.Count - 1
|
||||
Parms = Parms + "&" + ClearUri2(i)
|
||||
Next
|
||||
textBox1.Text = ClearUri(0) + "?lang=" + Main.DubFunimation + Parms
|
||||
Else
|
||||
textBox1.Text = ClearUri(0) + "?lang=" + Main.DubFunimation
|
||||
End If
|
||||
Else
|
||||
textBox1.Text = ClearUri(0) + "?lang=" + Main.DubFunimation
|
||||
End If
|
||||
ElseIf InStr(textBox1.Text, "&lang=") Then
|
||||
Dim ClearUri As String() = textBox1.Text.Split(New String() {"&lang="}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
If ClearUri.Count > 1 Then
|
||||
|
||||
If InStr(ClearUri(1), "&") Then
|
||||
Dim ClearUri2 As String() = ClearUri(1).Split(New String() {"&"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim Parms As String = Nothing
|
||||
For i As Integer = 1 To ClearUri2.Count - 1
|
||||
Parms = Parms + "&" + ClearUri2(i)
|
||||
Next
|
||||
textBox1.Text = ClearUri(0) + "&lang=" + Main.DubFunimation + Parms
|
||||
Else
|
||||
textBox1.Text = ClearUri(0) + "&lang=" + Main.DubFunimation
|
||||
End If
|
||||
Else
|
||||
textBox1.Text = ClearUri(0) + "&lang=" + Main.DubFunimation
|
||||
End If
|
||||
|
||||
ElseIf InStr(textBox1.Text, "?") Then
|
||||
textBox1.AppendText("&lang=" + Main.DubFunimation)
|
||||
Else
|
||||
textBox1.AppendText("?lang=" + Main.DubFunimation)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If StatusLabel.Text = "Status: waiting for episode selection" Then
|
||||
@ -604,8 +642,53 @@ Public Class Anime_Add
|
||||
If GroupBox3.Visible = True Then
|
||||
If 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 Main.DubFunimation = "Disabled" Then
|
||||
Else
|
||||
If InStr(UriUsed, "?lang=") Then
|
||||
Dim ClearUri As String() = UriUsed.Split(New String() {"?lang="}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
If ClearUri.Count > 1 Then
|
||||
If InStr(ClearUri(1), "&") Then
|
||||
Dim ClearUri2 As String() = ClearUri(1).Split(New String() {"&"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim Parms As String = Nothing
|
||||
For i As Integer = 0 To ClearUri2.Count - 1
|
||||
Parms = Parms + "&" + ClearUri2(i)
|
||||
Next
|
||||
UriUsed = ClearUri(0) + "?lang=" + Main.DubFunimation + Parms
|
||||
Else
|
||||
UriUsed = ClearUri(0) + "?lang=" + Main.DubFunimation
|
||||
End If
|
||||
Else
|
||||
UriUsed = ClearUri(0) + "?lang=" + Main.DubFunimation
|
||||
End If
|
||||
ElseIf InStr(UriUsed, "&lang=") Then
|
||||
Dim ClearUri As String() = UriUsed.Split(New String() {"&lang="}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
If ClearUri.Count > 1 Then
|
||||
|
||||
If InStr(ClearUri(1), "&") Then
|
||||
Dim ClearUri2 As String() = ClearUri(1).Split(New String() {"&"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim Parms As String = Nothing
|
||||
For i As Integer = 1 To ClearUri2.Count - 1
|
||||
Parms = Parms + "&" + ClearUri2(i)
|
||||
Next
|
||||
UriUsed = ClearUri(0) + "&lang=" + Main.DubFunimation + Parms
|
||||
Else
|
||||
UriUsed = ClearUri(0) + "&lang=" + Main.DubFunimation
|
||||
End If
|
||||
Else
|
||||
UriUsed = ClearUri(0) + "&lang=" + Main.DubFunimation
|
||||
End If
|
||||
|
||||
ElseIf InStr(UriUsed, "?") Then
|
||||
UriUsed = UriUsed + "&lang=" + Main.DubFunimation
|
||||
Else
|
||||
UriUsed = UriUsed + "?lang=" + Main.DubFunimation
|
||||
End If
|
||||
End If
|
||||
|
||||
Main.Funimation_Grapp_RDY = False
|
||||
GeckoFX.WebBrowser1.Navigate(ListBox1.GetItemText(ListBox1.Items(0)))
|
||||
GeckoFX.WebBrowser1.Navigate(UriUsed)
|
||||
ListBox1.Items.Remove(ListBox1.Items(0))
|
||||
Main.b = False
|
||||
StatusLabel.Text = "Status: loading ..."
|
||||
|
@ -17,13 +17,13 @@ Public Class Main
|
||||
|
||||
Public DarkModeValue As Boolean = False
|
||||
Public invalids As Char() = System.IO.Path.GetInvalidFileNameChars()
|
||||
|
||||
Dim ServerThread As Thread
|
||||
|
||||
|
||||
Public ErrorTolerance As Integer = 0
|
||||
Public liList As New List(Of String)
|
||||
Public HTMLString As String = My.Resources.Startuphtml
|
||||
Public RunServer As Boolean = True
|
||||
'Public RunServer As Boolean = True
|
||||
Public ListBoxList As New List(Of String)
|
||||
Dim ItemList As New List(Of CRD_List_Item)
|
||||
Public RunningDownloads As Integer = 0
|
||||
@ -142,15 +142,20 @@ Public Class Main
|
||||
|
||||
Public CloseImg As Bitmap = My.Resources.main_del
|
||||
Public MinImg As Bitmap = My.Resources.main_mini
|
||||
|
||||
Public BackColorValue As Color = Color.FromArgb(243, 243, 243)
|
||||
Public ForeColorValue As Color = SystemColors.WindowText
|
||||
Public Sub DarkMode()
|
||||
ListView1.BackColor = Color.FromArgb(50, 50, 50)
|
||||
CloseImg = My.Resources.main_close_dark
|
||||
MinImg = My.Resources.main_mini_dark
|
||||
Btn_min.Image = MinImg
|
||||
Btn_Close.Image = CloseImg
|
||||
BackColorValue = Color.FromArgb(50, 50, 50)
|
||||
ForeColorValue = Color.FromArgb(243, 243, 243)
|
||||
End Sub
|
||||
Public Sub LightMode()
|
||||
BackColorValue = Color.FromArgb(243, 243, 243)
|
||||
ForeColorValue = SystemColors.WindowText
|
||||
ListView1.BackColor = SystemColors.Control
|
||||
CloseImg = My.Resources.main_close
|
||||
MinImg = My.Resources.main_mini
|
||||
@ -330,10 +335,10 @@ Public Class Main
|
||||
End Try
|
||||
If StartServer = True Then
|
||||
Timer3.Enabled = True
|
||||
Dim t As New Thread(AddressOf ServerStart)
|
||||
t.Priority = ThreadPriority.Normal
|
||||
t.IsBackground = True
|
||||
t.Start()
|
||||
ServerThread = New Thread(AddressOf ServerStart)
|
||||
ServerThread.Priority = ThreadPriority.Normal
|
||||
ServerThread.IsBackground = True
|
||||
ServerThread.Start()
|
||||
End If
|
||||
|
||||
|
||||
@ -1812,12 +1817,16 @@ Public Class Main
|
||||
For i As Integer = 0 To ListView1.Items.Count - 1
|
||||
ItemList(i).KillRunningTask()
|
||||
Next
|
||||
RunServer = False
|
||||
'RunServer = False
|
||||
tcpListener.Stop()
|
||||
RemoveTempFiles()
|
||||
Me.Close()
|
||||
End If
|
||||
Else
|
||||
RunServer = False
|
||||
'RunServer = False
|
||||
|
||||
tcpListener.Stop()
|
||||
Timer3.Enabled = False
|
||||
RemoveTempFiles()
|
||||
Me.Close()
|
||||
End If
|
||||
@ -2801,6 +2810,9 @@ Public Class Main
|
||||
Debug.WriteLine("Web server started at: " & serverIP.ToString() & ":" & Port)
|
||||
|
||||
ProcessThread()
|
||||
Catch abort As ThreadAbortException
|
||||
|
||||
Exit Sub
|
||||
Catch ex As Exception
|
||||
|
||||
MsgBox(ex.ToString())
|
||||
@ -2821,6 +2833,8 @@ Public Class Main
|
||||
' Set Thread for each Web Browser Connection
|
||||
Dim clientThread As New Thread(Sub() Me.ProcessRequest(clientSocket))
|
||||
clientThread.Start()
|
||||
Catch abort As ThreadAbortException
|
||||
Exit Sub
|
||||
Catch ex As Exception
|
||||
Debug.WriteLine(ex.ToString())
|
||||
'If clientSocket.Connected Then
|
||||
@ -2837,6 +2851,7 @@ Public Class Main
|
||||
Try
|
||||
' Receive HTTP Request from Web Browser
|
||||
bytes = clientSocket.Receive(recvBytes, 0, clientSocket.Available, SocketFlags.None)
|
||||
|
||||
htmlReq = Encoding.UTF8.GetString(recvBytes, 0, bytes)
|
||||
'MsgBox(htmlReq)
|
||||
'My.Computer.FileSystem.WriteAllText(Application.StartupPath + "\log.txt", htmlReq + vbNewLine, True)
|
||||
@ -2859,7 +2874,6 @@ Public Class Main
|
||||
Return Nothing
|
||||
End Function))
|
||||
#Region "CR Einzeln"
|
||||
|
||||
If InStr(htmlReq, "HTMLSingle=") Then
|
||||
Debug.WriteLine("Single episode mode - Crunchyroll")
|
||||
|
||||
@ -2904,7 +2918,7 @@ Public Class Main
|
||||
End If
|
||||
End If
|
||||
strRequest = rootPath & "Post_Single_Sucess.html" 'PostPage
|
||||
sendHTMLResponse(strRequest, clientSocket)
|
||||
SendHTMLResponse(strRequest, clientSocket)
|
||||
Else
|
||||
Me.Invoke(New Action(Function()
|
||||
Me.Text = "Status: no video found"
|
||||
@ -2914,14 +2928,15 @@ Public Class Main
|
||||
Dim ErrorPage As String = My.Resources.Post_error_Top + "no video found" + My.Resources.Post_error_Bottom
|
||||
My.Computer.FileSystem.WriteAllText(Application.StartupPath + "\WebInterface\error_Page.html", ErrorPage, False)
|
||||
strRequest = rootPath & "error_Page.html" 'PostPage
|
||||
sendHTMLResponse(strRequest, clientSocket)
|
||||
SendHTMLResponse(strRequest, clientSocket)
|
||||
End If
|
||||
|
||||
Catch abort As ThreadAbortException
|
||||
Exit Sub
|
||||
Catch ex As Exception
|
||||
Dim ErrorPage As String = My.Resources.Post_error_Top + ex.ToString + My.Resources.Post_error_Bottom
|
||||
My.Computer.FileSystem.WriteAllText(Application.StartupPath + "\WebInterface\error_Page.html", ErrorPage, False)
|
||||
strRequest = rootPath & "error_Page.html" 'PostPage
|
||||
sendHTMLResponse(strRequest, clientSocket)
|
||||
SendHTMLResponse(strRequest, clientSocket)
|
||||
End Try
|
||||
#End Region
|
||||
#Region "mass-dl"
|
||||
@ -2960,12 +2975,14 @@ Public Class Main
|
||||
End Function))
|
||||
End If
|
||||
strRequest = rootPath & "Post_Mass_Sucess.html" 'PostPage
|
||||
sendHTMLResponse(strRequest, clientSocket)
|
||||
SendHTMLResponse(strRequest, clientSocket)
|
||||
Catch abort As ThreadAbortException
|
||||
Exit Sub
|
||||
Catch ex As Exception
|
||||
Dim ErrorPage As String = My.Resources.Post_error_Top + ex.ToString + My.Resources.Post_error_Bottom
|
||||
My.Computer.FileSystem.WriteAllText(Application.StartupPath + "\WebInterface\error_Page.html", ErrorPage, False)
|
||||
strRequest = rootPath & "error_Page.html" 'PostPage
|
||||
sendHTMLResponse(strRequest, clientSocket)
|
||||
SendHTMLResponse(strRequest, clientSocket)
|
||||
End Try
|
||||
#End Region
|
||||
#Region "funimation Einzeln"
|
||||
@ -2981,6 +2998,53 @@ Public Class Main
|
||||
Dim URLSplit() As String = htmlReq.Split(New String() {"FunimationURL="}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
WebbrowserURL = UrlDecode(URLSplit(1))
|
||||
|
||||
If InStr(WebbrowserURL, "funimation.com") Then
|
||||
If DubFunimation = "Disabled" Then
|
||||
Else
|
||||
If InStr(WebbrowserURL, "?lang=") Then
|
||||
Dim ClearUri As String() = WebbrowserURL.Split(New String() {"?lang="}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
If ClearUri.Count > 1 Then
|
||||
If InStr(ClearUri(1), "&") Then
|
||||
Dim ClearUri2 As String() = ClearUri(1).Split(New String() {"&"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim Parms As String = Nothing
|
||||
For i As Integer = 0 To ClearUri2.Count - 1
|
||||
Parms = Parms + "&" + ClearUri2(i)
|
||||
Next
|
||||
WebbrowserURL = ClearUri(0) + "?lang=" + DubFunimation + Parms
|
||||
Else
|
||||
WebbrowserURL = ClearUri(0) + "?lang=" + DubFunimation
|
||||
End If
|
||||
Else
|
||||
WebbrowserURL = ClearUri(0) + "?lang=" + DubFunimation
|
||||
End If
|
||||
ElseIf InStr(WebbrowserURL, "&lang=") Then
|
||||
Dim ClearUri As String() = WebbrowserURL.Split(New String() {"&lang="}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
If ClearUri.Count > 1 Then
|
||||
|
||||
If InStr(ClearUri(1), "&") Then
|
||||
Dim ClearUri2 As String() = ClearUri(1).Split(New String() {"&"}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim Parms As String = Nothing
|
||||
For i As Integer = 1 To ClearUri2.Count - 1
|
||||
Parms = Parms + "&" + ClearUri2(i)
|
||||
Next
|
||||
WebbrowserURL = ClearUri(0) + "&lang=" + DubFunimation + Parms
|
||||
Else
|
||||
WebbrowserURL = ClearUri(0) + "&lang=" + DubFunimation
|
||||
End If
|
||||
Else
|
||||
WebbrowserURL = ClearUri(0) + "&lang=" + DubFunimation
|
||||
End If
|
||||
|
||||
ElseIf InStr(WebbrowserURL, "?") Then
|
||||
WebbrowserURL = WebbrowserURL + "&lang=" + DubFunimation
|
||||
Else
|
||||
WebbrowserURL = WebbrowserURL + "?lang=" + DubFunimation
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If Funimation_Grapp_RDY = True Then
|
||||
If RunningDownloads >= MaxDL Then
|
||||
If ListBoxList.Contains(WebbrowserURL) = False Then
|
||||
@ -3018,12 +3082,14 @@ Public Class Main
|
||||
End If
|
||||
End If
|
||||
strRequest = rootPath & "Post_Single_Sucess.html" 'PostPage
|
||||
sendHTMLResponse(strRequest, clientSocket)
|
||||
SendHTMLResponse(strRequest, clientSocket)
|
||||
Catch abort As ThreadAbortException
|
||||
Exit Sub
|
||||
Catch ex As Exception
|
||||
Dim ErrorPage As String = My.Resources.Post_error_Top + ex.ToString + My.Resources.Post_error_Bottom
|
||||
My.Computer.FileSystem.WriteAllText(Application.StartupPath + "\WebInterface\error_Page.html", ErrorPage, False)
|
||||
strRequest = rootPath & "error_Page.html" 'PostPage
|
||||
sendHTMLResponse(strRequest, clientSocket)
|
||||
SendHTMLResponse(strRequest, clientSocket)
|
||||
End Try
|
||||
|
||||
#End Region
|
||||
@ -3052,6 +3118,8 @@ Public Class Main
|
||||
sendHTMLResponse(strRequest, clientSocket)
|
||||
|
||||
End If
|
||||
Catch abort As ThreadAbortException
|
||||
Exit Sub
|
||||
Catch ex As Exception
|
||||
Debug.WriteLine(ex.ToString())
|
||||
Dim ErrorPage As String = My.Resources.Post_error_Top + ex.ToString + My.Resources.Post_error_Bottom
|
||||
@ -3077,9 +3145,9 @@ Public Class Main
|
||||
' Set HTML Header
|
||||
Dim htmlHeader As String =
|
||||
"HTTP/1.0 200 OK" & ControlChars.CrLf &
|
||||
"Server: WebServer 1.0" & ControlChars.CrLf &
|
||||
"Server: CRD 1.0" & ControlChars.CrLf &
|
||||
"Content-Length: " & respByte.Length & ControlChars.CrLf &
|
||||
"Content-Type: " & getContentType(httpRequest) &
|
||||
"Content-Type: " & GetContentType(httpRequest) &
|
||||
ControlChars.CrLf & ControlChars.CrLf
|
||||
' The content Length of HTML Header
|
||||
Dim headerByte() As Byte = Encoding.UTF8.GetBytes(htmlHeader)
|
||||
@ -3111,7 +3179,8 @@ Public Class Main
|
||||
clientSocket.Shutdown(SocketShutdown.Both)
|
||||
clientSocket.Close()
|
||||
End If
|
||||
|
||||
Catch abort As ThreadAbortException
|
||||
Exit Sub
|
||||
Catch ex As Exception
|
||||
'Debug.WriteLine(ex.ToString())
|
||||
If clientSocket.Connected Then
|
||||
|
@ -32,6 +32,6 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("3.7.2.1")>
|
||||
<Assembly: AssemblyFileVersion("3.7.2.1")>
|
||||
<Assembly: AssemblyVersion("3.7.3")>
|
||||
<Assembly: AssemblyFileVersion("3.7.3")>
|
||||
<Assembly: NeutralResourcesLanguage("en")>
|
||||
|
Binary file not shown.
Binary file not shown.
@ -42,8 +42,16 @@
|
||||
<i class="checkmark">✘</i>
|
||||
</div>
|
||||
<h1>Failed!</h1>
|
||||
<p>System.IndexOutOfRangeException: Der Index war außerhalb des Arraybereichs.
|
||||
bei Crunchyroll_Downloader.Main.ProcessRequest(Socket clientSocket) in D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0 - UI\Crunchyroll Downloader\Main.vb:Zeile 2629.</p>
|
||||
<p>System.IO.IOException: Der Prozess kann nicht auf die Datei "D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0\Crunchyroll Downloader\bin\x86\Debug\test2.log" zugreifen, da sie von einem anderen Prozess verwendet wird.
|
||||
bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
|
||||
bei System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
|
||||
bei System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
|
||||
bei System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
|
||||
bei System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
|
||||
bei System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding)
|
||||
bei Microsoft.VisualBasic.FileIO.FileSystem.WriteAllText(String file, String text, Boolean append, Encoding encoding)
|
||||
bei Microsoft.VisualBasic.MyServices.FileSystemProxy.WriteAllText(String file, String text, Boolean append)
|
||||
bei Crunchyroll_Downloader.Main.ProcessRequest(Socket clientSocket) in D:\Projecte\Crunchyroll Downloader - v3.0-final\Crunchyroll-Downloader-v3.0\Crunchyroll Downloader\Main.vb:Zeile 2851.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
9
Crunchyroll Downloader/einstellungen.Designer.vb
generated
9
Crunchyroll Downloader/einstellungen.Designer.vb
generated
@ -133,6 +133,7 @@ Partial Class Einstellungen
|
||||
Me.Label4 = New MetroFramework.Controls.MetroLabel()
|
||||
Me.Label6 = New MetroFramework.Controls.MetroLabel()
|
||||
Me.Label5 = New MetroFramework.Controls.MetroLabel()
|
||||
Me.BackgroundWorker1 = New System.ComponentModel.BackgroundWorker()
|
||||
CType(Me.pictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.pictureBox4, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.TabPage4.SuspendLayout()
|
||||
@ -935,10 +936,10 @@ Partial Class Einstellungen
|
||||
Me.TabPage1.HorizontalScrollbarBarColor = True
|
||||
Me.TabPage1.HorizontalScrollbarHighlightOnWheel = False
|
||||
Me.TabPage1.HorizontalScrollbarSize = 10
|
||||
Me.TabPage1.Location = New System.Drawing.Point(4, 44)
|
||||
Me.TabPage1.Location = New System.Drawing.Point(4, 35)
|
||||
Me.TabPage1.Name = "TabPage1"
|
||||
Me.TabPage1.Padding = New System.Windows.Forms.Padding(3)
|
||||
Me.TabPage1.Size = New System.Drawing.Size(493, 452)
|
||||
Me.TabPage1.Size = New System.Drawing.Size(493, 461)
|
||||
Me.TabPage1.TabIndex = 0
|
||||
Me.TabPage1.Text = " Main"
|
||||
Me.TabPage1.VerticalScrollbar = True
|
||||
@ -1524,6 +1525,9 @@ Partial Class Einstellungen
|
||||
Me.Label5.Text = "Created by hama3254"
|
||||
Me.Label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'BackgroundWorker1
|
||||
'
|
||||
'
|
||||
'Einstellungen
|
||||
'
|
||||
Me.ApplyImageInvert = True
|
||||
@ -1706,4 +1710,5 @@ Partial Class Einstellungen
|
||||
Friend WithEvents Fun_Dub_Over As MetroFramework.Controls.MetroComboBox
|
||||
Friend WithEvents CR_Filename As MetroFramework.Controls.MetroComboBox
|
||||
Public WithEvents LastVersion As MetroFramework.Controls.MetroLabel
|
||||
Friend WithEvents BackgroundWorker1 As System.ComponentModel.BackgroundWorker
|
||||
End Class
|
||||
|
@ -126,8 +126,8 @@
|
||||
<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 name="BackgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>332, 20</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>60</value>
|
||||
|
@ -16,48 +16,8 @@ Public Class Einstellungen
|
||||
Private Sub Einstellungen_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
|
||||
Label6.Text = "You have: v" + Application.ProductVersion.ToString
|
||||
BackgroundWorker1.RunWorkerAsync()
|
||||
|
||||
Try
|
||||
Dim client0 As New WebClient
|
||||
client0.Encoding = Encoding.UTF8
|
||||
client0.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), ""))
|
||||
|
||||
Dim str0 As String = client0.DownloadString("https://api.github.com/repos/hama3254/Crunchyroll-Downloader-v3.0/releases")
|
||||
|
||||
Dim GitHubLastIsPre() As String = str0.Split(New String() {Chr(34) + "prerelease" + Chr(34) + ": "}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim LastNonPreRelase As Integer = 0
|
||||
|
||||
For i As Integer = 1 To GitHubLastIsPre.Count - 1
|
||||
Dim GitHubLastIsPre1() As String = GitHubLastIsPre(i).Split(New String() {","}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
|
||||
If GitHubLastIsPre1(0) = "false" Then
|
||||
LastNonPreRelase = i
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim GitHubLastTag() As String = str0.Split(New String() {Chr(34) + "tag_name" + Chr(34) + ": " + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim GitHubLastTag1() As String = GitHubLastTag(LastNonPreRelase).Split(New String() {Chr(34) + ","}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
|
||||
LastVersion.Text = "last release: " + GitHubLastTag1(0)
|
||||
|
||||
'Dim v1 As String = Application.ProductVersion
|
||||
'Dim v2 As String = GitHubLastTag1(0)
|
||||
'Dim version1 = New Version(v1)
|
||||
'Dim version2 = New Version(v2)
|
||||
'Dim result = version1.CompareTo(version2)
|
||||
|
||||
'If result > 0 Then
|
||||
' Console.WriteLine("version1 is greater")
|
||||
'ElseIf result < 0 Then
|
||||
' 'Console.WriteLine("version2 is greater")
|
||||
'Else
|
||||
' 'Console.WriteLine("versions are equal")
|
||||
'End If
|
||||
|
||||
Catch ex As Exception
|
||||
Debug.WriteLine(ex.ToString)
|
||||
End Try
|
||||
|
||||
'CR_Anime_Folge = CR_Name_Staffel0_Folge1(1)
|
||||
'If GitHubLastTag1(0)
|
||||
@ -904,6 +864,39 @@ Public Class Einstellungen
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BackgroundWorker1_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
|
||||
Try
|
||||
Dim client0 As New WebClient
|
||||
client0.Encoding = Encoding.UTF8
|
||||
client0.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), ""))
|
||||
|
||||
Dim str0 As String = client0.DownloadString("https://api.github.com/repos/hama3254/Crunchyroll-Downloader-v3.0/releases")
|
||||
|
||||
Dim GitHubLastIsPre() As String = str0.Split(New String() {Chr(34) + "prerelease" + Chr(34) + ": "}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim LastNonPreRelase As Integer = 0
|
||||
|
||||
For i As Integer = 1 To GitHubLastIsPre.Count - 1
|
||||
Dim GitHubLastIsPre1() As String = GitHubLastIsPre(i).Split(New String() {","}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
|
||||
If GitHubLastIsPre1(0) = "false" Then
|
||||
LastNonPreRelase = i
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim GitHubLastTag() As String = str0.Split(New String() {Chr(34) + "tag_name" + Chr(34) + ": " + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
Dim GitHubLastTag1() As String = GitHubLastTag(LastNonPreRelase).Split(New String() {Chr(34) + ","}, System.StringSplitOptions.RemoveEmptyEntries)
|
||||
|
||||
Me.Invoke(New Action(Function()
|
||||
LastVersion.Text = "last release: " + GitHubLastTag1(0)
|
||||
Return Nothing
|
||||
End Function))
|
||||
|
||||
Catch ex As Exception
|
||||
Debug.WriteLine(ex.ToString)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user