mirror of
				https://code.hackerspace.pl/q3k/youtube-dl
				synced 2025-03-16 11:43:02 +00:00 
			
		
		
		
	Make --metadata-from-title non fatal
Output a warning if the metadata can't be parsed from the title (and don't write any metadata) instead of raising a critical error.
This commit is contained in:
		
							parent
							
								
									1ad6b891b2
								
							
						
					
					
						commit
						5e42f8a0ad
					
				| @ -38,7 +38,8 @@ class MetadataFromTitlePP(PostProcessor): | |||||||
|         title = info['title'] |         title = info['title'] | ||||||
|         match = re.match(self._titleregex, title) |         match = re.match(self._titleregex, title) | ||||||
|         if match is None: |         if match is None: | ||||||
|             raise MetadataFromTitlePPError('Could not interpret title of video as "%s"' % self._titleformat) |             self._downloader.to_screen('[fromtitle] Could not interpret title of video as "%s"' % self._titleformat) | ||||||
|  |             return [], info | ||||||
|         for attribute, value in match.groupdict().items(): |         for attribute, value in match.groupdict().items(): | ||||||
|             value = match.group(attribute) |             value = match.group(attribute) | ||||||
|             info[attribute] = value |             info[attribute] = value | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 nyorain
						nyorain