async def vafter(self):
        """Function that is called after a song finishes playing"""
        self.logger.debug("Finished playing a song")
        if self.state != 'ready':
            self.logger.debug("Returning because player is in state {}".format(self.state))
            return

        self.pause_time = None

        if self.vclient_task:
            loop = asyncio.get_event_loop()
            loop.call_soon(self.vclient_task.cancel)
            self.vclient_task = None

        try:
            if self.streamer is None:
                await self.stop()
                return

            if self.streamer.error is None:
                await self.vplay()
            else:
                self.statuslog.error(self.streamer.error)
                await self.destroy()
        except Exception as e:
            logger.exception(e)
            try:
                await self.destroy()
            except Exception as e:
                logger.exception(e)
async def vafter ( self ) : self . logger . debug ( "Finished playing a song" ) if self . state != 'ready' : self . logger . debug ( "Returning because player is in state {}" . format ( self . state ) ) return self . pause_time = None if self . vclient_task : loop = asyncio . get_event_loop ( ) loop . call_soon ( self . vclient_task . cancel ) self . vclient_task = None try : if self . streamer is None : await self . stop ( ) return if self . streamer . error is None : await self . vplay ( ) else : self . statuslog . error ( self . streamer . error ) await self . destroy ( ) except Exception as e : logger . exception ( e ) try : await self . destroy ( ) except Exception as e : logger . exception ( e )
Function that is called after a song finishes playing