From 5dc923d057659852e3d9f3b289295501f5651ef9 Mon Sep 17 00:00:00 2001 From: RemixDev Date: Tue, 8 Jun 2021 19:39:56 +0200 Subject: [PATCH] Fixed bitrate fallback not working --- deemix/downloader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deemix/downloader.py b/deemix/downloader.py index 22327ab..22a1915 100644 --- a/deemix/downloader.py +++ b/deemix/downloader.py @@ -112,7 +112,7 @@ def getPreferredBitrate(track, bitrate, shouldFallback, uuid=None, listener=None return None for formatNumber, formatName in formats.items(): - if formatNumber >= int(bitrate): continue + if formatNumber > bitrate: continue if f"FILESIZE_{formatName}" in track.filesizes: if int(track.filesizes[f"FILESIZE_{formatName}"]) != 0: return formatNumber if not track.filesizes[f"FILESIZE_{formatName}_TESTED"]: