[{"last_chapter_rule":"","title":"吾爱破解𝔥","author":"Hood","version":4,"type":"other","url":"https://www.52pojie.cn/forum.php?mod=guide&view=fyclass&page=fypage;get;GBK","col_type":"text_1","class_name":"最新热门&最新精华&最新回复&最新发表","class_url":"hot&digest&new&newthread","area_name":"","area_url":"","sort_name":"","year_name":"","sort_url":"","year_url":"","find_rule":"js:\nvar res = {};\nvar d = [];\nvar html = getResCode();\n\n//列表\nvar list = parseDomForArray(html,'body&&tbody[id]');\n\nfor(var i=1;i 0 ? '共' + length + '个片源' : '暂无片源';\n if (length > 0) {\n let e = res.vendors[0];\n update += e.episodes_info ? \"|\" + e.episodes_info : \"\";\n }\n} else {\n for (let e of res.vendors) {\n if (e.title == title) {\n update += e.episodes_info ? e.episodes_info : \"\";\n break;\n }\n }\n}\nsetResult(update);","title":"青豆","author":"Joker&&Reborn","version":12,"type":"video","url":"hiker://empty/","col_type":"movie_3","class_name":"","class_url":"","area_name":"","area_url":"","sort_name":"","year_name":"","sort_url":"","year_url":"","find_rule":"js:\nlet forceUrgencyMode = 0\nif (forceUrgencyMode) {\n let e = '当前为强制急救模式'\n let rule = JSON.parse(request(\"hiker://page/urgencyMode\")).rule;\n eval(rule)\n} else {\n try {\n eval(fetch(getVar(\"qdb_file\")));\n home();\n } catch (e) {\n let rule = JSON.parse(request(\"hiker://page/urgencyMode\")).rule;\n eval(rule)\n }\n}","searchFind":"js:\ntry {\n eval(fetch(getVar(\"qdb_file\")));\n search();\n} catch (e) {\n let rule = JSON.parse(request(\"hiker://page/urgencyMode\")).rule;\n eval(rule)\n}","search_url":"hiker://empty/$page{fypage}/#/**","titleColor":"","group":"①推荐","detail_col_type":"movie_1_vertical_pic","detail_find_rule":"js:\ntry {\n eval(fetch(getVar(\"qdb_file\")));\n erji();\n} catch (e) {\n let rule = JSON.parse(request(\"hiker://page/urgencyMode\")).rule;\n eval(rule)\n}","sdetail_col_type":"movie_1","sdetail_find_rule":"","ua":"mobile","preRule":"let file = \"hiker://files/rules/joker/qdb.js\";\nlet gitfile = 'https://gitcode.net/qq_41846756/hiker/-/raw/master/qdb.js';\nlet ver = getItem('newver','');\nif (!fetch(file) || ver < MY_RULE.version) {\n writeFile(file, request(gitfile));\n setItem('newver',String(MY_RULE.version));\n}\nputVar({\n key: \"qdb_file\",\n value: file\n});\ntry {\n eval(fetch(file));\n pre();\n} catch (e) {\n let rule = JSON.parse(request(\"hiker://page/urgencyMode\")).rule;\n eval(rule)\n}","pages":"[{\"col_type\":\"movie_3\",\"name\":\"配置编辑界面\",\"path\":\"setting-editor\",\"rule\":\"js:\\neval(request(getVar('qdb_file')))\\nlet d = [];\\nlet configType = getVar(\\\"input_config_type\\\")\\nif (configType === '解析插件配置') {\\n setPageTitle(\\\"编辑解析代码\\\")\\n analysisModeEditPage(d)\\n} else if (configType === '影片详情页面配置') {\\n setPageTitle(\\\"编辑影片详情页面代码\\\")\\n detailViewModeEditPage(d)\\n} else {\\n setError('错误的配置');\\n}\\nsetResult(d)\"},{\"col_type\":\"movie_3\",\"name\":\"解除被封ip\",\"path\":\"releaseIP\",\"rule\":\"js:\\nlet id = getParam('id');\\nlet d = [];\\nd.push({\\n title: '您已被封禁IP地址或触发了人机验证,请按照以下步骤处理(如不处理您将在一段时间内无法正常获取剧集列表)',\\n url: 'hiker://empty',\\n col_type: 'text_1'\\n});\\nd.push({\\n title: '1.点击此处导入自动获取Cookie插件',\\n url: $()\\n .lazyRule(() => {\\n let getDoubanCookie = \\\"(function(){if(window['location']['host']=='www.douban.com'){fy_bridge_app['writeFile']('hiker://files/cache/doubancookie.txt',fy_bridge_app['getCookie']('https://www.douban.com/'));}if(window['location']['host']=='m.douban.com'){fy_bridge_app['writeFile']('hiker://files/cache/doubancookie.txt',fy_bridge_app['getCookie']('https://m.douban.com/'));}}());\\\"\\n if (!fileExist('hiker://files/cache/global_getDoubanCookie.js')) {\\n writeFile('hiker://files/cache/global_getDoubanCookie.js', getDoubanCookie);\\n };\\n return 'rule://' + base64Encode('海阔视界,网页插件¥js_url¥global_getDoubanCookie@hiker://files/cache/global_getDoubanCookie.js');\\n }),\\n col_type: 'text_1'\\n});\\nd.push({\\n title: '2.点击此处进入网页进行登录或人机验证,完成后返回此页面',\\n url: 'https://movie.douban.com/subject/' + id + '/',\\n col_type: 'text_1'\\n});\\nd.push({\\n title: '3.完成登录或人机验证后返回影片详情页面重新进入',\\n url: 'hiker://empty',\\n col_type: 'text_1'\\n});\\nsetResult(d)\"},{\"col_type\":\"movie_3\",\"name\":\"抢救页面\",\"path\":\"urgencyMode\",\"rule\":\"js:\\nlet d = [];\\nd.push({\\n title: '很明显,出了一些小问题,建议重生',\\n col_type: 'text_center_1',\\n url: 'hiker://empty'\\n})\\nd.push({\\n title: '点我更新依赖',\\n col_type: 'text_1',\\n url: $('hiker://empty').lazyRule(() => {\\n let file = \\\"hiker://files/rules/joker/qdb.js\\\";\\n let gitfile = 'https://gitcode.net/qq_41846756/hiker/-/raw/master/qdb.js';\\n let text = request(gitfile);\\n writeFile(file, text);\\n refreshPage();\\n return 'toast://依赖文件更新成功'\\n })\\n})\\nd.push({\\n title: '点我恢复默认设置',\\n col_type: 'text_1',\\n url: $(\\\"确定要恢复?\\\").confirm(() => {\\n defaultConfigs = {\\n starColor: \\\"#ffac2d\\\",\\n chooseColor: \\\"#FA7298\\\",\\n quickSearchConfigs: {\\n order: []\\n },\\n detailsViewConfigs: {\\n use: \\\"默认\\\",\\n \\\"默认\\\": {\\n config: \\\"eval(fetch(getVar('qdb_file')));detailsView(type, id);\\\"\\n }\\n },\\n analysisConfigs: {\\n use: \\\"不解析\\\",\\n \\\"不解析\\\": {\\n config: $.toString(() => {\\n return input;\\n }),\\n setting: $.toString(() => {\\n return \\\"toast://该插件无设置页面\\\";\\n })\\n },\\n \\\"断插\\\": {\\n config: $.toString(() => {\\n let file = \\\"hiker://files/rules/DuanNian/MyParse.json\\\";\\n let oldfile = \\\"hiker://files/cache/MyParseSet.json\\\";\\n if (fileExist(file)) {\\n eval('json=' + fetch(file));\\n let jsUrl = json.settings.cj;\\n eval(fetch(jsUrl));\\n return aytmParse(input);\\n } else if (fileExist(oldfile)) {\\n let jsUrl = JSON.parse(fetch(oldfile)).cj;\\n eval(fetch(jsUrl));\\n return aytmParse(input);\\n } else {\\n return 'toast://没找到断插配置文件';\\n }\\n }),\\n setting: $.toString(() => {\\n let file = \\\"hiker://files/rules/DuanNian/MyParse.json\\\";\\n let oldfile = \\\"hiker://files/cache/MyParseSet.json\\\";\\n if (fileExist(file)) {\\n eval('json=' + fetch(file));\\n let jsUrl = json.settings.cj;\\n eval(fetch(jsUrl));\\n return setUrl;\\n } else if (fileExist(oldfile)) {\\n let jsUrl = JSON.parse(fetch(oldfile)).cj;\\n eval(fetch(jsUrl));\\n return setUrl;\\n } else {\\n return \\\"hiker://page/Route?rule=MyFieldᴰⁿ&type=设置\\\";\\n }\\n })\\n }\\n }\\n }\\n writeFile(getVar('qdb_config'), JSON.stringify(defaultConfigs));\\n refreshPage();\\n return \\\"toast://已恢复默认设置\\\";\\n })\\n})\\nd.push({\\n title: '若重生不起作用,点我复制错误信息提交给开发者',\\n col_type: 'text_1',\\n url: 'copy://' + e.message\\n})\\nsetResult(d);\"},{\"col_type\":\"movie_3\",\"name\":\"顺佬专用详情页\",\"path\":\"Sdetail\",\"rule\":\"js:\\nputVar('qdb_file', 'hiker://files/rules/joker/qdb.js');\\neval(fetch(getVar(\\\"qdb_file\\\")));\\npre();\\nlet type = getParam('type', ''),\\n id = getParam('id', '');\\ndetailsView(type, id);\"}]","proxy":"","icon":"https://gitcode.net/qq_41846756/hiker/-/raw/master/img/青豆.png"},{"last_chapter_rule":"","title":"本地资源管理","author":"@LoyDgIk","version":71,"type":"tool","url":"hiker://empty","col_type":"movie_3_marquee","class_name":"","class_url":"","area_name":"","area_url":"","sort_name":"","year_name":"","sort_url":"","year_url":"","find_rule":"js:\n\nif (!getItem(\":startUse\", false)) {\n toast(\":-)初次见面,请多关照\");\n confirm({\n title: \"使用须知\",\n content: \"1.普通用户:本程序只提供本地阅读服务,不提供网络内容。\\n\\n2.开发者:提供多线程下载支持。\\n\\n3.如何获取内容?\\n通过「聚漫」「道长合集」等第三方小程序下载。\",\n confirm: \"setItem(':startUse','1');refreshPage();'toast://感谢您的理解'\",\n cancel: \"'toast://很遗憾,不能为您服务。\\\\n长按标题可删除。'\"\n });\n setResult([]);\n} else if (MY_RULE.title !== \"本地资源管理\") {\n confirm({\n title: \"警告⚠\",\n content: \"不能改名哦!\",\n confirm: $.toString(() => {\n MY_RULE.title = \"本地资源管理\";\n toast(\"已帮你改回原名,请重新导入\");\n return \"rule://\" + base64Encode(\"海阔视界¥home_rule¥\" + JSON.stringify(MY_RULE));\n }),\n cancel: \"'toast://很遗憾,不能为您服务。\\\\n长按标题可删除。'\"\n });\n setResult([]);\n} else {\n $.require(\"hiker://page/Main.view\");\n}","searchFind":"","search_url":"","group":"①推荐","detail_col_type":"movie_1","detail_find_rule":"","sdetail_col_type":"movie_1","sdetail_find_rule":"","ua":"mobile","preRule":"","pages":"[{\"col_type\":\"movie_3\",\"name\":\"#f.File工具\",\"path\":\"File.js\",\"rule\":\"const File = java.io.File;\\nconst {\\n Files,\\n Paths,\\n StandardCopyOption,\\n StandardOpenOption\\n} = java.nio.file;\\nconst javaString = java.lang.String;\\nlet javaScope = new JavaImporter(java.io, java.lang, java.lang.reflect, java.util.Vector);\\n\\nfunction deleteFiles(fileName) {\\n let file = new File(fileName);\\n if (!file.exists()) {\\n //log(\\\"删除文件失败:\\\" + fileName + \\\"文件不存在\\\");\\n return false;\\n } else {\\n if (file.isFile()) {\\n return deleteFile(fileName);\\n } else {\\n return deleteDirectory(fileName);\\n }\\n\\n }\\n\\n}\\n/**\\n * 删除单个文件\\n * \\n * @param fileName\\n * 被删除文件的文件名\\n * @return 单个文件删除成功返回true,否则返回false\\n */\\nfunction deleteFile(fileName) {\\n let file = new File(fileName);\\n if (file.isFile() && file.exists()) {\\n file.delete();\\n //log(\\\"删除单个文件\\\" + fileName + \\\"成功!\\\");\\n return true;\\n } else {\\n //log(\\\"删除单个文件\\\" + fileName + \\\"失败!\\\");\\n return false;\\n }\\n\\n}\\n/**\\n * 删除目录(文件夹)以及目录下的文件\\n * \\n * @param dir\\n * 被删除目录的文件路径\\n * @return 目录删除成功返回true,否则返回false\\n */\\nfunction deleteDirectory(dir) {\\n // 如果dir不以文件分隔符结尾,自动添加文件分隔符\\n if (!dir.endsWith(File.separator)) {\\n dir = dir + File.separator;\\n }\\n let dirFile = new File(dir);\\n // 如果dir对应的文件不存在,或者不是一个目录,则退出\\n if (!dirFile.exists() || !dirFile.isDirectory()) {\\n //log(\\\"删除目录失败\\\" + dir + \\\"目录不存在!\\\");\\n return false;\\n }\\n let flag = true;\\n // 删除文件夹下的所有文件(包括子目录)\\n let files = dirFile.listFiles();\\n for (let i = 0; i < files.length; i++) {\\n // 删除子文件\\n if (files[i].isFile()) {\\n flag = deleteFile(files[i].getAbsolutePath());\\n if (!flag) {\\n break;\\n }\\n } else { // 删除子目录\\n flag = deleteDirectory(files[i].getAbsolutePath());\\n if (!flag) {\\n break;\\n }\\n }\\n }\\n if (!flag) {\\n //log(\\\"删除目录失败\\\");\\n return false;\\n }\\n // 删除当前目录\\n if (dirFile.delete()) {\\n //log(\\\"删除目录\\\" + dir + \\\"成功!\\\");\\n return true;\\n } else {\\n //log(\\\"删除目录\\\" + dir + \\\"失败!\\\");\\n return false;\\n }\\n}\\n\\n//copy单个文件\\nfunction copyFile(source, target, isCover) {\\n let sourcePath = Paths.get(source);\\n let targetPath = Paths.get(target);\\n let isExist = Files.exists(targetPath);\\n if (Files.isDirectory(sourcePath) || (isExist && !isCover) || (isExist && Files.isDirectory(targetPath))) {\\n return false;\\n }\\n try {\\n if (!isExist) {\\n Files.createDirectories(targetPath.getParent());\\n }\\n if (isCover === true) {\\n Files.copy(sourcePath, targetPath, StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES);\\n } else {\\n Files.copy(sourcePath, targetPath, StandardCopyOption.COPY_ATTRIBUTES);\\n }\\n } catch (e) {\\n return false;\\n }\\n}\\n\\nfunction getFileTime(path) {\\n let file = new File(path);\\n let lastModified = file.lastModified();\\n let date = new Date(lastModified);\\n return date.getTime();\\n}\\n\\nfunction getName(path) {\\n return new File(path).getName() + \\\"\\\";\\n}\\n\\nfunction getFilePath(path, type, expand) {\\n type = type || \\\"file\\\";\\n if (![\\\"file\\\", \\\"dir\\\"].includes(type)) throw new Error(\\\"类型错误\\\");\\n let fileType = type === \\\"file\\\" ? \\\"isFile\\\" : \\\"isDirectory\\\";\\n let file = new File(path);\\n let array = file.listFiles() || [];\\n let pathList = [];\\n for (let i = 0; i < array.length; i++) {\\n if (array[i][fileType]()) {\\n pathList.push({\\n name: array[i].getName() + \\\"\\\",\\n path: array[i].getPath() + \\\"\\\",\\n lastModified: Number(array[i].lastModified()),\\n\\n });\\n }\\n }\\n if (expand) {\\n pathList = pathList.filter(it => it.name.endsWith(expand));\\n }\\n return pathList;\\n}\\n\\nfunction renameFile(fromPath, name) {\\n let fromFile = new File(fromPath);\\n let toFile = new File(fromFile.getParent() + \\\"/\\\" + name);\\n try {\\n if (!fromFile.exists()) {\\n return false;\\n }\\n if (toFile.exists()) {\\n if (!deleteFlies(toPath)) {\\n return false;\\n }\\n }\\n Files.move(fromFile.toPath(), toFile.toPath(), StandardCopyOption.REPLACE_EXISTING);\\n return true;\\n } catch (e) {\\n log(e.toString());\\n return false;\\n }\\n}\\n\\nfunction moveFiles(fromPath, toPath) {\\n let fromFile = new File(fromPath);\\n let toFile = new File(toPath);\\n try {\\n if (!fromFile.exists()) {\\n return false;\\n }\\n if (toFile.exists()) {\\n if (!deleteFlies(toPath)) {\\n return false;\\n }\\n }\\n Files.move(fromFile.toPath(), toFile.toPath(), StandardCopyOption.REPLACE_EXISTING);\\n return true;\\n } catch (e) {\\n log(e.toString());\\n return false;\\n }\\n}\\n\\nfunction fileWrite(path, content) {\\n writeFile(\\\"file://\\\" + path, content)\\n}\\n\\nfunction fileWriteAppend(path, content) {\\n let file = new File(path);\\n let paths = file.toPath();\\n if (file.exists()) {\\n Files.write(paths, new javaString(content).getBytes(), StandardOpenOption.APPEND);\\n } else {\\n writeFile(\\\"file://\\\" + path, content);\\n }\\n}\\n\\nfunction getTotalSizeOfFilesInDir(file) {\\n if (file.isFile()) {\\n return file.length();\\n }\\n let children = file.listFiles();\\n let total = 0;\\n if (children != null) {\\n for (let child of children) {\\n total += getTotalSizeOfFilesInDir(child);\\n }\\n }\\n return total;\\n}\\n\\nfunction getFileSize(filePath) {\\n //Byte\\n let size = getTotalSizeOfFilesInDir(new File(filePath));\\n if (size < 0) {\\n return null;\\n }\\n let unitForm = [\\\"Byte\\\", \\\"KB\\\", \\\"MB\\\", \\\"GB\\\", \\\"TB\\\"];\\n for (let i = 0, len = unitForm.length; i < len; i++) {\\n if (size > 1024) {\\n size /= 1024;\\n continue;\\n } else {\\n return size.toFixed(2).replace(/(\\\\.00)$/, \\\"\\\") + unitForm[i];\\n }\\n }\\n return \\\"ERROR:数值过大\\\";\\n}\\n//完整合并\\n/*\\nfunction fileCombine(filesInput, fileOut, extension, intercept) {\\n with(javaScope) {\\n const TMP_BUFFER_SIZE = 0x30000;\\n const BUFFER_SIZE = 0x300000;\\n //合并临时文件\\n let inputFile = new File(filesInput);\\n let tmpFile = new File(fileOut + \\\".tmp\\\");\\n let tos = new BufferedOutputStream(new FileOutputStream(tmpFile));\\n let inputFiles = inputFile.listFiles();\\n let tbys = Array.newInstance(Byte.TYPE, TMP_BUFFER_SIZE);\\n for (let file of inputFiles) {\\n if (file.getName().endsWith(extension)) {\\n let is = new FileInputStream(file);\\n let len = 0;\\n while ((len = is.read(tbys)) != -1) {\\n tos.write(tbys, 0, len);\\n }\\n is.close();\\n }\\n }\\n tos.close();\\n //规则替换规则;\\n let outFile = new File(fileOut);\\n if (typeof intercept === \\\"function\\\") {\\n let tis = new FileInputStream(tmpFile);\\n let os = new BufferedOutputStream(new FileOutputStream(outFile));\\n let len = 0;\\n let bys = Array.newInstance(Byte.TYPE, BUFFER_SIZE);\\n while ((len = tis.read(bys)) != -1) {\\n let nbys = intercept(new String(bys,0,len));\\n os.write(nbys, 0, nbys.length);\\n }\\n tmpFile.delete();\\n tis.close();\\n os.close();\\n } else {\\n if (outFile.exists()) {\\n outFile.delete();\\n }\\n tmpFile.renameTo(outFile);\\n }\\n }\\n}*/\\n//残\\nfunction fileRule(filesInput, fileOut, intercept) {\\n with(javaScope) {\\n const BUFFER_SIZE = 0x300000;\\n let tmpFile = new File(filesInput);\\n if (!(tmpFile.exists() && tmpFile.isFile())) {\\n return false;\\n }\\n let outFile = new File(fileOut);\\n\\n let tis = new FileInputStream(tmpFile);\\n let os = new BufferedOutputStream(new FileOutputStream(outFile));\\n let len = 0;\\n let bys = Array.newInstance(Byte.TYPE, BUFFER_SIZE);\\n while ((len = tis.read(bys)) != -1) {\\n let nbys = intercept(new String(bys, 0, len));\\n os.write(nbys, 0, nbys.length);\\n }\\n tmpFile.delete();\\n tis.close();\\n os.close();\\n return true;\\n }\\n}\\n\\nfunction readFile(path) {\\n try {\\n let paths = Paths.get(path);\\n if (!Files.exists(paths)) return \\\"\\\";\\n return String(new javaString(Files.readAllBytes(paths)));\\n } catch {\\n return \\\"\\\";\\n }\\n}\\n$.exports = {\\n getFileTime: (path) => getFileTime(path),\\n getFilePath: (path, type, expand) => getFilePath(path, type, expand),\\n deleteFiles: (path) => deleteFiles(path),\\n renameFile: (path, name) => renameFile(path, name),\\n moveFiles: (fromPath, toPath) => moveFiles(fromPath, toPath),\\n fileWrite: (path, content) => fileWrite(path, content),\\n fileWriteAppend: (path, content) => fileWriteAppend(path, content),\\n getName: (path) => getName(path),\\n getFileSize: (filePath) => getFileSize(filePath),\\n fileRule: (filesInput, fileOut, intercept) => fileRule(filesInput, fileOut, intercept),\\n copyFile: (source, target, isCover) => copyFile(source, target, isCover),\\n readFile: (path) => readFile(path)\\n}\"},{\"col_type\":\"text_2\",\"name\":\"#v.下载列表-普通下载\",\"path\":\"download.view\",\"rule\":\"js:\\nconst viewConfig = Object.assign({\\n chapterList: [],\\n info: {},\\n defaultView: \\\"0\\\"\\n}, MY_PARAMS);\\nviewConfig.info = Object.assign({\\n ruleName: \\\"\\\",\\n bookName: \\\"\\\",\\n bookTopPic: \\\"\\\",\\n parseCode: \\\"\\\",\\n type: \\\"comic\\\",\\n}, viewConfig.info);\\nlet {\\n chapterList,\\n info,\\n defaultView\\n} = viewConfig;\\nsetPageTitle(\\\"选择器|\\\" + info.bookName)\\n\\nconst File = $.require(\\\"hiker://page/File.js\\\");\\nconst Tool = $.require(\\\"hiker://page/Tool.js\\\");\\nconst Config = $.require(\\\"hiker://page/Config.json\\\");\\n\\nconst def_DoVi_Style = Config.def_DoVi_Style;\\nconst MY_ID = info.ruleName + \\\"//\\\" + info.bookName;\\n\\n\\nlet isStart = getMyVar(MY_ID + \\\":isStart\\\");\\nlet viewMode = getMyVar(MY_ID + \\\":viewMode\\\", defaultView);\\nlet isReverse = getMyVar(MY_ID + \\\":isReverse\\\", \\\"0\\\");\\nlet tagFilter = getMyVar(MY_ID + \\\":tagFilter\\\", Config.def_DoVi_Type);\\n\\naddListener(\\\"onClose\\\", $.toString((MY_ID) => {\\n clearMyVar(MY_ID + \\\":loadingTeam\\\");\\n clearMyVar(MY_ID + \\\":viewMode\\\");\\n clearMyVar(MY_ID + \\\":completed\\\");\\n clearMyVar(MY_ID + \\\":batchTeam\\\");\\n clearMyVar(MY_ID + \\\":tagFilter\\\");\\n clearMyVar(MY_ID + \\\":pageNum\\\");\\n}, MY_ID));\\n\\nlet layout = [];\\n\\nif (isStart === \\\"1\\\") {\\n putMyVar(MY_ID + \\\":viewMode\\\", defaultView);\\n viewMode = \\\"1\\\";\\n}\\n\\nlet backupChapterList = chapterList;\\nif (typeof chapterList === \\\"string\\\") {\\n chapterList = JSON.parse(request(\\\"file://\\\" + chapterList) || \\\"[]\\\");\\n}\\nlet chapterAll = chapterList;\\nchapterList = chapterList.map((item, CID) => {\\n item.CID = CID;\\n return item;\\n});\\nlet pageNum = Number(getMyVar(MY_ID + \\\":pageNum\\\", \\\"1\\\"));\\nlet chapterChunk = [chapterList].concat(Tool.chunk(chapterList, Config.viewPageSize));\\nchapterList = chapterChunk[pageNum] || [];\\n\\nfunction setType() {\\n let set = (tag, put) => {\\n putMyVar(put, tag);\\n refreshPage(false);\\n return \\\"hiker://empty\\\"\\n };\\n layout.push({\\n title: 0 == pageNum ? \\\"““””\\\" + (\\\"全部(\\\" + chapterAll.length + \\\")\\\").fontcolor(\\\"#23AD6F\\\") : \\\"全部(\\\" + chapterAll.length + \\\")\\\",\\n url: $(\\\"#noLoading#\\\").lazyRule(set, 0, MY_ID + \\\":pageNum\\\"),\\n col_type: \\\"scroll_button\\\"\\n });\\n for (let i = 1; i < chapterChunk.length; i++) {\\n let tagText = (i - 1) * Config.viewPageSize + \\\"-\\\" + ((i - 1) * Config.viewPageSize + chapterChunk[i].length);\\n layout.push({\\n title: i == pageNum ? \\\"““””\\\" + tagText.fontcolor(\\\"#23AD6F\\\") : tagText,\\n url: $(\\\"#noLoading#\\\").lazyRule(set, i, MY_ID + \\\":pageNum\\\"),\\n col_type: \\\"scroll_button\\\"\\n });\\n }\\n layout.push({\\n col_type: \\\"blank_block\\\"\\n });\\n layout.push({\\n title: tagFilter === \\\"0\\\" ? \\\"““””\\\" + \\\"全部\\\".fontcolor(\\\"#23AD6F\\\") : \\\"全部\\\",\\n url: $(\\\"#noLoading#\\\").lazyRule(set, \\\"0\\\", MY_ID + \\\":tagFilter\\\"),\\n col_type: \\\"scroll_button\\\"\\n });\\n layout.push({\\n title: tagFilter === \\\"1\\\" ? \\\"““””\\\" + \\\"未下载\\\".fontcolor(\\\"#23AD6F\\\") : \\\"未下载\\\",\\n url: $(\\\"#noLoading#\\\").lazyRule(set, \\\"1\\\", MY_ID + \\\":tagFilter\\\"),\\n col_type: \\\"scroll_button\\\"\\n });\\n layout.push({\\n title: tagFilter === \\\"2\\\" ? \\\"““””\\\" + \\\"已下载\\\".fontcolor(\\\"#23AD6F\\\") : \\\"已下载\\\",\\n url: $(\\\"#noLoading#\\\").lazyRule(set, \\\"2\\\", MY_ID + \\\":tagFilter\\\"),\\n col_type: \\\"scroll_button\\\"\\n });\\n}\\nlet chapterTeam = [];\\nlet record = [];\\nif (info.type === \\\"comic\\\") {\\n let lazy = $(\\\"#noLoading#\\\").lazyRule(() => {\\n const File = $.require(\\\"hiker://page/File.js\\\");\\n let filelist = File.getFilePath(input);\\n let piclist = filelist.map((item, i) => \\\"file://\\\" + input + \\\"/\\\" + (i + 1) + \\\".jpg\\\");\\n return \\\"pics://\\\" + piclist.join(\\\"&&\\\");\\n });\\n\\n function comFun(i, item) {\\n let rootPath = Config.comicPath + \\\"/\\\" + info.ruleName + \\\"/\\\" + info.bookName + \\\"/\\\" + i + \\\"$A$\\\" + item.title;\\n return {\\n title: \\\"““\\\" + item.title + \\\"””\\\",\\n url: rootPath + lazy,\\n extra: {\\n id: MY_ID + \\\"#\\\" + i,\\n },\\n col_type: def_DoVi_Style\\n }\\n }\\n File.getFilePath(Config[info.type + \\\"Path\\\"] + \\\"/\\\" + info.ruleName + \\\"/\\\" + info.bookName, \\\"dir\\\").forEach((file) => {\\n let att = Tool.split(file.name, \\\"$\\\", 2);\\n if (att.length === 3 && att[1] === (\\\"A\\\")) {\\n record.push(att[2]);\\n }\\n });\\n} else {\\n function comFun(i, item) {\\n return {\\n title: \\\"““\\\" + item.title + \\\"””\\\",\\n url: \\\"hiker://page/NovelMainBody#autoPage##readTheme#\\\",\\n extra: {\\n id: MY_ID + \\\"#\\\" + i,\\n path: Config.novelPath + \\\"/\\\" + info.ruleName + \\\"/\\\" + info.bookName + \\\"/\\\" + i + \\\"$A$\\\" + item.title + \\\".txt\\\",\\n title: item.title\\n },\\n col_type: def_DoVi_Style\\n }\\n }\\n File.getFilePath(Config[info.type + \\\"Path\\\"] + \\\"/\\\" + info.ruleName + \\\"/\\\" + info.bookName, \\\"file\\\", \\\".txt\\\").forEach((file) => {\\n let att = Tool.split(file.name, \\\"$\\\", 2);\\n if (att.length === 3 && att[1] === (\\\"A\\\")) {\\n record.push(att[2].slice(0, att[2].lastIndexOf(\\\".\\\")));\\n }\\n });\\n}\\n\\nfunction clickDownload(item, info, MY_ID, i) {\\n let loadingTeam = JSON.parse(getMyVar(MY_ID + \\\":loadingTeam\\\", \\\"[]\\\") || \\\"[]\\\");\\n let ElementIndex = loadingTeam.indexOf(i);\\n if (ElementIndex > -1) return \\\"toast://正在下载\\\";\\n\\n loadingTeam.push(i);\\n putMyVar(MY_ID + \\\":loadingTeam\\\", JSON.stringify(loadingTeam));\\n updateItem({\\n title: \\\"‘‘\\\" + item.title + \\\"’’\\\",\\n extra: {\\n id: MY_ID + \\\"#\\\" + i\\n }\\n });\\n let result = \\\"toast://下载失败\\\";\\n try {\\n toast(\\\"开始下载:\\\" + item.title);\\n let download = $.require(\\\"hiker://page/Download.exe.js\\\");\\n result = download(item, info, MY_ID, i);\\n updateItem({\\n title: \\\"““\\\" + item.title + \\\"””\\\",\\n url: \\\"toast://已下载\\\",\\n extra: {\\n id: MY_ID + \\\"#\\\" + i\\n }\\n });\\n } catch (e) {\\n updateItem({\\n title: item.title,\\n extra: {\\n id: MY_ID + \\\"#\\\" + i\\n }\\n });\\n log(e.toString());\\n } finally {\\n loadingTeam.splice(ElementIndex, 1);\\n putMyVar(MY_ID + \\\":loadingTeam\\\", JSON.stringify(loadingTeam));\\n }\\n return result;\\n}\\n\\nfunction singleView() {\\n layout.push({\\n title: \\\"反转列表\\\",\\n url: $(\\\"#noLoading#\\\").lazyRule((isReverse, MY_ID) => {\\n putMyVar(MY_ID + \\\":isReverse\\\", isReverse === \\\"0\\\" ? \\\"1\\\" : \\\"0\\\");\\n refreshPage(false);\\n return \\\"hiker://empty\\\";\\n }, isReverse, MY_ID),\\n pic_url: \\\"https://img.icons8.com/?id=33nvDqbHH7HW&size=48&format=gif&token=\\\",\\n col_type: \\\"icon_2\\\"\\n });\\n layout.push({\\n title: \\\"批量下载\\\",\\n url: $(\\\"#noLoading#\\\").lazyRule((MY_ID) => {\\n let loadingTeam = JSON.parse(getMyVar(MY_ID + \\\":loadingTeam\\\", \\\"[]\\\") || \\\"[]\\\");\\n if (loadingTeam.length > 0) return \\\"toast://还有任务没有完成\\\";\\n if (getAppVersion() < 2594) return \\\"toast://未开放\\\";\\n putMyVar(MY_ID + \\\":viewMode\\\", \\\"1\\\");\\n refreshPage(false);\\n return \\\"hiker://empty\\\";\\n\\n }, MY_ID),\\n pic_url: \\\"https://img.icons8.com/?format=gif&id=0uafaMNzxj88&token=\\\",\\n col_type: \\\"icon_2\\\"\\n });\\n setType();\\n layout.push({\\n col_type: \\\"line_blank\\\"\\n });\\n let loadingTeam = JSON.parse(getMyVar(MY_ID + \\\":loadingTeam\\\", \\\"[]\\\") || \\\"[]\\\");\\n for (let i = 0, item = chapterList[0]; i < chapterList.length; item = chapterList[++i]) {\\n let is_download = record.includes(item.title);\\n if (is_download && tagFilter !== \\\"1\\\") {\\n chapterTeam.push(comFun(item.CID, item));\\n } else if (!is_download && tagFilter !== \\\"2\\\") {\\n chapterTeam.push({\\n title: loadingTeam.includes(item.CID) ? \\\"‘‘\\\" + item.title + \\\"’’\\\" : item.title,\\n url: $(\\\"#noLoading#\\\").lazyRule(clickDownload, item, info, MY_ID, item.CID),\\n extra: {\\n id: MY_ID + \\\"#\\\" + item.CID\\n },\\n col_type: def_DoVi_Style\\n });\\n }\\n }\\n}\\n\\nfunction clickChoose(title, MY_ID, i) {\\n let isStart = getMyVar(MY_ID + \\\":isStart\\\");\\n if (isStart === \\\"1\\\") return \\\"toast://正在下载...\\\";\\n let batchTeam = JSON.parse(getMyVar(MY_ID + \\\":batchTeam\\\", \\\"[]\\\") || \\\"[]\\\");\\n let ElementIndex = batchTeam.indexOf(i);\\n if (ElementIndex > -1) {\\n updateItem({\\n title: title,\\n extra: {\\n id: MY_ID + \\\"#\\\" + i\\n }\\n });\\n batchTeam.splice(ElementIndex, 1);\\n } else {\\n updateItem({\\n title: \\\"‘‘\\\" + title + \\\"’’\\\",\\n extra: {\\n id: MY_ID + \\\"#\\\" + i\\n }\\n });\\n batchTeam.push(i);\\n }\\n putMyVar(MY_ID + \\\":batchTeam\\\", JSON.stringify(batchTeam));\\n return \\\"hiker://empty\\\";\\n}\\n\\nfunction batchView() {\\n layout.push({\\n title: \\\"单选下载\\\",\\n pic_url: \\\"https://img.icons8.com/?id=PIicvF6ebzMn&size=48&format=gif&token=\\\",\\n url: $(\\\"#noLoading#\\\").lazyRule((MY_ID) => {\\n if (getMyVar(MY_ID + \\\":isStart\\\") === \\\"1\\\") return \\\"toast://正在批量下载\\\";\\n putMyVar(MY_ID + \\\":viewMode\\\", \\\"0\\\");\\n clearMyVar(MY_ID + \\\":batchTeam\\\");\\n refreshPage(false);\\n return \\\"hiker://empty\\\";\\n }, MY_ID),\\n col_type: \\\"icon_small_4\\\"\\n });\\n let start = Config.viewPageSize * Math.max(pageNum - 1, 0);\\n let end = start + chapterList.length;\\n layout.push({\\n title: \\\"选择全部\\\",\\n pic_url: \\\"https://img.icons8.com/?format=gif&id=1HVcHLoNzrit&token=\\\",\\n url: $(\\\"#noLoading#\\\").lazyRule((start, end, MY_ID) => {\\n const Tool = $.require(\\\"hiker://page/Tool.js\\\");\\n let chooseTeam = Tool.range(start, end);\\n let batchTeam = JSON.parse(getMyVar(MY_ID + \\\":batchTeam\\\", \\\"[]\\\") || \\\"[]\\\");\\n batchTeam = Array.from(new Set(batchTeam.concat(chooseTeam)));\\n let completed = JSON.parse(getMyVar(MY_ID + \\\":completed\\\", \\\"[]\\\") || \\\"[]\\\");\\n batchTeam = batchTeam.filter((i) => !completed.includes(i));\\n putMyVar(MY_ID + \\\":batchTeam\\\", JSON.stringify(batchTeam));\\n refreshPage(false);\\n return \\\"hiker://empty\\\"\\n }, start, end, MY_ID),\\n col_type: \\\"icon_small_4\\\"\\n });\\n layout.push({\\n title: \\\"取消全部\\\",\\n pic_url: \\\"https://img.icons8.com/?format=gif&id=HzEjPpI3NL8D&token=\\\",\\n url: $(\\\"#noLoading#\\\").lazyRule((start, end, MY_ID) => {\\n const Tool = $.require(\\\"hiker://page/Tool.js\\\");\\n let chooseTeam = new Set(Tool.range(start, end));\\n let batchTeam = JSON.parse(getMyVar(MY_ID + \\\":batchTeam\\\", \\\"[]\\\") || \\\"[]\\\");\\n batchTeam = batchTeam.filter(x => !chooseTeam.has(x));\\n putMyVar(MY_ID + \\\":batchTeam\\\", JSON.stringify(batchTeam));\\n refreshPage(false);\\n return \\\"hiker://empty\\\"\\n }, start, end, MY_ID),\\n col_type: \\\"icon_small_4\\\"\\n });\\n layout.push({\\n title: \\\"确认选中\\\",\\n pic_url: \\\"https://img.icons8.com/?format=gif&id=tMrvtc6T9hVb&token=\\\",\\n url: $(\\\"#noLoading#\\\").lazyRule((MY_ID) => {\\n if (getMyVar(MY_ID + \\\":isStart\\\", \\\"-1\\\") !== \\\"-1\\\") {\\n return \\\"toast://正在下载...\\\";\\n }\\n let batchTeam = JSON.parse(getMyVar(MY_ID + \\\":batchTeam\\\", \\\"[]\\\") || \\\"[]\\\");\\n return batchTeam.length === 0 ? \\\"toast://你还什么都没有选\\\" : \\\"hiker://page/Batch.view#noRefresh##noHistory##noRecordHistory#\\\";\\n }, MY_ID),\\n extra: {\\n newWindow: true,\\n windowId: MY_ID + \\\"//批量下载\\\",\\n MY_ID: MY_ID,\\n chapterList: backupChapterList,\\n info: info\\n },\\n col_type: \\\"icon_small_4\\\"\\n });\\n setType();\\n layout.push({\\n col_type: \\\"line_blank\\\"\\n });\\n let batchTeam = JSON.parse(getMyVar(MY_ID + \\\":batchTeam\\\", \\\"[]\\\") || \\\"[]\\\");\\n let completed = [];\\n for (let i = 0, item = chapterList[0]; i < chapterList.length; item = chapterList[++i]) {\\n let is_download = record.includes(item.title);\\n if (is_download && tagFilter !== \\\"1\\\") {\\n completed.push(item.CID);\\n chapterTeam.push(comFun(item.CID, item));\\n } else if (!is_download && tagFilter !== \\\"2\\\") {\\n chapterTeam.push({\\n title: batchTeam.includes(item.CID) ? \\\"‘‘\\\" + item.title + \\\"’’\\\" : item.title,\\n url: $(\\\"#noLoading#\\\").lazyRule(clickChoose, item.title, MY_ID, item.CID),\\n extra: {\\n id: MY_ID + \\\"#\\\" + item.CID\\n },\\n col_type: def_DoVi_Style\\n });\\n }\\n }\\n putMyVar(MY_ID + \\\":completed\\\", JSON.stringify(completed));\\n}\\nswitch (viewMode) {\\n case \\\"0\\\":\\n singleView();\\n break;\\n case \\\"1\\\":\\n batchView();\\n break;\\n}\\nif (isReverse === \\\"1\\\") {\\n chapterTeam.reverse();\\n}\\nlayout.push.apply(layout, chapterTeam);\\nsetResult(layout);\"},{\"col_type\":\"movie_3\",\"name\":\"#v.批量下载器\",\"path\":\"Batch.view\",\"rule\":\"js:\\nlet {\\n chapterList,\\n info,\\n MY_ID\\n} = MY_PARAMS;\\nsetPageTitle(\\\"下载器|\\\"+info.bookName);\\naddListener(\\\"onClose\\\", $.toString((MY_ID) => {\\n clearMyVar(MY_ID + \\\":isStart\\\");\\n clearMyVar(MY_ID + \\\":status\\\");\\n clearMyVar(MY_ID + \\\":batchTeam\\\");\\n refreshPage();\\n}, MY_ID));\\n\\nlet isStart = getMyVar(MY_ID + \\\":isStart\\\", \\\"0\\\");\\nlet status = getMyVar(MY_ID + \\\":status\\\", \\\"0\\\");\\nlet layout = [];\\n\\nlet batchTeam = JSON.parse(getMyVar(MY_ID + \\\":batchTeam\\\", \\\"[]\\\") || \\\"[]\\\");\\nif(typeof chapterList === \\\"string\\\"){\\n chapterList = JSON.parse(request(\\\"file://\\\"+chapterList)||\\\"[]\\\");\\n}\\nlet chapterTeam = batchTeam.map(v => {\\n let chapterItem = chapterList[v];\\n chapterItem.CID = v;\\n return chapterItem;\\n});\\nif (isStart === \\\"0\\\") {\\n layout.push({\\n title: \\\"开始下载[\\\" + chapterTeam.length + \\\"]\\\",\\n url: $(\\\"#noLoading#\\\").lazyRule((chapterTeam, info, MY_ID) => {\\n putMyVar(MY_ID + \\\":isStart\\\", \\\"1\\\");\\n refreshPage(false);\\n let download = $.require(\\\"hiker://page/BatchStatistics.js\\\");\\n return download(chapterTeam, info, MY_ID) || \\\"toast://下载错误\\\";\\n }, chapterTeam, info, MY_ID),\\n col_type: \\\"text_center_1\\\",\\n extra: {\\n id: MY_ID + \\\"||开始下载\\\"\\n }\\n });\\n layout.push({\\n title: \\\"任务列表:\\\",\\n col_type: \\\"rich_text\\\",\\n });\\n for (let item of chapterTeam) {\\n layout.push({\\n title: item.title,\\n url: \\\"hiker://empty\\\",\\n col_type: \\\"text_2\\\"\\n });\\n }\\n\\n} else {\\n layout.push({\\n title: \\\"下载进度:0/\\\"+chapterTeam.length,\\n desc: \\\"““””▇▇▇▇▇▇▇▇▇▇\\\".fontcolor(\\\"#e5e1e4\\\")+\\\" 0%\\\",\\n url: \\\"hiker://empty\\\",\\n col_type: \\\"text_center_1\\\",\\n extra: {\\n id: MY_ID + \\\"||下载进度\\\",\\n lineVisible: false\\n }\\n });\\n layout.push({\\n title: \\\"后台下载\\\",\\n url: \\\"func://background\\\",\\n col_type: \\\"text_2\\\"\\n });\\n\\n layout.push({\\n title: [\\\"[取消下载]\\\", \\\"[正在停止...]\\\", \\\"[返回]\\\", \\\"[处理失败]\\\", \\\"[重新开始]\\\"][status],\\n url: $(\\\"#noLoading#\\\").lazyRule((MY_ID) => {\\n let status = getMyVar(MY_ID + \\\":status\\\", \\\"0\\\");\\n if (status === \\\"0\\\") {\\n putMyVar(MY_ID + \\\":status\\\", \\\"1\\\");\\n updateItem({\\n title: \\\"[正在停止...]\\\",\\n extra: {\\n id: MY_ID + \\\"||下载控制\\\"\\n }\\n });\\n return \\\"toast://正在取消下载任务\\\";\\n } else if (status === \\\"1\\\") {\\n return \\\"toast://正在暂停...\\\";\\n } else if (status === \\\"2\\\") {\\n back();\\n return \\\"toast://已退出下载器\\\";\\n } else if ([\\\"3\\\", \\\"4\\\"].includes(status)) {\\n clearMyVar(MY_ID + \\\":isStart\\\");\\n clearMyVar(MY_ID + \\\":status\\\");\\n clearMyVar(MY_ID + \\\":log\\\");\\n refreshPage();\\n return \\\"toast://重新点击下载\\\"\\n }\\n }, MY_ID),\\n col_type: \\\"text_2\\\",\\n extra: {\\n id: MY_ID + \\\"||下载控制\\\"\\n }\\n });\\n layout.push({\\n col_type: \\\"line_blank\\\"\\n });\\n layout.push({\\n title: \\\"下载日志\\\".big(),\\n col_type: \\\"rich_text\\\",\\n \\n });\\n layout.push({\\n col_type: \\\"line\\\",\\n extra: {\\n id: MY_ID + \\\"||日志\\\"\\n }\\n });\\n layout.push({\\n title:\\\"““””$>\\\"+\\\"开始下载......\\\".fontcolor(\\\"#00ff00\\\"),\\n url:\\\"hiker://empty\\\",\\n col_type: \\\"text_1\\\",\\n extra: {\\n id: MY_ID + \\\"#log#0\\\",\\n lineVisible:false\\n }\\n });\\n}\\n\\nsetResult(layout);\"},{\"col_type\":\"movie_3\",\"name\":\"#fg.批量下载统计\",\"path\":\"BatchStatistics.js\",\"rule\":\"const Tool = $.require(\\\"hiker://page/Tool.js\\\");\\nconst Config = $.require(\\\"hiker://page/Config.json\\\");\\n\\nfunction task(taskParam) {\\n let result = $.require(\\\"hiker://page/Batch.exe.js\\\")(taskParam);\\n return result;\\n}\\n\\n$.exports = function(chapterTeam, info, MY_ID) {\\n if (chapterTeam.length === 0) {\\n return \\\"toast://空的下载队列\\\";\\n }\\n var count = 0;\\n var taskCount = chapterTeam.length;\\n var successCID = [];\\n var failName = [];\\n var logCount = 1;\\n var taskTeam = chapterTeam.map(chapterItem => ({\\n func: task,\\n id: chapterItem.title,\\n param: {\\n chapterItem: chapterItem,\\n info: info,\\n MY_ID: MY_ID\\n }\\n }));\\n let logNum = Config.logNum;\\n\\n function putLog(text) {\\n log(text);\\n if (logCount >= logNum) {\\n deleteItem(MY_ID + \\\"#log#\\\" + (logCount - 10));\\n }\\n addItemAfter(MY_ID + \\\"||日志\\\", {\\n url: \\\"hiker://empty\\\",\\n title: \\\"$>\\\" + text,\\n col_type: \\\"text_1\\\",\\n extra: {\\n lineVisible: false,\\n id: MY_ID + \\\"#log#\\\" + logCount\\n }\\n });\\n logCount++;\\n }\\n\\n function listener(perch, id, error, CID) {\\n count++;\\n let isSuccess = false;\\n if (error !== null) {\\n failName.push(id);\\n putLog(\\\"[listener]下载失败:\\\" + id + \\\"\\\");\\n } else if (CID >= 0) {\\n successCID.push(CID);\\n let ratio = (count / taskCount).toFixed(4);\\n let stripCount = Math.ceil(ratio * 10);\\n isSuccess = true;\\n updateItem({\\n title: \\\"下载进度:\\\" + successCID.length + \\\"/\\\" + taskCount,\\n desc: \\\"““””\\\" + \\\"▇\\\".repeat(stripCount).fontcolor(\\\"#ffac2d\\\") + \\\"▇\\\".repeat(10 - stripCount).fontcolor(\\\"#e5e1e4\\\") + \\\" \\\" + (ratio * 100) + \\\"%\\\",\\n extra: {\\n id: MY_ID + \\\"||下载进度\\\"\\n }\\n });\\n putLog(\\\"[listener]已完成下载:\\\" + id);\\n } else if (CID === -1) {\\n failName.push(id);\\n putLog(\\\"[listener]已停止:\\\" + id);\\n }\\n if (taskCount !== count) return;\\n if (successCID.length === taskCount) {\\n updateItem({\\n desc: \\\"““””\\\" + \\\"▇\\\".repeat(10).fontcolor(\\\"#00ff00\\\") + \\\" 100%\\\",\\n extra: {\\n id: MY_ID + \\\"||下载进度\\\"\\n }\\n });\\n }\\n let batchTeam = JSON.parse(getMyVar(MY_ID + \\\":batchTeam\\\", \\\"[]\\\") || \\\"[]\\\");\\n let status = getMyVar(MY_ID + \\\":status\\\", \\\"0\\\");\\n let failTeam = batchTeam.filter(v => !successCID.includes(v));\\n putMyVar(MY_ID + \\\":batchTeam\\\", JSON.stringify(failTeam));\\n if (failTeam.length > 0 && status !== \\\"1\\\") {\\n putMyVar(MY_ID + \\\":status\\\", \\\"3\\\");\\n putLog(\\\"下载失败:[\\\" + failName.join(\\\"],[\\\") + \\\"]。\\\");\\n updateItem({\\n title: \\\"[处理失败]\\\",\\n extra: {\\n id: MY_ID + \\\"||下载控制\\\"\\n }\\n });\\n } else if (failTeam.length > 0 && status === \\\"1\\\") {\\n putMyVar(MY_ID + \\\":status\\\", \\\"4\\\");\\n putLog(\\\"[listener]#已停止所有任务,但已有进度不会消失#\\\");\\n updateItem({\\n title: \\\"[重新开始]\\\",\\n extra: {\\n id: MY_ID + \\\"||下载控制\\\"\\n }\\n });\\n } else {\\n putMyVar(MY_ID + \\\":status\\\", \\\"2\\\");\\n putLog(\\\"下载任务[\\\" + info.bookName + \\\"]已全部成功完成\\\");\\n updateItem({\\n title: \\\"[返回]\\\",\\n extra: {\\n id: MY_ID + \\\"||下载控制\\\"\\n }\\n });\\n }\\n toast(\\\"下载任务[\\\" + info.bookName + \\\"]已完成\\\");\\n }\\n let taskTeamChunk = [];\\n if (Config.threadNum > 0) {\\n taskTeamChunk = Tool.chunk(taskTeam, Config.threadNum);\\n } else {\\n taskTeamChunk = [taskTeam];\\n }\\n for (let taskList of taskTeamChunk) {\\n be(taskList, {\\n func: listener\\n });\\n let status = getMyVar(MY_ID + \\\":status\\\", \\\"0\\\");\\n if (status === \\\"1\\\") {\\n let batchTeam = JSON.parse(getMyVar(MY_ID + \\\":batchTeam\\\", \\\"[]\\\") || \\\"[]\\\");\\n let status = getMyVar(MY_ID + \\\":status\\\", \\\"0\\\");\\n let failTeam = batchTeam.filter(v => !successCID.includes(v));\\n putMyVar(MY_ID + \\\":batchTeam\\\", JSON.stringify(failTeam));\\n putMyVar(MY_ID + \\\":status\\\", \\\"4\\\");\\n putLog(\\\"[listener]#已停止所有任务,但已有进度不会消失#\\\");\\n updateItem({\\n title: \\\"[重新开始]\\\",\\n extra: {\\n id: MY_ID + \\\"||下载控制\\\"\\n }\\n });\\n return \\\"hiker://empty\\\";\\n }\\n\\n }\\n\\n return \\\"hiker://empty\\\";\\n};\"},{\"col_type\":\"movie_3\",\"name\":\"#fg.批量主程序\",\"path\":\"Batch.exe.js\",\"rule\":\"const File = $.require(\\\"hiker://page/File.js\\\");\\nconst Config = $.require(\\\"hiker://page/Config.json\\\");\\nconst Tool = $.require(\\\"hiker://page/Tool.js\\\");\\n\\nfunction comic(taskParam) {\\n let {\\n chapterItem,\\n info,\\n MY_ID,\\n } = taskParam;\\n if (getMyVar(MY_ID + \\\":status\\\", \\\"\\\") === \\\"1\\\") {\\n return -1;\\n }\\n let mainPath = Config.comicPath + \\\"/\\\" + info.ruleName + \\\"/\\\" + info.bookName + \\\"/\\\";\\n let chapterPath = mainPath + chapterItem.CID + \\\"$B$\\\" + chapterItem.title + \\\"/\\\";\\n let picList;\\n try {\\n let getPicList = new Function(\\\"input\\\", \\\"url\\\", \\\"return \\\" + info.parseCode);\\n picList = getPicList(chapterItem.url, chapterItem.url);\\n if (typeof picList === \\\"string\\\") {\\n picList = picList.replace(\\\"pics://\\\", \\\"\\\").split(\\\"&&\\\");\\n }\\n } catch (e) {\\n e.message = \\\"<漫画图片解析错误:\\\" + e.message + \\\">\\\";\\n throw e;\\n }\\n const L = picList.length;\\n if(L===0){\\n throw new Error(\\\"<漫画图片解析错误:图片链接返回为空>\\\");\\n }\\n if (info.bookTopPic) {\\n try {\\n let bookTopPic = Tool.hikerPic(info.bookTopPic);\\n requireDownload(bookTopPic[0], mainPath + info.bookName + \\\".jpg\\\", bookTopPic[1]);\\n } catch (e) {\\n log(\\\"<封面下载错误:\\\" + e.message + \\\">\\\");\\n }\\n }\\n var schedule = new Map([\\n [L, () => log(chapterItem.title + \\\"已下载100%\\\")],\\n [~~(0.90 * L), () => log(chapterItem.title + \\\"已下载90%+\\\")],\\n [~~(0.75 * L), () => log(chapterItem.title + \\\"已下载75%+\\\")],\\n [~~(0.50 * L), () => log(chapterItem.title + \\\"已下载50%+\\\")],\\n [~~(0.25 * L), () => log(chapterItem.title + \\\"已下载25%+\\\")]\\n ]);\\n for (var i = 0; i < L; i++) {\\n let pic = Tool.hikerPic(picList[i]);\\n requireDownload(pic[0], chapterPath + (i + 1) + \\\".jpg\\\", pic[1]);\\n schedule.has(i + 1) && schedule.get(i + 1)();\\n if (getMyVar(MY_ID + \\\":status\\\", \\\"\\\") === \\\"1\\\") {\\n return -1;\\n }\\n }\\n File.renameFile(chapterPath, chapterItem.CID + \\\"$A$\\\" + chapterItem.title);\\n return chapterItem.CID;\\n}\\n\\nfunction novel(taskParam) {\\n let {\\n chapterItem,\\n info,\\n MY_ID,\\n } = taskParam;\\n if (getMyVar(MY_ID + \\\":status\\\", \\\"\\\") === \\\"1\\\") {\\n return -1;\\n }\\n let mainPath = Config.novelPath + \\\"/\\\" + info.ruleName + \\\"/\\\" + info.bookName + \\\"/\\\";\\n let chapterPath = mainPath + chapterItem.CID + \\\"$A$\\\" + chapterItem.title + \\\".txt\\\";\\n let content = \\\"\\\";\\n try {\\n let getContent = new Function(\\\"input\\\", \\\"url\\\", \\\"return \\\" + info.parseCode);\\n content = getContent(chapterItem.url, chapterItem.url);\\n } catch (e) {\\n e.message = \\\"<小说正文解析错误:\\\" + e.message + \\\">\\\";\\n throw e;\\n }\\n if (!content) {\\n throw new Error(\\\"<小说正文解析错误:正文返回为空>\\\");\\n }\\n if (info.bookTopPic) {\\n try {\\n let bookTopPic = Tool.hikerPic(info.bookTopPic);\\n requireDownload(bookTopPic[0], mainPath + info.bookName + \\\".jpg\\\", bookTopPic[1]);\\n } catch (e) {\\n log(\\\"<封面下载错误:\\\" + e.message + \\\">\\\");\\n }\\n }\\n File.fileWrite(chapterPath, content.replace(/