diff --git a/beets/library.py b/beets/library.py index 638e0febb..ecfb241e0 100644 --- a/beets/library.py +++ b/beets/library.py @@ -475,9 +475,11 @@ class Item(LibModel): def get_album(self): """Get the Album object that this item belongs to, if any, or - None if the item is a singleton. + None if the item is a singleton or is not associated with a + library. """ - self._check_db() + if not self._lib: + return None return self._lib.get_album(self) diff --git a/beetsplug/missing.py b/beetsplug/missing.py index d2776ccbc..0b12ebde6 100644 --- a/beetsplug/missing.py +++ b/beetsplug/missing.py @@ -153,8 +153,6 @@ class MissingPlugin(BeetsPlugin): else: for item in _missing(album): - item._lib = lib - item.id = '-1' print_obj(item, lib, fmt=fmt) self._command.func = _miss