From 1cde93876914c3d9126de410cce0d2944b1501c9 Mon Sep 17 00:00:00 2001 From: Callum Brown Date: Tue, 12 Jul 2022 11:21:52 +0100 Subject: [PATCH] Document Album.items() / LibModel.items() conflict Closes: https://github.com/beetbox/beets/issues/4404 --- beets/library.py | 3 +++ docs/dev/library.rst | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/beets/library.py b/beets/library.py index c8fa2b5fc2..7f66693666 100644 --- a/beets/library.py +++ b/beets/library.py @@ -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)) diff --git a/docs/dev/library.rst b/docs/dev/library.rst index 071b780f3a..9740c8b902 100644 --- a/docs/dev/library.rst +++ b/docs/dev/library.rst @@ -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: