diff --git a/app/assets/js/lib/filter.js b/app/assets/js/lib/filter.js index 767bc97..2ae45b4 100644 --- a/app/assets/js/lib/filter.js +++ b/app/assets/js/lib/filter.js @@ -1,4 +1,4 @@ -let keywords = [ +const keywordsYt = [ "\\[.*\\]", "\\{.*\\}", "\\([A-Za-z]{2}\\)", @@ -25,6 +25,14 @@ let keywords = [ "\"", "'" ]; -let ytFilter = new RegExp(keywords.join("|"), 'gi'); -export {ytFilter}; \ No newline at end of file +const keywordsErrors = [ + "winerror 10054", + "aes-cbc", + "[youtube]" +]; + +const ytFilter = new RegExp(keywordsYt.join("|"), 'gi'); +const errorFilter = new RegExp(keywordsErrors.join("|"), 'gi'); + +export {ytFilter, errorFilter}; \ No newline at end of file diff --git a/app/assets/js/tools.js b/app/assets/js/tools.js index 6fa809d..4e8d280 100644 --- a/app/assets/js/tools.js +++ b/app/assets/js/tools.js @@ -1,5 +1,5 @@ import mustache from "./lib/mustache.min.js"; -import {ytFilter} from "./lib/filter.js"; +import {errorFilter, ytFilter} from "./lib/filter.js"; const terminate = require("terminate"); const path = require("path"); @@ -659,8 +659,9 @@ function downloadURL(mode, location, url, percentage, codecAudio, codecVideo, qu if (!aborted) { data = data.toLowerCase(); - if (!data.includes("winerror 10054") && !data.includes("aes-cbc")) + if (!data.match(errorFilter)) { error = true; + } if (data.includes("winerror 3")) resolve("drive"); if (data.includes("permission")) resolve("permission"); diff --git a/package.json b/package.json index 1b72961..a5b131d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fastdownloader", - "version": "0.5.15", + "version": "0.5.16", "description": "A fast video and audio downloader for YouTube", "main": "main.js", "scripts": { @@ -26,17 +26,17 @@ "author": "Bernardo de Oliveira ", "license": "GPL-3.0", "devDependencies": { - "@electron/asar": "^3.2.8", - "electron": "^28.1.0", - "electron-builder": "^24.9.1" + "@electron/asar": "^3.2.10", + "electron": "^31.0.2", + "electron-builder": "^24.13.3" }, "dependencies": { "auto-launch": "^5.0.6", - "electron-updater": "^6.1.7", + "electron-updater": "^6.2.1", "fastest-levenshtein": "^1.0.16", "node-youtube-music": "^0.8.3", "terminate": "^2.6.1", - "youtube-sr": "^4.3.10", + "youtube-sr": "^4.3.11", "ytpl": "^2.3.0" }, "build": { diff --git a/resources/yt-dlp_linux b/resources/yt-dlp_linux index 04d25da..edf8cb0 100755 Binary files a/resources/yt-dlp_linux and b/resources/yt-dlp_linux differ