album.move() now also stores

This lets items see any modifications to the album (when the album's fields
are dirty). It's also symmetric with the same method on items.
This commit is contained in:
Adrian Sampson 2013-08-21 09:07:20 -07:00
parent 8bcbe1dea2
commit c2acab510d

View file

@ -1721,12 +1721,17 @@ class Album(LibModel):
self._lib.directory)
def move(self, copy=False, basedir=None):
"""Moves (or copies) all items to their destination. Any album
"""Moves (or copies) all items to their destination. Any album
art moves along with them. basedir overrides the library base
directory for the destination.
directory for the destination. The album is stored to the
database, persisting any modifications to its metadata.
"""
basedir = basedir or self._lib.directory
# Ensure new metadata is available to items for destination
# computation.
self.store()
# Move items.
items = list(self.items())
for item in items: