mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2026-04-22 01:28:05 +08:00
feat: 支持按顺序合并本地和远程订阅(前端版本 > 2.14.14 可输入)
This commit is contained in:
@@ -20,18 +20,22 @@ async function downloadSubscription(req, res) {
|
||||
req.query.target || getPlatformFromHeaders(req.headers) || 'JSON';
|
||||
|
||||
$.info(`正在下载订阅:${name}`);
|
||||
let { url, ua, content } = req.query;
|
||||
let { url, ua, content, mergeSources } = req.query;
|
||||
if (url) {
|
||||
url = decodeURIComponent(url);
|
||||
$.info(`指定 url: ${url}`);
|
||||
$.info(`指定远程订阅 URL: ${url}`);
|
||||
}
|
||||
if (ua) {
|
||||
ua = decodeURIComponent(ua);
|
||||
$.info(`指定 ua: ${ua}`);
|
||||
$.info(`指定远程订阅 User-Agent: ${ua}`);
|
||||
}
|
||||
if (content) {
|
||||
content = decodeURIComponent(content);
|
||||
$.info(`指定 content: ${content}`);
|
||||
$.info(`指定本地订阅: ${content}`);
|
||||
}
|
||||
if (mergeSources) {
|
||||
mergeSources = decodeURIComponent(mergeSources);
|
||||
$.info(`指定合并来源: ${mergeSources}`);
|
||||
}
|
||||
|
||||
const allSubs = $.read(SUBS_KEY);
|
||||
@@ -45,6 +49,7 @@ async function downloadSubscription(req, res) {
|
||||
url,
|
||||
ua,
|
||||
content,
|
||||
mergeSources,
|
||||
});
|
||||
|
||||
if (sub.source !== 'local' || url) {
|
||||
|
||||
Reference in New Issue
Block a user