mirror of
https://github.com/beetbox/beets.git
synced 2026-03-01 18:55:50 +01:00
Merge pull request #811 from brunal/zero-conserve-important-fields
Zero plugin: do not zero important fields
This commit is contained in:
commit
41666fe2f3
1 changed files with 4 additions and 0 deletions
|
|
@ -47,6 +47,10 @@ class ZeroPlugin(BeetsPlugin):
|
|||
self.warned = False
|
||||
|
||||
for field in self.config['fields'].as_str_seq():
|
||||
if field in ('id', 'path', 'album_id'):
|
||||
log.warn(u'[zero] field \'{0}\' ignored, zeroing '
|
||||
u'it would be dangerous'.format(field))
|
||||
continue
|
||||
if field not in Item._fields.keys():
|
||||
log.error(u'[zero] invalid field: {0}'.format(field))
|
||||
continue
|
||||
|
|
|
|||
Loading…
Reference in a new issue