async def rewind(self, query="1"):
        """
        The rewind command

        Args:
            query (str): The number of items to skip
        """

        if not self.state == 'ready':
            logger.debug("Trying to rewind from wrong state '{}'".format(self.state))
            return

        if query == "":
            query = "1"

        try:
            num = int(query)
        except TypeError:
            self.statuslog.error("Rewind argument must be a number")
        except ValueError:
            self.statuslog.error("Rewind argument must be a number")
        else:
            if len(self.prev_queue) == 0:
                self.statuslog.error("No songs to rewind")
                return

            if num < 0:
                self.statuslog.error("Rewind must be postitive or 0")
                return
            elif num > len(self.prev_queue):
                self.statuslog.warning("Rewinding to start")
            else:
                self.statuslog.info("Rewinding")

            for i in range(num + 1):
                if len(self.prev_queue) > 0:
                    self.queue.insert(0, self.prev_queue.pop())

            try:
                self.streamer.stop()
            except Exception as e:
                logger.exception(e)
async def rewind ( self , query = "1" ) : if not self . state == 'ready' : logger . debug ( "Trying to rewind from wrong state '{}'" . format ( self . state ) ) return if query == "" : query = "1" try : num = int ( query ) except TypeError : self . statuslog . error ( "Rewind argument must be a number" ) except ValueError : self . statuslog . error ( "Rewind argument must be a number" ) else : if len ( self . prev_queue ) == 0 : self . statuslog . error ( "No songs to rewind" ) return if num < 0 : self . statuslog . error ( "Rewind must be postitive or 0" ) return elif num > len ( self . prev_queue ) : self . statuslog . warning ( "Rewinding to start" ) else : self . statuslog . info ( "Rewinding" ) for i in range ( num + 1 ) : if len ( self . prev_queue ) > 0 : self . queue . insert ( 0 , self . prev_queue . pop ( ) ) try : self . streamer . stop ( ) except Exception as e : logger . exception ( e )
The rewind command

        Args:
            query (str): The number of items to skip