Skip to content

Commit

Permalink
Document Album.items() / LibModel.items() conflict
Browse files Browse the repository at this point in the history
Closes: beetbox#4404
  • Loading branch information
govynnus committed Jul 12, 2022
1 parent 7209c5f commit 1cde938
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions beets/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -1145,6 +1145,9 @@ def _getters(cls):
def items(self):
"""Return an iterable over the items associated with this
album.
This method predates the :meth:`LibModel.items` method inherited
from :meth:`beets.dbcore.Model.items`.
"""
return self._db.items(dbcore.MatchQuery('album_id', self.id))

Expand Down
6 changes: 6 additions & 0 deletions docs/dev/library.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -207,6 +211,8 @@ metadata field.

.. automethod:: item_dir

.. automethod:: items

Albums extend the normal model interface to also forward changes to their
items:

Expand Down

0 comments on commit 1cde938

Please sign in to comment.