mirror of
https://github.com/beetbox/beets.git
synced 2026-01-11 10:26:36 +01:00
get_album (and evalute_template) with non-DB items
Alternative fix for #403.
This commit is contained in:
parent
89c0e2c8b7
commit
2e2e0b2919
2 changed files with 4 additions and 4 deletions
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue