From ddcdf9d7bb2f2e5494b669f462ec852976a6eeca Mon Sep 17 00:00:00 2001 From: Remy Date: Thu, 11 Aug 2011 11:49:20 -0700 Subject: [PATCH] Merged sbusers beets changes --- lib/beets/autotag/__init__.py | 4 ++-- lib/beets/library.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/beets/autotag/__init__.py b/lib/beets/autotag/__init__.py index fb3c6de4..43d72d1f 100644 --- a/lib/beets/autotag/__init__.py +++ b/lib/beets/autotag/__init__.py @@ -378,8 +378,8 @@ def apply_metadata(items, info): # Compilation flag. item.comp = info['va'] - item.comments = 'tagged by headphones/beets' - + item.comments = 'tagged by headphones/beets' + def match_by_id(items): """If the items are tagged with a MusicBrainz album ID, returns an info dict for the corresponding album. Otherwise, returns None. diff --git a/lib/beets/library.py b/lib/beets/library.py index 213d42dd..3ebc0c1d 100644 --- a/lib/beets/library.py +++ b/lib/beets/library.py @@ -204,7 +204,8 @@ class Item(object): """ f = MediaFile(syspath(self.path)) for key in ITEM_KEYS_WRITABLE: - setattr(f, key, getattr(self, key)) + if getattr(self, key): #make sure it has a value before we set it and create blank tags with wrong types + setattr(f, key, getattr(self, key)) f.save()