mirror of
https://github.com/beetbox/beets.git
synced 2025-12-07 17:16:07 +01:00
fix coding style errors
This commit is contained in:
parent
9d55179d2d
commit
ee6f3dba1b
2 changed files with 5 additions and 2 deletions
|
|
@ -130,8 +130,9 @@ def should_transcode(item, format):
|
|||
"""Determine whether the item should be transcoded as part of
|
||||
conversion (i.e., its bitrate is high or it has the wrong format).
|
||||
"""
|
||||
if config['convert']['never_convert_lossy_files'] and not (item.format.lower() in LOSSLESS_FORMATS):
|
||||
return False
|
||||
if config['convert']['never_convert_lossy_files'] and \
|
||||
not (item.format.lower() in LOSSLESS_FORMATS):
|
||||
return False
|
||||
maxbr = config['convert']['max_bitrate'].get(int)
|
||||
return format.lower() != item.format.lower() or \
|
||||
item.bitrate >= 1000 * maxbr
|
||||
|
|
|
|||
|
|
@ -124,6 +124,7 @@ class ConvertCliTest(unittest.TestCase, TestHelper):
|
|||
mediafile = MediaFile(converted)
|
||||
self.assertEqual(mediafile.images[0].data, image_data)
|
||||
|
||||
|
||||
class NeverConvertLossyFilesTest(unittest.TestCase, TestHelper):
|
||||
|
||||
def setUp(self):
|
||||
|
|
@ -163,6 +164,7 @@ class NeverConvertLossyFilesTest(unittest.TestCase, TestHelper):
|
|||
converted = os.path.join(self.convert_dest, 'converted.mp3')
|
||||
self.assertTrue(os.path.isfile(converted))
|
||||
|
||||
|
||||
def suite():
|
||||
return unittest.TestLoader().loadTestsFromName(__name__)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue