Fixed isdecimal check

This commit is contained in:
RemixDev 2021-09-21 14:23:51 +02:00
parent d11843c733
commit 8b896fe7e7

View file

@ -21,7 +21,7 @@ def generateTrackItem(dz, link_id, bitrate, trackAPI=None, albumAPI=None):
link_id = trackAPI['id'] link_id = trackAPI['id']
else: else:
raise ISRCnotOnDeezer(f"https://deezer.com/track/{link_id}") raise ISRCnotOnDeezer(f"https://deezer.com/track/{link_id}")
if not str(link_id).isdecimal(): raise InvalidID(f"https://deezer.com/track/{link_id}") if not str(link_id.strip('-')).isdecimal(): raise InvalidID(f"https://deezer.com/track/{link_id}")
# Get essential track info # Get essential track info
try: try: