mirror of
				https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
				synced 2025-10-31 16:11:05 +08:00 
			
		
		
		
	Fixed local subscription not working in collections
This commit is contained in:
		
							parent
							
								
									1ac077101d
								
							
						
					
					
						commit
						51db70a1c3
					
				
							
								
								
									
										2
									
								
								backend/dist/sub-store-parser.loon.min.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								backend/dist/sub-store-parser.loon.min.js
									
									
									
									
										vendored
									
									
								
							| @ -6,7 +6,7 @@ | ||||
|  *  ███████║╚██████╔╝██████╔╝      ███████║   ██║   ╚██████╔╝██║  ██║███████╗ | ||||
|  *  ╚══════╝ ╚═════╝ ╚═════╝       ╚══════╝   ╚═╝    ╚═════╝ ╚═╝  ╚═╝╚══════╝ | ||||
|  * Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket! | ||||
|  * @updated: 2022/5/25 下午6:14:57 | ||||
|  * @updated: 2022/5/25 下午10:33:28 | ||||
|  * @version: 1.6 | ||||
|  * @author: Peng-YM | ||||
|  * @github: https://github.com/Peng-YM/Sub-Store
 | ||||
|  | ||||
| @ -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); | ||||
|             } | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										4
									
								
								backend/sub-store.min.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								backend/sub-store.min.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Peng-YM
						Peng-YM