Skip to content

Commit 0e2a815

Browse files
committed
Update docs
1 parent 49b24a0 commit 0e2a815

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

docs/dev/paths.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ long-path support (Windows) are automatically managed by ``pathlib``.
1717
When storing paths in the database, however, convert them to bytes with
1818
``bytestring_path()``. Paths in Beets are currently stored as bytes, although
1919
there are plans to eventually store ``pathlib.Path`` objects directly. To access
20-
media file paths in their stored form, use the ``.path`` property on ``Item``
21-
and ``Album``.
20+
media file paths from library objects, use ``.path`` for the absolute path as
21+
``bytes`` or ``.filepath`` for the absolute path as a ``pathlib.Path``. The
22+
database still stores these paths relative to the configured library root.
2223

2324
Legacy utilities
2425
----------------

docs/reference/query.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,8 @@ Sometimes it's useful to find all the items in your library that are
386386
::
387387

388388
$ beet list path:/my/music/directory
389+
$ beet list path:Artist/Album
390+
$ beet list path:Artist/Album/track.mp3
389391

390392
In fact, beets automatically recognizes any query term containing a path
391393
separator (``/`` on POSIX systems) as a path query if that path exists, so this
@@ -395,6 +397,9 @@ command is equivalent as long as ``/my/music/directory`` exist:
395397

396398
$ beet list /my/music/directory
397399

400+
The ``path:`` field accepts either an absolute path under the configured music
401+
directory or a path relative to the library root.
402+
398403
Note that this only matches items that are *already in your library*, so a path
399404
query won't necessarily find *all* the audio files in a directory---just the
400405
ones you've already added to your beets library.

0 commit comments

Comments
 (0)