mirror of
https://github.com/beetbox/beets.git
synced 2025-12-27 11:02:43 +01:00
Simplify MP4 bool storage
This commit is contained in:
parent
b47ee03168
commit
8b8214d3ac
1 changed files with 8 additions and 2 deletions
|
|
@ -453,15 +453,21 @@ class MP4StorageStyle(StorageStyle):
|
|||
|
||||
class MP4BoolStorageStyle(MP4StorageStyle):
|
||||
|
||||
def fetch(self, mediafile):
|
||||
def get(self, mediafile):
|
||||
try:
|
||||
return mediafile.mgfile[self.key]
|
||||
except KeyError:
|
||||
return None
|
||||
|
||||
def store(self, mediafile, value):
|
||||
def get_list(self, mediafile):
|
||||
raise NotImplementedError('MP4 bool storage does not support lists')
|
||||
|
||||
def set(self, mediafile, value):
|
||||
mediafile.mgfile[self.key] = value
|
||||
|
||||
def set_list(self, mediafile, values):
|
||||
raise NotImplementedError('MP4 bool storage does not support lists')
|
||||
|
||||
|
||||
class MP3StorageStyle(StorageStyle):
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue