From 1204afadbba5a669fd4ca22bd883cf8cb9f54002 Mon Sep 17 00:00:00 2001 From: rembo10 Date: Mon, 8 Jun 2015 21:56:10 -0700 Subject: [PATCH] Convert preferred bitrate to vbr preset for what.cd searching --- headphones/searcher.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/headphones/searcher.py b/headphones/searcher.py index 1b58151f..a2eca508 100644 --- a/headphones/searcher.py +++ b/headphones/searcher.py @@ -1280,6 +1280,12 @@ def searchTorrent(album, new=False, losslessOnly=False, albumlength=None, choose search_formats = [None] # should return all bitrate = headphones.CONFIG.PREFERRED_BITRATE if bitrate: + if 225 <= int(bitrate) < 256: + bitrate = 'V0' + elif 200 <= int(bitrate) < 225: + bitrate = 'V1' + elif 175 <= int(bitrate) < 200: + bitrate = 'V2' for encoding_string in gazelleencoding.ALL_ENCODINGS: if re.search(bitrate, encoding_string, flags=re.I): bitrate_string = encoding_string