mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2026-04-05 13:43:16 +08:00
Fixed local subscription not working in collections
This commit is contained in:
@@ -318,7 +318,12 @@ async function produceArtifact({ type, item, platform, noProcessor }) {
|
||||
const sub = allSubs[name];
|
||||
try {
|
||||
$.info(`正在处理子订阅:${sub.name}...`);
|
||||
const raw = await download(sub.url, sub.ua);
|
||||
let raw;
|
||||
if (sub.source === 'local') {
|
||||
raw = sub.content;
|
||||
} else {
|
||||
raw = await download(sub.url, sub.ua);
|
||||
}
|
||||
// parse proxies
|
||||
let currentProxies = ProxyUtils.parse(raw);
|
||||
if (!noProcessor) {
|
||||
|
||||
@@ -35,9 +35,11 @@ async function downloadCollection(req, res) {
|
||||
const subs = collection['subscriptions'];
|
||||
if (subs.length > 0) {
|
||||
const sub = allSubs[subs[0]];
|
||||
const flowInfo = await getFlowHeaders(sub.url);
|
||||
if (flowInfo) {
|
||||
res.set('subscription-userinfo', flowInfo);
|
||||
if (sub.source !== 'local') {
|
||||
const flowInfo = await getFlowHeaders(sub.url);
|
||||
if (flowInfo) {
|
||||
res.set('subscription-userinfo', flowInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user