mirror of
https://github.com/beetbox/beets.git
synced 2025-12-15 21:14:19 +01:00
Merge pull request #4412 from beetbox/album-items
Document Album.items() / LibModel.items() conflict
This commit is contained in:
commit
6e0f7a1e68
2 changed files with 11 additions and 0 deletions
|
|
@ -1145,6 +1145,11 @@ class Album(LibModel):
|
|||
def items(self):
|
||||
"""Return an iterable over the items associated with this
|
||||
album.
|
||||
|
||||
This method conflicts with :meth:`LibModel.items`, which is
|
||||
inherited from :meth:`beets.dbcore.Model.items`.
|
||||
Since :meth:`Album.items` predates these methods, and is
|
||||
likely to be used by plugins, we keep this interface as-is.
|
||||
"""
|
||||
return self._db.items(dbcore.MatchQuery('album_id', self.id))
|
||||
|
||||
|
|
|
|||
|
|
@ -99,6 +99,10 @@ synchronized (via load or store) with the database.
|
|||
|
||||
.. automethod:: items
|
||||
|
||||
.. note::
|
||||
The :py:meth:`Album.items` method is not inherited from
|
||||
:py:meth:`LibModel.items` for historical reasons.
|
||||
|
||||
.. automethod:: get
|
||||
|
||||
Item
|
||||
|
|
@ -207,6 +211,8 @@ metadata field.
|
|||
|
||||
.. automethod:: item_dir
|
||||
|
||||
.. automethod:: items
|
||||
|
||||
Albums extend the normal model interface to also forward changes to their
|
||||
items:
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue