From 0d00fe9f36c4b4c5fa25a01b5781dea2ae6e6630 Mon Sep 17 00:00:00 2001 From: cloudwithax Date: Sun, 11 Dec 2022 21:26:35 -0500 Subject: [PATCH] whoops had that in the wrong place --- pomice/pool.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/pomice/pool.py b/pomice/pool.py index 1f39198..3721fea 100644 --- a/pomice/pool.py +++ b/pomice/pool.py @@ -414,20 +414,20 @@ class Node: filters=filters ) ] - - # If YouTube url contains a timestamp, capture it for use later. - - if (match := YOUTUBE_TIMESTAMP_REGEX.match(query)): - timestamp = float(match.group("time")) - - # If query is a video thats part of a playlist, get the video and queue that instead - # (I can't tell you how much i've wanted to implement this in here) - - if (match := YOUTUBE_PLAYLIST_REGEX.match(query)): - query = match.group("video") else: + # If YouTube url contains a timestamp, capture it for use later. + + if (match := YOUTUBE_TIMESTAMP_REGEX.match(query)): + timestamp = float(match.group("time")) + + # If query is a video thats part of a playlist, get the video and queue that instead + # (I can't tell you how much i've wanted to implement this in here) + + if (match := YOUTUBE_PLAYLIST_REGEX.match(query)): + query = match.group("video") + async with self._session.get( url=f"{self._rest_uri}/loadtracks?identifier={quote(query)}", headers={"Authorization": self._password}