diff --git a/.vs/Crunchyroll Downloader/v17/.suo b/.vs/Crunchyroll Downloader/v17/.suo
index b13060c..862e801 100644
Binary files a/.vs/Crunchyroll Downloader/v17/.suo and b/.vs/Crunchyroll Downloader/v17/.suo differ
diff --git a/CRD-addon/background.js b/CRD-addon/background.js
deleted file mode 100644
index 7a0f36c..0000000
--- a/CRD-addon/background.js
+++ /dev/null
@@ -1,32 +0,0 @@
-browser.webRequest.onHeadersReceived.addListener(
- details => {
- browser.test.log(`onHeadersReceived ${JSON.stringify(details)}\n`);
- if (!details.fromCache) {
- //console.log("not cached");
- browser.test.sendMessage("statusCode", details.statusCode);
- const mime = details.responseHeaders.find(header => {
- return header.value && header.name === "Server";
- });
- if (mime) {
- //console.log(mime.value);
- browser.runtime.sendMessage({
- Server: mime.value
- });
-
- } else {
- details.responseHeaders.push({
- name: "Content-Security-Policy",
- value: "upgrade-insecure-requests",
- });
- }
-
- return {
- responseHeaders: details.responseHeaders,
- };
- } else {
- console.log("cached");
- }
-}, {
- urls: ["http://127.0.0.1/*"],
-},
- ["blocking", "responseHeaders"]);
diff --git a/CRD-addon/icons/icon-128.png b/CRD-addon/icons/icon-128.png
deleted file mode 100644
index 7e9eb88..0000000
Binary files a/CRD-addon/icons/icon-128.png and /dev/null differ
diff --git a/CRD-addon/icons/icon-20.png b/CRD-addon/icons/icon-20.png
deleted file mode 100644
index 012e057..0000000
Binary files a/CRD-addon/icons/icon-20.png and /dev/null differ
diff --git a/CRD-addon/icons/icon-48.png b/CRD-addon/icons/icon-48.png
deleted file mode 100644
index 323edbf..0000000
Binary files a/CRD-addon/icons/icon-48.png and /dev/null differ
diff --git a/CRD-addon/images/submit.png b/CRD-addon/images/submit.png
deleted file mode 100644
index 0c6adb8..0000000
Binary files a/CRD-addon/images/submit.png and /dev/null differ
diff --git a/CRD-addon/inject.js b/CRD-addon/inject.js
deleted file mode 100644
index 3b16d99..0000000
--- a/CRD-addon/inject.js
+++ /dev/null
@@ -1,34 +0,0 @@
-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;
-}
diff --git a/CRD-addon/inject_beta.js b/CRD-addon/inject_beta.js
deleted file mode 100644
index c26768b..0000000
--- a/CRD-addon/inject_beta.js
+++ /dev/null
@@ -1,10 +0,0 @@
-var episodeCount = document.getElementsByClassName("c-playable-card__link").length;
-var i;
-for (i = 0; i < episodeCount; i++) {
- var old_element = document.getElementsByClassName("c-playable-card__link")[i];
- var new_element = old_element.cloneNode(true);
- old_element.parentNode.replaceChild(new_element, old_element);
- document.getElementsByClassName("c-playable-card__link")[i].setAttribute('href', "javascript:" + document.getElementsByClassName("c-playable-card__link")[i].href);
- document.getElementsByClassName("c-playable-card__link")[i].setAttribute('onclick', 'this.classList.contains("CRD-Selected")?(this.classList.remove("CRD-Selected"),this.style.background="#000000",this.style.opacity="0"):(this.classList.add("CRD-Selected"),this.style.background="#f78c25",this.style.opacity="0.5");');
-
-}
diff --git a/CRD-addon/inject_funimation.js b/CRD-addon/inject_funimation.js
deleted file mode 100644
index 3b16d99..0000000
--- a/CRD-addon/inject_funimation.js
+++ /dev/null
@@ -1,34 +0,0 @@
-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;
-}
diff --git a/CRD-addon/inject_funimation_new.js b/CRD-addon/inject_funimation_new.js
deleted file mode 100644
index 1b23ee4..0000000
--- a/CRD-addon/inject_funimation_new.js
+++ /dev/null
@@ -1,11 +0,0 @@
-var episodeCount = document.getElementsByClassName("episode-card").length;
-var i;
-for (i = 0; i < episodeCount; i++) {
- var old_element = document.getElementsByClassName("episode-card")[i];
- var new_element = old_element.cloneNode(true);
- old_element.parentNode.replaceChild(new_element, old_element);
- document.getElementsByClassName("episode-card")[i].classList.remove('transparent')
- document.getElementsByClassName("episode-card")[i].setAttribute('href', "javascript:" + document.getElementsByClassName("episode-card")[i].href);
- document.getElementsByClassName("episode-card")[i].setAttribute('onclick', 'this.classList.contains("CRD-Selected")?(this.classList.remove("CRD-Selected"),this.style.background="#000000",this.style.borderStyle="none",this.style.opacity="1"):(this.classList.add("CRD-Selected"),this.style.background="#400099",this.style.borderStyle="solid", this.style.borderColor="#400099", this.style.borderWidth = "10px");');
-
-}
diff --git a/CRD-addon/manifest.json b/CRD-addon/manifest.json
deleted file mode 100644
index 60a7434..0000000
--- a/CRD-addon/manifest.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "manifest_version": 2,
- "name": "Crunchyroll Downloader Addon",
- "version": "0.6.0",
-
- "description": "A Firefox Addon for my Crunchyroll Downloader",
-
- "icons": {
- "48": "icons/icon-48.png"
- },
- "permissions": [
- "storage",
- "activeTab",
- "webRequest",
- "webRequestBlocking",
- "http://127.0.0.1/*",
- "tabs"
- ],
- "content_scripts": [
- {
- "all_frames": true,
- "matches": ["http://beta.crunchyroll.com/*", "https://beta.crunchyroll.com/*"],
- "match_about_blank": true,
- "js": ["inject_beta.js"]
- }
- ],
-
- "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"
- },
-
- "background": {
- "scripts": ["background.js"]
- }
-
-}
\ No newline at end of file
diff --git a/CRD-addon/popup.css b/CRD-addon/popup.css
deleted file mode 100644
index 601a798..0000000
--- a/CRD-addon/popup.css
+++ /dev/null
@@ -1,30 +0,0 @@
-.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;
-}
-.txt_class {
- background-color: #ebe9e8;
- border: none;
- color: black;
- 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;
-}
\ No newline at end of file
diff --git a/CRD-addon/popup.html b/CRD-addon/popup.html
deleted file mode 100644
index dd7223f..0000000
--- a/CRD-addon/popup.html
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
- CR Unblocker plugin popup
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Enter the port or start the Desktop application
-
-
-
-
-
-
-
-
diff --git a/CRD-addon/popup.js b/CRD-addon/popup.js
deleted file mode 100644
index 6d9d6f5..0000000
--- a/CRD-addon/popup.js
+++ /dev/null
@@ -1,583 +0,0 @@
-var Port;
-var FunCookie;
-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_mass_funimation").hidden = true;
-document.getElementById("btn_add_AoD").hidden = true;
-
-browser.storage.local.get("CRD_Port")
-.then(gotPort, NoPort);
-
-function getServerValue(request, sender, sendResponse) {
- if (request.Server == "CRD 1.0") {
- document.getElementById("CRD-Webserver").hidden = false;
- document.getElementById("txtOutput").remove();
- document.getElementById("txtInput").hidden = true;
- document.getElementById("btn_set_port").hidden = true;
- 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')) {
- if (tab.url.includes('beta.crunchyroll.com')) {
- var crunchyroll = browser.tabs.executeScript({
- code: 'document.getElementsByClassName("c-playable-card__link")[0].href;'
- });
-
- crunchyroll.then(onExecuted, onError);
-
- } else {
-
- 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, FunimationOldNotFound);
- } else if (tab.url.includes('anime-on-demand.de/anime/')) {
-
- 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 = true; //false if implemented
-
- } 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;
- document.getElementById("btn_add_AoD").hidden = true;
- }
- }, console.error)
- } else {}
-
-}
-browser.runtime.onMessage.addListener(getServerValue);
-
-function setItem() {
- console.log("OK");
-}
-function notsetItem() {
- console.log("Not OK");
-}
-
-function gotPort(result) {
- try {
- onStartup(result.CRD_Port.value);
- console.log("Port: " + result.CRD_Port.value)
- } catch (e) {
- onStartup(80);
- console.log("no port")
- }
-
-}
-
-function NoPort(result) {
- onStartup(80);
- console.log("no port")
-}
-
-function onStartup(result) {
- Port = result;
- var ifrm = document.createElement("iframe");
- ifrm.src = "http://127.0.0.1:" + Port;
- ifrm.style = "border:0px solid black;";
- ifrm.style.width = "760px";
- ifrm.style.height = "320px";
- ifrm.id = "CRD-Webserver";
- ifrm.hidden = true;
- document.body.appendChild(ifrm);
-
-}
-
-document.getElementById('btn_set_port').addEventListener('click', () => {
- let CRD_Port = {
- value: document.getElementById('txtInput').value
- }
-
- browser.storage.local.set({
- CRD_Port
- })
- .then(setItem, notsetItem);
-
- window.close();
-});
-
-document.getElementById('btn_add_AoD').addEventListener('click', () => {
- //browser.cookies.getAllCookieStores().then((cookie) => {
- // browser.cookies.getAll({
- // name: "_aod_session"
- // }).then((cookie) => {
- //console.log(cookie)
-
- //}, console.error)
-
- var cookies = {};
-
- cookies.all = url => new Promise(resolve => chrome.cookies.getAll({
- url
- }, resolve));
-
- console.log(cookies)
-});
-
-document.getElementById('btn_enable_select').addEventListener('click', () => {
-
- 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('beta.crunchyroll.com')) {
-
- let executing = browser.tabs.executeScript({
- file: "inject_beta.js"
- });
- executing.then(OnChange);
-
- } else {
-
- browser.tabs.executeScript({
- code: 'var script=document.createElement("script");script.type="text/javascript",script.src="http://127.0.0.1:' + Port + '/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_add_AoD").hidden = true;
-
- }
- }, console.error)
-});
-
-function OnChange(result) {
-
- window.close()
-}
-
-document.getElementById('btn_select_all').addEventListener('click', () => {
- browser.tabs.query({
- currentWindow: true,
- active: true
- }).then((tabs) => {
-
- let tab = tabs[0];
- if (tab.url.includes('beta.crunchyroll.com')) {
-
- browser.tabs.executeScript({
- code: 'var i,episodeCount=document.getElementsByClassName("c-playable-card__link").length;for(i=0;i {
- browser.tabs.query({
- currentWindow: true,
- active: true
- }).then((tabs) => {
-
- let tab = tabs[0];
- if (tab.url.includes('beta.crunchyroll.com')) {
-
- browser.tabs.executeScript({
- code: 'var i,episodeCount=document.getElementsByClassName("c-playable-card__link").length;for(i=0;i {
-
- browser.tabs.query({
- currentWindow: true,
- active: true
- }).then((tabs) => {
-
- let tab = tabs[0];
- if (tab.url.includes('beta.crunchyroll.com')) {
-
-
- add_beta_ok(tab.url)
-
- } else if (tab.url.includes('crunchyroll.com')) {
-
- var add_one = browser.tabs.executeScript({
- code: "document.getElementsByClassName('no-js')[0].innerHTML;"
- });
- add_one.then(add_one_ok, add_one_error);
-
- } else if (tab.url.includes('funimation.com')) {
-
- browser.tabs.executeScript({
- code: 'var i,episodeCount=document.getElementsByClassName("fullEpisodeThumbs").length;for(i=0;i {
-
- var add_fun = browser.tabs.executeScript({
- code: "document.cookie" //"document.getElementsByClassName('show-details')[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 {
-
- var add_mass = browser.tabs.executeScript({
- code: 'var i,URLList="";for(i=0;i {
- let tab = tabs[0]; // Safe to assume there will only be one resultconsole.log(tab.url);
- console.log(tab.url);
-
- document.getElementById("btn_add_funimation").disabled = true;
- document.getElementById("btn_add_funimation").style.background = "#c9c9c9"
-
- var xhttp = new XMLHttpRequest();
- xhttp.open("POST", "http://127.0.0.1:" + Port + "/post", true);
- xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
- xhttp.send("FunimationURL=" + tab.url + "&FunimationCookie=" + result);
-
- setTimeout(function () {
- document.getElementById("btn_add_funimation").style.background = "#ff8000"
- }, 10000);
- setTimeout(function () {
- document.getElementById("btn_add_funimation").disabled = false;
- }, 10000);
-
- }, console.error)
-}
-
-function add_one_ok(result) {
-
- document.getElementById("btn_add").disabled = true;
- document.getElementById("btn_add").style.background = "#c9c9c9"
-
- var xhttp = new XMLHttpRequest();
- xhttp.open("POST", "http://127.0.0.1:" + Port + "/post", true);
- xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
- xhttp.send("HTMLSingle=" + result);
-
- setTimeout(function () {
- document.getElementById("btn_add").style.background = "#ff8000"
- }, 10000);
- setTimeout(function () {
- document.getElementById("btn_add").disabled = false;
- }, 10000);
-
-}
-
-function add_one_error(error) {
- console.log(`Error: ${error}`);
-}
-function add_mass_ok(result) {
-
- document.getElementById("btn_add_mass").disabled = true;
- document.getElementById("btn_add_mass").style.background = "#c9c9c9"
-
- var xhttp = new XMLHttpRequest();
- xhttp.open("POST", "http://127.0.0.1:" + Port + "/post", true);
- xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
- xhttp.send("HTMLMass=" + result);
-
- setTimeout(function () {
- document.getElementById("btn_add_mass").style.background = "#ff8000"
- }, 10000);
- setTimeout(function () {
- document.getElementById("btn_add_mass").disabled = false;
- }, 10000);
-
-}
-
-
-function add_beta_ok(result) {
-
- document.getElementById("btn_add").disabled = true;
- document.getElementById("btn_add").style.background = "#c9c9c9"
-
- var xhttp = new XMLHttpRequest();
- xhttp.open("POST", "http://127.0.0.1:" + Port + "/post", true);
- xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
- xhttp.send("HTMLMass=" + result);
-
- setTimeout(function () {
- document.getElementById("btn_add").style.background = "#ff8000"
- }, 10000);
- setTimeout(function () {
- document.getElementById("btn_add").disabled = false;
- }, 10000);
-
-}
-
-function add_mass_fun_ok(result) {
-
- document.getElementById("btn_add_mass_funimation").disabled = true;
- document.getElementById("btn_add_mass_funimation").style.background = "#c9c9c9"
-
- var postdata = result + "&FunimationCookie=" + FunCookie
-
- var xhttp = new XMLHttpRequest();
- xhttp.open("POST", "http://127.0.0.1:" + Port + "/post", true);
- xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
- xhttp.send("FunimationMass=" + postdata);
-
- setTimeout(function () {
- document.getElementById("btn_add_mass_funimation").style.background = "#ff8000"
- }, 10000);
- setTimeout(function () {
- document.getElementById("btn_add_mass_funimation").disabled = false;
- }, 10000);
-
-}
-
-function add_mass_error(error) {
- console.log(`Error: ${error}`);
-}
-//funimation
-
-document.getElementById('btn_enable_funimation_select').addEventListener('click', () => {
-
-
- var funimation = browser.tabs.executeScript({
-
- code: 'document.getElementsByClassName("episode-card")[0].href'
- });
- funimation.then(FunimationNewSelect, FunimationOldSelect);
-
-
-
-});
-
-function FunimationOldSelect(result) {
-
- browser.tabs.executeScript({
- code: 'var script=document.createElement("script");script.type="text/javascript",script.src="http://127.0.0.1:' + Port + '/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 = true;
- document.getElementById("btn_add_mass_funimation").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;
- document.getElementById("btn_add_AoD").hidden = true;
- document.getElementById("btn_enable_funimation_select").hidden = true;
-
-}
-
-
-function FunimationNewSelect(result) {
-
- browser.tabs.executeScript({
- file: 'inject_funimation_new.js'
- });
-
- document.getElementById("btn_add_mass").hidden = true;
- document.getElementById("btn_add_mass_funimation").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;
- document.getElementById("btn_add_AoD").hidden = true;
- document.getElementById("btn_enable_funimation_select").hidden = true;
-
-}
-
-function fun_cookie_ok(result) {
-
- FunCookie = result;
-
-}
-
-function FunimationSuccess(result) {
- console.log(result[0]);
-
- if (result[0].includes('javascript:')) {
- document.getElementById("btn_add").hidden = true;
- document.getElementById("btn_add_mass").hidden = true;
- document.getElementById("btn_add_mass_funimation").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_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;
- var SaveFunimationCookie = browser.tabs.executeScript({
- code: "document.cookie"
- });
- SaveFunimationCookie.then(fun_cookie_ok, add_mass_error);
- 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;
- document.getElementById("btn_add_AoD").hidden = true;
- var SaveFunimationCookie = browser.tabs.executeScript({
- code: "document.cookie"
- });
- SaveFunimationCookie.then(fun_cookie_ok, add_mass_error);
- console.log(false);
- }
-}
-function FunimationOldNotFound(error) {
-
- var funimation = browser.tabs.executeScript({
-
- code: 'document.getElementsByClassName("episode-card")[0].href'
- });
- funimation.then(FunimationSuccess, FunimationError);
-}
-
-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;
- document.getElementById("btn_add_AoD").hidden = true;
-
-
-
-}
diff --git a/Crunchyroll Downloader/Anime_Add.Designer.vb b/Crunchyroll Downloader/Anime_Add.Designer.vb
index b5343b1..7683d67 100644
--- a/Crunchyroll Downloader/Anime_Add.Designer.vb
+++ b/Crunchyroll Downloader/Anime_Add.Designer.vb
@@ -321,9 +321,9 @@ Partial Class Anime_Add
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, 18)
+ Me.ListBox1.Location = New System.Drawing.Point(13, 30)
Me.ListBox1.Name = "ListBox1"
- Me.ListBox1.Size = New System.Drawing.Size(693, 244)
+ Me.ListBox1.Size = New System.Drawing.Size(693, 229)
Me.ListBox1.TabIndex = 0
'
'Timer1
@@ -382,6 +382,7 @@ Partial Class Anime_Add
'Timer3
'
Me.Timer3.Enabled = True
+ Me.Timer3.Interval = 2000
'
'Anime_Add
'
@@ -392,9 +393,9 @@ 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)
diff --git a/Crunchyroll Downloader/Anime_Add.resx b/Crunchyroll Downloader/Anime_Add.resx
index 8500321..fa7a95f 100644
--- a/Crunchyroll Downloader/Anime_Add.resx
+++ b/Crunchyroll Downloader/Anime_Add.resx
@@ -127,7 +127,7 @@
iVBORw0KGgoAAAANSUhEUgAAABoAAAAhCAYAAADH97ugAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
- wAAADsABataJCQAAAAd0SU1FB+QMDQ03N1b5UIAAAAApSURBVEhL7cyxCQAwDASx339pZ4EUcTC4keDa
+ vQAADr0BR/uQrQAAAAd0SU1FB+QMDQ03N1b5UIAAAAApSURBVEhL7cyxCQAwDASx339pZ4EUcTC4keDa
CwDMqs/abpOXAGBZcgDKSBvlblfsRgAAAABJRU5ErkJggg==
diff --git a/Crunchyroll Downloader/Anime_Add.vb b/Crunchyroll Downloader/Anime_Add.vb
index eb6df75..2cc6915 100644
--- a/Crunchyroll Downloader/Anime_Add.vb
+++ b/Crunchyroll Downloader/Anime_Add.vb
@@ -7,7 +7,6 @@ Imports System.Threading
Imports MetroFramework.Forms
Imports MetroFramework
Imports MetroFramework.Components
-Imports CefSharp
Imports System.Text
Imports System.Runtime.InteropServices.ComTypes
Imports System.Windows.Forms.VisualStyles.VisualStyleElement.Status
@@ -16,7 +15,6 @@ Public Class Anime_Add
Public Mass_DL_Cancel As Boolean = False
Public List_DL_Cancel As Boolean = False
- Public ThreadList As New List(Of Thread)
@@ -26,103 +24,74 @@ Public Class Anime_Add
Public Sub LoadBrowser(ByVal Url As String)
- 'Main.LoadedUrl = Url
+ Main.LoadingUrl = Url
Main.LoadedUrls.Clear()
- If CBool(InStr(Url, "crunchyroll.com")) = True And CBool(InStr(Url, "series")) = True Then
+ '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
+
- 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
- CefSharp_Browser.WebBrowser1.Load(Url)
- ElseIf CBool(InStr(Url, "crunchyroll.com")) = True And CBool(InStr(Url, "watch")) = True And CBool(Main.CrBetaBasic = Nothing) = False Then
#Region "Get Cookies"
+
Main.CR_Cookies = "Cookie: "
+ 'MsgBox("Cookies")
+ Browser.GetCookies(Url)
+ 'MsgBox("Cookies2")
+
+ 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
+
Try
- Dim rk As RegistryKey = Registry.CurrentUser.CreateSubKey("Software\CRDownloader")
- Dim etp_rt As Boolean = False
- Dim ajs_user_id As Boolean = False
- Dim Collector As New TaskCookieVisitor
- Dim CM As ICookieManager = CefSharp_Browser.WebBrowser1.GetCookieManager
- CM.VisitAllCookies(Collector)
+
+
Dim DeviceRegion As String = Nothing
- Dim list As List(Of Global.CefSharp.Cookie) = Collector.Task.Result()
- For i As Integer = 0 To list.Count - 1
+ ' Main.CookieList = Collector.Task.Result()
+ For i As Integer = 0 To Main.CookieList.Count - 1
- '__cf_bm
- If CBool(InStr(list.Item(i).Domain, ".crunchyroll.com")) And CBool(InStr(list.Item(i).Name, "_evidon_suppress")) = False Then
- Main.CR_Cookies = Main.CR_Cookies + list.Item(i).Name + "=" + list.Item(i).Value + ";"
+ 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
- 'If CBool(InStr(list.Item(i).Domain, ".crunchyroll.com")) And CBool(InStr(list.Item(i).Name, "c_locale")) Then
- ' Main.locale = list.Item(i).Value
- 'End If
- 'If CBool(InStr(list.Item(i).Domain, ".crunchyroll.com")) = True And CBool(InStr(list.Item(i).Name, "etp_rt")) = True And Main.CheckCRLogin = True And Main.CR_etp_rt = Nothing Then
- ' Debug.WriteLine("etp_rt = True")
- ' etp_rt = True
- ' Main.CR_etp_rt = list.Item(i).Value
- ' rk.SetValue("etp_rt", Main.CR_etp_rt, RegistryValueKind.String)
- 'ElseIf CBool(InStr(list.Item(i).Domain, ".crunchyroll.com")) = True And CBool(InStr(list.Item(i).Name, "__cf_bm")) = True = True And Main.CheckCRLogin = True And Main.CR_ajs_user_id = Nothing Then
- ' 'MsgBox(list.Item(i).Value)
- ' Debug.WriteLine("ajs_user_id = True")
- ' ajs_user_id = True
- ' Main.CR_ajs_user_id = list.Item(i).Value
- ' rk.SetValue("ajs_user_id", Main.CR_ajs_user_id, RegistryValueKind.String)
- 'End If
Next
- 'If Main.locale = Nothing 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)
+ 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
- 'MsgBox(Main.locale)
-
- If Main.locale = Nothing Then
-
- CefSharp_Browser.WebBrowser1.Load(Url)
- Exit Sub
- End If
-
-
- 'If Main.CR_etp_rt IsNot Nothing And etp_rt = False Then
- ' Main.CR_Cookies = "Cookie: " + "etp_rt" + "=" + Main.CR_etp_rt + ";" + Main.CR_Cookies.Replace("Cookie: ", "")
- ' Dim etp_rt_cookie As New CefSharp.Cookie
- ' etp_rt_cookie.Name = "etp_rt"
- ' etp_rt_cookie.Value = Main.CR_etp_rt
- ' etp_rt_cookie.HttpOnly = True
- ' etp_rt_cookie.Domain = ".crunchyroll.com"
- ' Debug.WriteLine("Set etp_rt_cookie: " + CM.SetCookieAsync("http://www.crunchyroll.com", etp_rt_cookie).Result.ToString)
- 'End If
-
- 'If Main.CR_ajs_user_id IsNot Nothing And ajs_user_id = False Then
- ' Main.CR_Cookies = Main.CR_Cookies + "ajs_user_id" + "=" + Main.CR_ajs_user_id + ";"
- ' Dim ajs_user_id_cookie As New CefSharp.Cookie
- ' ajs_user_id_cookie.Name = "__cf_bm"
- ' ajs_user_id_cookie.Value = Main.CR_ajs_user_id
- ' ajs_user_id_cookie.HttpOnly = True
- ' ajs_user_id_cookie.Domain = ".crunchyroll.com"
- ' Debug.WriteLine("Set ajs_user_id_cookie: " + CM.SetCookieAsync("http://www.crunchyroll.com", ajs_user_id_cookie).Result.ToString)
- 'End If
-
-
+ 'MsgBox("locale: " + Main.locale)
Catch ex As Exception
- CefSharp_Browser.WebBrowser1.Load(Url)
+ Browser.WebView2.CoreWebView2.Navigate(Url)
+ StatusLabel.Text = "Status: loading in browser..."
Exit Sub
End Try
@@ -142,6 +111,8 @@ Public Class Anime_Add
Dim v1Token As String = Main.CurlPost("https://www.crunchyroll.com/auth/v1/token", Main.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", Main.CR_Cookies, Auth, Post.Replace("etp_rt_cookie", "client_id"))
@@ -153,6 +124,13 @@ Public Class Anime_Add
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
@@ -161,7 +139,8 @@ Public Class Anime_Add
End If
If CBool(InStr(v1Token, "curl:")) = True Then
- CefSharp_Browser.WebBrowser1.Load(Url)
+ Browser.WebView2.CoreWebView2.Navigate(Url)
+ StatusLabel.Text = "Status: loading in browser..."
Exit Sub
End If
@@ -173,27 +152,17 @@ Public Class Anime_Add
Dim ObjectsUrl 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), ""))
- ' client.Headers.Add("ACCEPT: application/json, text/javascript, */*; q=0.01")
- ' client.Headers.Add("Accept-Encoding: identity")
- ' client.Headers.Add("Referer: " + Url)
- ' client.Headers.Add("Authorization: " + CRBetaBearer)
- ' client.Headers.Add(Cookies) '+ WebBrowser1.Document.Cookie)
- 'MsgBox(OmUStreamSplitEpisodeIndex(1))
+
Dim Auth2 As String = " -H " + Chr(34) + "Authorization: " + CRBetaBearer + Chr(34)
Dim v2Content As String = Main.CurlAuth("https://www.crunchyroll.com/index/v2", Main.CR_Cookies, Auth2) 'client.DownloadString("https://www.crunchyroll.com/index/v2")
- 'Debug.WriteLine(v2Content)
- 'MsgBox("v2: " + v2Content)
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
- CefSharp_Browser.WebBrowser1.Load(Url)
+ Browser.WebView2.CoreWebView2.Navigate(Url)
+ StatusLabel.Text = "Status: loading in browser..."
Exit Sub
End If
@@ -214,104 +183,108 @@ Public Class Anime_Add
Dim key_pair_id2() As String = key_pair_id(1).Split(New String() {Chr(34) + "," + Chr(34)}, System.StringSplitOptions.RemoveEmptyEntries)
- '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)
+ If CBool(InStr(Url, "crunchyroll.com")) = True And CBool(InStr(Url, "series/")) = True Then
- ObjectsUrl = "https://www.crunchyroll.com/cms/v2" + bucket2(0) + "/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 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)
- 'Catch ex As Exception
- ' MsgBox(ex.ToString)
- ' CefSharp_Browser.WebBrowser1.Load(Url)
- ' Exit Sub
- 'End Try
+ 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)
- Dim StreamsUrl As String = Nothing
- Dim ObjectJson As String
- Try
- ObjectJson = Main.Curl(ObjectsUrl)
- 'MsgBox(ObjectJson)
+ 'MsgBox(SeriesUrl)
+ Main.GetBetaSeasons(SeriesUrl)
- If CBool(InStr(ObjectJson, "curl:")) = True Then
+
+ 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/cms/v2" + bucket2(0) + "/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.Curl(ObjectsUrl)
- End If
+ 'MsgBox(ObjectJson)
- If CBool(InStr(ObjectJson, "curl:")) = True Then
- CefSharp_Browser.WebBrowser1.Load(Url)
+ If CBool(InStr(ObjectJson, "curl:")) = True Then
+ ObjectJson = Main.Curl(ObjectsUrl)
+ End If
+
+ If CBool(InStr(ObjectJson, "curl:")) = True Then
+ Browser.WebView2.CoreWebView2.Navigate(Url)
+ 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
- ElseIf CBool(InStr(ObjectJson, "videos/")) = False Then
+ End Try
- 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")
+ 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 If
+ End Try
- 'Try
- ' Using client As New WebClient()
- ' client.Encoding = System.Text.Encoding.UTF8
- ' client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), ""))
- ' ObjectJson = client.DownloadString(ObjectsUrl)
- ' End Using
- 'Catch ex As Exception
- ' Debug.WriteLine("error- getting name data")
- ' Exit Sub
- 'End Try
-
- Catch ex As Exception
- CefSharp_Browser.WebBrowser1.Load(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
- CefSharp_Browser.WebBrowser1.Load(Url)
- Exit Sub
- End Try
-
- Main.GetBetaVideoProxy(StreamsUrl, Url)
+ Main.GetBetaVideoProxy(StreamsUrl, Url)
+ Else
+ Browser.WebView2.CoreWebView2.Navigate(Url)
+ End If
Else
- CefSharp_Browser.WebBrowser1.Load(Url)
+ '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
- Dim rk As RegistryKey = Registry.CurrentUser.CreateSubKey("Software\CRDownloader")
- rk.SetValue("SubFolder_Value", SubFolder_Nothing, RegistryValueKind.String)
SubFolder_Value = SubFolder_Nothing
+ My.Settings.SubFolder_Value = SubFolder_Value
ElseIf ComboBox2.Text = SubFolder_automatic Then
- Dim rk As RegistryKey = Registry.CurrentUser.CreateSubKey("Software\CRDownloader")
- rk.SetValue("SubFolder_Value", SubFolder_automatic, RegistryValueKind.String)
SubFolder_Value = SubFolder_automatic
+ My.Settings.SubFolder_Value = SubFolder_Value
ElseIf ComboBox2.Text = SubFolder_automatic2 Then
- Dim rk As RegistryKey = Registry.CurrentUser.CreateSubKey("Software\CRDownloader")
- rk.SetValue("SubFolder_Value", SubFolder_automatic2, RegistryValueKind.String)
SubFolder_Value = SubFolder_automatic2
+ My.Settings.SubFolder_Value = SubFolder_Value
Else
- Dim rk As RegistryKey = Registry.CurrentUser.CreateSubKey("Software\CRDownloader")
- rk.SetValue("SubFolder_Value", ComboBox2.Text, RegistryValueKind.String)
SubFolder_Value = ComboBox2.Text
+ My.Settings.SubFolder_Value = SubFolder_Value
End If
Catch ex As Exception
ComboBox2.Text = SubFolder_Nothing
@@ -367,8 +340,7 @@ Public Class Anime_Add
' Dim SubFolder_Value As String
Try
- Dim rkg As RegistryKey = Registry.CurrentUser.OpenSubKey("Software\CRDownloader")
- SubFolder_Value = rkg.GetValue("SubFolder_Value").ToString
+ SubFolder_Value = My.Settings.SubFolder_Value
If SubFolder_Value = SubFolder_Nothing Then
ComboBox2.Items.Add(SubFolder_automatic)
ComboBox2.Items.Add(SubFolder_automatic2)
@@ -421,38 +393,23 @@ Public Class Anime_Add
Catch ex As Exception
End Try
+
+ 'Timer3.Enabled = True
+
End Sub
- 'Public Sub BetaCR(ByVal Auth As String, ByVal Cookie As String)
- ' Try
- ' Using client As New WebClient()
- ' client.Encoding = System.Text.Encoding.UTF8
- ' client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), ""))
- ' client.Headers.Add("ACCEPT: gzip")
- ' client.Headers.Add("Cookie: " + Cookie)
- ' client.Headers.Add("Authorization: " + Auth)
- ' client.Headers.Add("Content-Type: application/x-www-form-urlencoded")
- ' client.Headers.Add("Referer: https://beta.crunchyroll.com/") '
- ' Dim reqparm As New Specialized.NameValueCollection
-
- ' reqparm.Add("grant_type", "etp_rt_cookie")
- ' Dim responsebytes = client.UploadValues("https://beta-api.crunchyroll.com/auth/v1/token", "POST", reqparm)
- ' Dim responsebody = (New Text.UTF8Encoding).GetString(responsebytes)
- ' 'My.Computer.Clipboard.SetText(responsebody)
- ' End Using
- ' Catch ex As Exception
- ' MsgBox(ex.ToString)
- ' End Try
-
-
- 'End Sub
Private Sub Btn_dl_Click(sender As Object, e As EventArgs) Handles btn_dl.Click
- CefSharp_Browser.Show()
+ If Application.OpenForms().OfType(Of Browser).Any = True Then
+ Else
+ Main.UserBowser = False
+ Browser.Show()
+ End If
+
Main.LoginOnly = "Download Mode!"
'MsgBox(Main.WebbrowserURL)
If SubTitlesOnlyCB.Text = "[Default]" Then
@@ -491,8 +448,10 @@ Public Class Anime_Add
Main.WebbrowserURL = textBox1.Text
If CBool(InStr(textBox1.Text, "funimation.com/v/")) Then
- Dim Episode() As String = textBox1.Text.Split(New String() {"/"}, System.StringSplitOptions.RemoveEmptyEntries)
+ 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"
+ MsgBox(v1JsonUrl)
Dim v1Json As String = Nothing
Try
Using client As New WebClient()
@@ -500,10 +459,11 @@ Public Class Anime_Add
client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), ""))
v1Json = client.DownloadString(v1JsonUrl)
End Using
+ Main.WebbrowserURL = textBox1.Text
Main.GetFunimationNewJS_VideoProxy(Nothing, v1Json)
Exit Sub
Catch ex As Exception
- Debug.WriteLine("error- getting v1Json data for the bypasss")
+ Debug.WriteLine("error- getting v1Json data for the bypass")
Debug.WriteLine(ex.ToString)
End Try
@@ -701,24 +661,6 @@ Public Class Anime_Add
Debug.WriteLine(EpisodeJsonURL)
-
-
- 'CefSharp_Browser.WebBrowser1.LoadUrl(EpisodeJsonURL)
-
-
- 'Try
- ' Using client As New WebClient()
- ' client.Encoding = System.Text.Encoding.UTF8
- ' client.Headers.Add(My.Resources.ffmpeg_user_agend.Replace(Chr(34), ""))
- ' EpisodeJson = client.DownloadString(EpisodeJsonURL)
- ' End Using
- 'Catch ex As Exception
- ' Debug.WriteLine("error- getting EpisodeJson data")
- ' Debug.WriteLine(ex.ToString)
- ' Exit Sub
- 'End Try
-
-
Dim EpisodeJson As String = Main.Curl(EpisodeJsonURL) 'localHTML.Replace("", "").Replace("", "").Replace("", "").Replace("
", "").Replace("