fix tag function logging; don't try to tag with None
This commit is contained in:
		
							parent
							
								
									e5c66265f3
								
							
						
					
					
						commit
						3368f27588
					
				
					 1 changed files with 5 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -134,8 +134,12 @@ class DelojzaBot:
 | 
			
		|||
        artist = artist.strip() if artist else None
 | 
			
		||||
        title = title.strip() if title else None
 | 
			
		||||
 | 
			
		||||
        if title is None and artist is None:
 | 
			
		||||
            message.reply_text("Tried tagging, found nothing :(")
 | 
			
		||||
            return
 | 
			
		||||
 | 
			
		||||
        message.reply_text("Tagging as \"{}\" by \"{}\"\nvia {}".format(title, artist, source))
 | 
			
		||||
        self.logger.info("Tagging %s w/ $s - $s [%s]...".format(filepath, title, artist, source))
 | 
			
		||||
        self.logger.info("Tagging {} w/ {} - {} [{}]...".format(filepath, title, artist, source))
 | 
			
		||||
        try:
 | 
			
		||||
            id3 = mutagen.id3.ID3(filepath)
 | 
			
		||||
        except mutagen.id3.ID3NoHeaderError:
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue