mirror of
				https://code.hackerspace.pl/q3k/youtube-dl
				synced 2025-03-16 11:43:02 +00:00 
			
		
		
		
	Fix filename extension leaking to json filename
Makes writeinfojson behaving exactly as writethumbnail in case where filename contains mediafile extension. Case: video.mp4 converted to music.mp3 would yield music.mp4.info.json instead music.mp3.info.json or music.info.json
This commit is contained in:
		
							parent
							
								
									ca715127a2
								
							
						
					
					
						commit
						9771cceb2c
					
				| @ -655,7 +655,7 @@ class YoutubeDL(object): | ||||
|                     return | ||||
| 
 | ||||
|         if self.params.get('writeinfojson', False): | ||||
|             infofn = filename + u'.info.json' | ||||
|             infofn = os.path.splitext(filename)[0] + u'.info.json' | ||||
|             self.report_writeinfojson(infofn) | ||||
|             try: | ||||
|                 json_info_dict = dict((k, v) for k, v in info_dict.items() if not k in ['urlhandle']) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Janez Troha
						Janez Troha