mirror of
				https://codeberg.org/ashley/poke
				synced 2025-07-17 16:52:11 +00:00 
			
		
		
		
	add Region settings :3
This commit is contained in:
		
							parent
							
								
									87bdb45f0e
								
							
						
					
					
						commit
						c7a2c08bbb
					
				| @ -63,7 +63,7 @@ class PokeTubeCore { | |||||||
|    * @param {string} v - Video ID. |    * @param {string} v - Video ID. | ||||||
|    * @returns {Promise<object>} Promise resolving to the video information. |    * @returns {Promise<object>} Promise resolving to the video information. | ||||||
|    */ |    */ | ||||||
|   async video(v) { |   async video(v, contentlang, contentregion) { | ||||||
|      |      | ||||||
|     const { fetch } = await import("undici"); |     const { fetch } = await import("undici"); | ||||||
|      |      | ||||||
| @ -79,8 +79,8 @@ class PokeTubeCore { | |||||||
|      |      | ||||||
|     try { |     try { | ||||||
|     const [invComments, videoInfo, videoData] = await Promise.all([ |     const [invComments, videoInfo, videoData] = await Promise.all([ | ||||||
|       fetch(`${this.config.invapi}/comments/${v}?${this.language}`).then((res) => res.text()), |       fetch(`${this.config.invapi}/comments/${v}?hl=${contentlang}®ion=${contentregion}`).then((res) => res.text()), | ||||||
|       fetch(`${this.config.invapi}/videos/${v}`).then((res) => res.text()), |       fetch(`${this.config.invapi}/videos/${v}?hl=${contentlang}®ion=${contentregion}`).then((res) => res.text()), | ||||||
|       curly |       curly | ||||||
|         .get(`${this.config.tubeApi}video?v=${v}`, { |         .get(`${this.config.tubeApi}video?v=${v}`, { | ||||||
|           httpHeader: Object.entries(headers).map(([k, v]) => `${k}: ${v}`), |           httpHeader: Object.entries(headers).map(([k, v]) => `${k}: ${v}`), | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Ashley
						Ashley