(
        self, metadata: "Metadata", manually_requested: bool, votes=0
    )
return song
Creates a new song at the end of the queue and returns it.
Creates a new song at the end of the queue and returns it.
Creates a new song at the end of the queue and returns it .
def enqueue(
        self, metadata: "Metadata", manually_requested: bool, votes=0
    ) -> QueuedSong:
        """Creates a new song at the end of the queue and returns it."""
        last = self.last()
        index = 1 if last is None else last.index + 1
        song = self.create(
            index=index,
            votes=votes,
            manually_requested=manually_requested,
            artist=metadata["artist"],
            title=metadata["title"],
            duration=metadata["duration"],
            internal_url=metadata["internal_url"],
            external_url=metadata["external_url"],
            stream_url=metadata["stream_url"],
        )
        return song
def enqueue ( self , metadata : "Metadata" , manually_requested : bool , votes = 0 ) -> QueuedSong : last = self . last ( ) index = 1 if last is None else last . index + 1 song = self . create ( index = index , votes = votes , manually_requested = manually_requested , artist = metadata [ "artist" ] , title = metadata [ "title" ] , duration = metadata [ "duration" ] , internal_url = metadata [ "internal_url" ] , external_url = metadata [ "external_url" ] , stream_url = metadata [ "stream_url" ] , ) return song