fix outdated _record reference in web plugin

This commit is contained in:
Adrian Sampson 2013-09-09 20:56:38 -07:00
parent 3b4e3d47f5
commit fa97684e7b

View file

@ -29,8 +29,9 @@ def _rep(obj, expand=False):
Album object. For Albums, `expand` dictates whether tracks are
included.
"""
out = dict(obj)
if isinstance(obj, beets.library.Item):
out = dict(obj)
del out['path']
# Get the size (in bytes) of the backing file. This is useful
@ -43,7 +44,6 @@ def _rep(obj, expand=False):
return out
elif isinstance(obj, beets.library.Album):
out = dict(obj._record)
del out['artpath']
if expand:
out['items'] = [_rep(item) for item in obj.items()]