oups my bad
This commit is contained in:
		
							
								
								
									
										14
									
								
								mumbleBot.py
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								mumbleBot.py
									
									
									
									
									
								
							@@ -366,6 +366,12 @@ class MumbleBot:
 | 
			
		||||
        if var.playlist[0]["type"] == "url" or var.playlist[0]["type"] == "playlist":
 | 
			
		||||
            media.system.clear_tmp_folder(var.config.get('bot', 'tmp_folder'), var.config.getint('bot', 'tmp_folder_max_size'))
 | 
			
		||||
 | 
			
		||||
            if var.playlist[0]["type"] == "url":
 | 
			
		||||
                logging.info("Download current single music")
 | 
			
		||||
                self.download_music(index=0)
 | 
			
		||||
            else:
 | 
			
		||||
                logging.info("Download current music into playlist")
 | 
			
		||||
                self.download_music(index=0, playlist_index=int(var.playlist[0]['current_index']))
 | 
			
		||||
            uri = var.playlist[0]['path']
 | 
			
		||||
            if os.path.isfile(uri):
 | 
			
		||||
                audio = EasyID3(uri)
 | 
			
		||||
@@ -387,12 +393,8 @@ class MumbleBot:
 | 
			
		||||
                if var.config.getboolean('bot', 'announce_current_music'):
 | 
			
		||||
                    self.send_msg(var.config.get('strings', 'now_playing') % (title, thumbnail_html))
 | 
			
		||||
            else:
 | 
			
		||||
                if var.playlist[0]["type"] == "url":
 | 
			
		||||
                    logging.info("Download current single music")
 | 
			
		||||
                    self.download_music(index=0)
 | 
			
		||||
                else:
 | 
			
		||||
                    logging.info("Download current music into playlist")
 | 
			
		||||
                    self.download_music(index=0, playlist_index=int(var.playlist[0]['current_index']))
 | 
			
		||||
                pass
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        elif var.playlist[0]["type"] == "file":
 | 
			
		||||
            uri = var.config.get('bot', 'music_folder') + var.playlist[0]["path"]
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user