(self, key: int)
return to_remove
Removes the song specified by :param key: from the queue and returns it.
Removes the song specified by :param key: from the queue and returns it.
Removes the song specified by : param key : from the queue and returns it .
def remove(self, key: int) -> "QueuedSong":
        """Removes the song specified by :param key: from the queue and returns it."""
        to_remove = self.get(id=key)
        to_remove.delete()
        self.filter(index__gt=to_remove.index).update(index=F("index") - 1)
        return to_remove
def remove ( self , key : int ) -> "QueuedSong" : to_remove = self . get ( id = key ) to_remove . delete ( ) self . filter ( index__gt = to_remove . index ) . update ( index = F ( "index" ) - 1 ) return to_remove