mirror of
				https://codeberg.org/ashley/poke
				synced 2025-07-17 16:52:11 +00:00 
			
		
		
		
	fix shitcode :3
This commit is contained in:
		
							parent
							
								
									51a2f042c1
								
							
						
					
					
						commit
						40a8e92e80
					
				| @ -316,21 +316,12 @@ module.exports = function (app, config, renderTemplate) { | ||||
| 
 | ||||
|       let ChannelFirstVideoObject; | ||||
| 
 | ||||
|       if (tj && tj.videos && tj.videos.length > 0) { | ||||
|       const source = [tj, shorts, stream].find( | ||||
|         (i) => i && i.videos && i.videos.length > 0 | ||||
|       ); | ||||
|       if (source) { | ||||
|         ChannelFirstVideoObject = await fetch( | ||||
|           `${config.invapi}/videos/${tj.videos[0].videoId}` | ||||
|         ) | ||||
|           .then((res) => res.text()) | ||||
|           .then((txt) => JSON.parse(txt)); | ||||
|       } else if (shorts && shorts.videos && shorts.videos.length > 0) { | ||||
|         ChannelFirstVideoObject = await fetch( | ||||
|           `${config.invapi}/videos/${shorts.videos[0].videoId}` | ||||
|         ) | ||||
|           .then((res) => res.text()) | ||||
|           .then((txt) => JSON.parse(txt)); | ||||
|       } else if (stream && stream.videos && stream.videos.length > 0) { | ||||
|         ChannelFirstVideoObject = await fetch( | ||||
|           `${config.invapi}/videos/${stream.videos[0].videoId}` | ||||
|           `${config.invapi}/videos/${source.videos[0].videoId}` | ||||
|         ) | ||||
|           .then((res) => res.text()) | ||||
|           .then((txt) => JSON.parse(txt)); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 ashley
						ashley