mirror of
https://github.com/fergalmoran/picard.git
synced 2026-02-23 08:06:46 +00:00
Merge branch 'master' into PICARD-1332-restore-deleted-file-tags
This commit is contained in:
@@ -275,7 +275,8 @@ class OptimFROGFile(APEv2File):
|
||||
|
||||
def _info(self, metadata, file):
|
||||
super()._info(metadata, file)
|
||||
if file.filename.lower().endswith(".ofs"):
|
||||
# mutagen.File.filename can be either a bytes or str object
|
||||
if string_(file.filename.lower()).endswith(".ofs"):
|
||||
metadata['~format'] = "OptimFROG DualStream Audio"
|
||||
else:
|
||||
metadata['~format'] = "OptimFROG Lossless Audio"
|
||||
|
||||
@@ -446,7 +446,7 @@ class PluginManager(QtCore.QObject):
|
||||
try:
|
||||
installed_plugin = self.load_plugin(zip_plugin or plugin_name, USER_PLUGIN_DIR)
|
||||
except Exception as e:
|
||||
log.error('Unable to load plugin: %s.\nError occured: %s', name, e)
|
||||
log.error('Unable to load plugin: %s.\nError occured: %s', plugin_name, e)
|
||||
installed_plugin = None
|
||||
|
||||
if installed_plugin is not None:
|
||||
|
||||
BIN
test/data/test.ofr
Normal file
BIN
test/data/test.ofr
Normal file
Binary file not shown.
BIN
test/data/test.ofs
Normal file
BIN
test/data/test.ofs
Normal file
Binary file not shown.
@@ -534,6 +534,24 @@ class TAKTest(CommonTests.FormatsTest):
|
||||
supports_ratings = False
|
||||
|
||||
|
||||
class OptimFROGLosslessTest(CommonTests.FormatsTest):
|
||||
testfile = 'test.ofr'
|
||||
supports_ratings = False
|
||||
|
||||
def test_format(self):
|
||||
metadata = load_metadata(self.filename)
|
||||
self.assertEqual(metadata['~format'], 'OptimFROG Lossless Audio')
|
||||
|
||||
|
||||
class OptimFROGDUalStreamTest(CommonTests.FormatsTest):
|
||||
testfile = 'test.ofs'
|
||||
supports_ratings = False
|
||||
|
||||
def test_format(self):
|
||||
metadata = load_metadata(self.filename)
|
||||
self.assertEqual(metadata['~format'], 'OptimFROG DualStream Audio')
|
||||
|
||||
|
||||
cover_settings = {
|
||||
'embed_only_one_front_image': True,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user