diff --git a/modules/background.js b/modules/background.js
index 2cb77a5..171a20d 100644
--- a/modules/background.js
+++ b/modules/background.js
@@ -247,7 +247,7 @@ chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
break;
case "OPEN_PICKER_LOCAL":
chrome.windows.create({
- url: "picker/filePickerLocal.html",
+ url: "../picker/filePickerLocal.html",
type: "popup",
width: 300,
height: 200,
@@ -255,7 +255,7 @@ chrome.runtime.onMessage.addListener((message, sender, sendResponse) => {
break;
case "OPEN_PICKER":
chrome.windows.create({
- url: "picker/filePicker.html",
+ url: "../picker/filePicker.html",
type: "popup",
width: 300,
height: 200,
diff --git a/modules/remote_cdm.js b/modules/remote_cdm.js
index 24aafc4..966c6a9 100644
--- a/modules/remote_cdm.js
+++ b/modules/remote_cdm.js
@@ -18,7 +18,7 @@ export class RemoteCdm {
}
get_name() {
- return `${this.device_name} ${this.host}/`;
+ return `[${this.device_name}] ${this.host}/`;
}
async fetch_with_proxy(url, options) {
diff --git a/panel/panel.css b/panel/panel.css
index 25a6707..3fdf70e 100644
--- a/panel/panel.css
+++ b/panel/panel.css
@@ -142,4 +142,4 @@ input:checked + .slider:before {
}
.expandableDiv.expanded .expanded-only {
display: block;
-}
+}
\ No newline at end of file
diff --git a/panel/panel.js b/panel/panel.js
index 70103ea..284c0ad 100644
--- a/panel/panel.js
+++ b/panel/panel.js
@@ -22,7 +22,6 @@ export_button.addEventListener("click", async function () {
);
});
-
// ================ Remote CDM ================
document.getElementById("remoteInput").addEventListener("click", () => {
chrome.runtime.sendMessage({ type: "OPEN_PICKER" });
@@ -65,16 +64,12 @@ local_combobox.addEventListener("change", async function () {
local_combobox.options[local_combobox.selectedIndex].text
);
});
-// ============================================
// ====================== Proxy Settings ======================
-
-// Get elements
const enableProxy = document.getElementById("enable-proxy");
const proxyConfig = document.getElementById("proxy-config");
const proxyUrlInput = document.getElementById("proxy-url");
-// Enable or disable proxy settings
enableProxy.addEventListener("change", async function () {
const isProxyEnabled = enableProxy.checked;
if (isProxyEnabled) {
@@ -86,13 +81,11 @@ enableProxy.addEventListener("change", async function () {
await SettingsManager.setProxyEnabled(isProxyEnabled);
});
-// Save proxy URL
proxyUrlInput.addEventListener("input", async function () {
const proxyUrl = proxyUrlInput.value;
await SettingsManager.saveProxyConfig(proxyUrl); // Save the proxy config
});
-
// ================ Command Options ================
const use_shaka = document.getElementById("use-shaka");
use_shaka.addEventListener("change", async function () {
@@ -100,8 +93,8 @@ use_shaka.addEventListener("change", async function () {
});
const use_ddownloader = document.getElementById("use-ddownloader");
-use_shaka.addEventListener("change", async function () {
- await SettingsManager.saveUseShakaPackager(use_ddownloader.checked);
+use_ddownloader.addEventListener("change", async function () {
+ await SettingsManager.saveUseDDownloader(use_ddownloader.checked);
});
const downloader_name = document.getElementById("downloader-name");
@@ -109,7 +102,6 @@ downloader_name.addEventListener("input", async function (event) {
console.log("input change", event);
await SettingsManager.saveExecutableName(downloader_name.value);
});
-// =================================================
// ================ Keys ================
const clear = document.getElementById("clear");
@@ -124,8 +116,7 @@ async function createCommand(json, key_string) {
.map(([key, value]) => `-H "${key}: ${value.replace(/"/g, "'")}"`)
.join(" ");
- // Assuming `metadata.url` is the URL to use, and output is derived from `metadata.id` or some other field
- const output = metadata.id || "output"; // Change this according to how you want to generate the output name.
+ const output = metadata.id || "output";
return `DDownloader -u "${metadata.url}" ${header_string} ${key_string} -o "${output}"`;
}
@@ -143,7 +134,6 @@ async function appendLog(result) {
-