refactor: set original track if search type is not defined in Player's play_track method

This commit is contained in:
cloudwithax 2024-06-10 21:54:21 -04:00
parent b60a6aec18
commit 094f2be181
1 changed files with 3 additions and 0 deletions

View File

@ -504,6 +504,9 @@ class Player(VoiceProtocol):
) -> Track: ) -> Track:
"""Plays a track. If a Spotify track is passed in, it will be handled accordingly.""" """Plays a track. If a Spotify track is passed in, it will be handled accordingly."""
if not track._search_type:
track.original = track
# Make sure we've never searched the track before # Make sure we've never searched the track before
if track._search_type and track.original is None: if track._search_type and track.original is None:
# First lets try using the tracks ISRC, every track has one (hopefully) # First lets try using the tracks ISRC, every track has one (hopefully)