Debian Codegraph @

docs/faq.rst

raw
1 FAQ
2 ===
3
4 Here are some answers to frequently-asked questions from IRC and elsewhere. Got
5 a question that isn't answered here? Try the `discussion board`_, or
6 :ref:`filing an issue <bugs>` in the bug tracker.
7
8 .. _discussion board: https://github.com/beetbox/beets/discussions/
9
10 .. _mailing list: https://groups.google.com/group/beets-users
11
12 .. contents::
13 :local:
14 :depth: 2
15
16 How do I…
17 ---------
18
19 .. _move:
20
21 …rename my files according to a new path format configuration?
22 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23
24 Just run the :ref:`move-cmd` command. Use a :doc:`query </reference/query>` to
25 rename a subset of your music or leave the query off to rename everything.
26
27 .. _asispostfacto:
28
29 …find all the albums I imported "as-is"?
30 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31
32 Enable the :ref:`import log <import_log>` to automatically record whenever you
33 skip an album or accept one "as-is".
34
35 Alternatively, you can find all the albums in your library that are missing
36 MBIDs using a command like this:
37
38 ::
39
40 beet ls -a mb_albumid::^$
41
42 Assuming your files didn't have MBIDs already, then this will roughly correspond
43 to those albums that didn't get autotagged.
44
45 .. _discdir:
46
47 …create "Disc N" directories for multi-disc albums?
48 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
49
50 Use the :doc:`/plugins/inline` along with the ``%if{}`` function to accomplish
51 this:
52
53 ::
54
55 plugins: inline
56 paths:
57 default: $albumartist/$album%aunique{}/%if{$multidisc,Disc $disc/}$track $title
58 item_fields:
59 multidisc: 1 if disctotal > 1 else 0
60
61 This ``paths`` configuration only contains the ``default`` key: it leaves the
62 ``comp`` and ``singleton`` keys as their default values, as documented in
63 :ref:`path-format-config`. To create "Disc N" directories for compilations and
64 singletons, you will need to specify similar templates for those keys as well.
65
66 .. _multidisc:
67
68 …import a multi-disc album?
69 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
70
71 As of 1.0b11, beets tags multi-disc albums as a *single unit*. To get a good
72 match, it needs to treat all of the album's parts together as a single release.
73
74 To help with this, the importer uses a simple heuristic to guess when a
75 directory represents a multi-disc album that's been divided into multiple
76 subdirectories. When it finds a situation like this, it collapses all of the
77 items in the subdirectories into a single release for tagging.
78
79 The heuristic works by looking at the names of directories. If multiple
80 subdirectories of a common parent directory follow the pattern "(title) disc
81 (number) (...)" and the *prefix* (everything up to the number) is the same, the
82 directories are collapsed together. One of the following key words must be
83 present to make this work: "disc", "disk", "CD", "cassette", "digital media", or
84 "vinyl".
85
86 If you have trouble tagging a multi-disc album, consider the ``--flat`` flag
87 (which treats a whole tree as a single album) or just putting all the tracks
88 into a single directory to force them to be tagged together.
89
90 .. _mbid:
91
92 …enter a MusicBrainz ID?
93 ~~~~~~~~~~~~~~~~~~~~~~~~
94
95 An MBID looks like one of these:
96
97 - ``https://musicbrainz.org/release/ded77dcf-7279-457e-955d-625bd3801b87``
98 - ``d569deba-8c6b-4d08-8c43-d0e5a1b8c7f3``
99
100 Beets can recognize either the hex-with-dashes UUID-style string or the full URL
101 that contains it (as of 1.0b11).
102
103 You can get these IDs by `searching on the MusicBrainz web site
104 <https://musicbrainz.org/>`__ and going to a *release* page (when tagging full
105 albums) or a *recording* page (when tagging singletons). Then, copy the URL of
106 the page and paste it into beets.
107
108 Note that MusicBrainz has both "releases" and "release groups," which link
109 together different versions of the same album. Use *release* IDs here.
110
111 .. _upgrade:
112
113 …upgrade to the latest version of beets?
114 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
115
116 Run a command like this:
117
118 ::
119
120 pip install -U beets
121
122 The ``-U`` flag tells pip_ to upgrade beets to the latest version. If you want a
123 specific version, you can specify with using ``==`` like so:
124
125 ::
126
127 pip install beets==1.0rc2
128
129 .. _src:
130
131 …run the latest source version of beets?
132 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
133
134 Beets sees regular releases (about every six weeks or so), but sometimes it's
135 helpful to run on the "bleeding edge". To run the latest source:
136
137 1. Uninstall beets. If you installed using ``pip``, you can just run ``pip
138 uninstall beets``.
139 2. Install from source. Choose one of these methods:
140
141 - Directly from GitHub using ``python -m pip install
142 git+https://github.com/beetbox/beets.git`` command. Depending on your
143 system, you may need to use ``pip3`` and ``python3`` instead of ``pip`` and
144 ``python`` respectively.
145 - Use ``pip`` to install the latest snapshot tarball. Type: ``pip install
146 https://github.com/beetbox/beets/tarball/master``
147 - Use ``pip`` to install an "editable" version of beets based on an automatic
148 source checkout. For example, run ``pip install -e
149 git+https://github.com/beetbox/beets#egg=beets`` to clone beets and install
150 it, allowing you to modify the source in-place to try out changes.
151 - Clone source code and install it in editable mode
152
153 .. code-block:: shell
154
155 git clone https://github.com/beetbox/beets.git
156 cd beets
157 pip install -e .
158
159 This approach lets you decide where the source is stored, with any changes
160 immediately reflected in your environment.
161
162 More details about the beets source are available on the :doc:`developer
163 documentation </dev/index>` pages.
164
165 .. _bugs:
166
167 …report a bug in beets?
168 -----------------------
169
170 We use the `issue tracker`_ on GitHub where you can `open a new ticket`_. Please
171 follow these guidelines when reporting an issue:
172
173 - Most importantly: if beets is crashing, please `include the traceback
174 <https://imgur.com/jacoj>`__. Tracebacks can be more readable if you put them
175 in a pastebin (e.g., `Gist <https://gist.github.com/discover>`__ or `Hastebin
176 <https://www.toptal.com/developers/hastebin>`__), especially when
177 communicating over IRC.
178 - Turn on beets' debug output (using the -v option: for example, ``beet -v
179 import ...``) and include that with your bug report. Look through this verbose
180 output for any red flags that might point to the problem.
181 - If you can, try installing the latest beets source code to see if the bug is
182 fixed in an unreleased version. You can also look at the :doc:`latest
183 changelog entries </changelog>` for descriptions of the problem you're seeing.
184 - Try to narrow your problem down to something specific. Is a particular plugin
185 causing the problem? (You can disable plugins to see whether the problem goes
186 away.) Is a some music file or a single album leading to the crash? (Try
187 importing individual albums to determine which one is causing the problem.) Is
188 some entry in your configuration file causing it? Et cetera.
189 - If you do narrow the problem down to a particular audio file or album, include
190 it with your bug report so the developers can run tests.
191
192 If you've never reported a bug before, Mozilla has some well-written `general
193 guidelines for good bug reports`_.
194
195 .. _find-config:
196
197 .. _general guidelines for good bug reports: https://bugzilla.mozilla.org/page.cgi?id=bug-writing.html
198
199 .. _issue tracker: https://github.com/beetbox/beets/issues
200
201 …find the configuration file (config.yaml)?
202 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
203
204 You create this file yourself; beets just reads it. See
205 :doc:`/reference/config`.
206
207 .. _special-chars:
208
209 …avoid using special characters in my filenames?
210 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
211
212 Use the ``%asciify{}`` function in your path formats. See
213 :ref:`template-functions`.
214
215 .. _move-dir:
216
217 …point beets at a new music directory?
218 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
219
220 If you want to move your music from one directory to another, the best way is to
221 let beets do it for you. First, edit your configuration and set the
222 ``directory`` setting to the new place. Then, type ``beet move`` to have beets
223 move all your files.
224
225 If you've already moved your music *outside* of beets, you have a few options:
226
227 - Move the music back (with an ordinary ``mv``) and then use the above steps.
228 - Delete your database and re-create it from the new paths using ``beet import
229 -AWC``.
230 - Resort to manually modifying the SQLite database (not recommended).
231
232 Why does beets…
233 ---------------
234
235 .. _nomatch:
236
237 …complain that it can't find a match?
238 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
239
240 There are a number of possibilities:
241
242 - First, make sure you have at least one autotagger extension/plugin enabled.
243 See :ref:`autotagger_extensions` for a list of valid plugins.
244 - Check that the album is in `the MusicBrainz database
245 <https://musicbrainz.org/>`__. You can search on their site to make sure it's
246 cataloged there. (If not, anyone can edit MusicBrainz---so consider adding the
247 data yourself.)
248 - If the album in question is a multi-disc release, see the relevant FAQ answer
249 above.
250 - The music files' metadata might be insufficient. Try using the "enter search"
251 or "enter ID" options to help the matching process find the right MusicBrainz
252 entry.
253 - If you have a lot of files that are missing metadata, consider using
254 :doc:`acoustic fingerprinting </plugins/chroma>` or :doc:`filename-based
255 guesses </plugins/fromfilename>` for that music.
256
257 If none of these situations apply and you're still having trouble tagging
258 something, please :ref:`file a bug report <bugs>`.
259
260 .. _plugins:
261
262 …appear to be missing some plugins?
263 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
264
265 Please make sure you're using the latest version of beets---you might be using a
266 version earlier than the one that introduced the plugin. In many cases, the
267 plugin may be introduced in beets "trunk" (the latest source version) and might
268 not be released yet. Take a look at :doc:`the changelog </changelog>` to see
269 which version added the plugin. (You can type ``beet version`` to check which
270 version of beets you have installed.)
271
272 If you want to live on the bleeding edge and use the latest source version of
273 beets, you can check out the source (see :ref:`the relevant question <src>`).
274
275 To see the beets documentation for your version (and avoid confusion with new
276 features in trunk), select your version from the menu in the sidebar.
277
278 .. _kill:
279
280 …ignore control-C during an import?
281 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
282
283 Typing a ^C (control-C) control sequence will not halt beets' multithreaded
284 importer while it is waiting at a prompt for user input. Instead, hit "return"
285 (dismissing the prompt) after typing ^C. Alternatively, just type a "b" for
286 "aBort" at most prompts. Typing ^C *will* work if the importer interface is
287 between prompts.
288
289 Also note that beets may take some time to quit after ^C is typed; it tries to
290 clean up after itself briefly even when canceled.
291
292 (For developers: this is because the UI thread is blocking on ``input`` and
293 cannot be interrupted by the main thread, which is trying to close all pipeline
294 stages in the exception handler by setting a flag. There is no simple way to
295 remedy this.)
296
297 .. _id3v24:
298
299 …not change my ID3 tags?
300 ~~~~~~~~~~~~~~~~~~~~~~~~
301
302 Beets writes ID3v2.4_ tags by default. Some software, including Windows (i.e.,
303 Windows Explorer and Windows Media Player) and `id3lib/id3v2
304 <https://sourceforge.net/projects/id3v2/>`__, don't support v2.4 tags. When
305 using 2.4-unaware software, it might look like the tags are unmodified or
306 missing completely.
307
308 To enable ID3v2.3 tags, enable the :ref:`id3v23` config option.
309
310 .. _id3v2.4: https://id3.org/id3v2.4.0-structure
311
312 .. _invalid:
313
314 …complain that a file is "unreadable"?
315 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
316
317 Beets will log a message like "unreadable file: /path/to/music.mp3" when it
318 encounters files that *look* like music files (according to their extension) but
319 seem to be broken. Most of the time, this is because the file is corrupted. To
320 check whether the file is intact, try opening it in another media player (e.g.,
321 `VLC <https://www.videolan.org/vlc/index.html>`__) to see whether it can read
322 the file. You can also use specialized programs for checking file
323 integrity---for example, type ``metaflac --list music.flac`` to check FLAC
324 files.
325
326 If beets still complains about a file that seems to be valid, `open a new
327 ticket`_ and we'll look into it. There's always a possibility that there's a bug
328 "upstream" in the `Mutagen <https://github.com/quodlibet/mutagen>`__ library
329 used by beets, in which case we'll forward the bug to that project's tracker.
330
331 .. _importhang:
332
333 …seem to "hang" after an import finishes?
334 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
335
336 Probably not. Beets uses a *multithreaded importer* that overlaps many different
337 activities: it can prompt you for decisions while, in the background, it talks
338 to MusicBrainz and copies files. This means that, even after you make your last
339 decision, there may be a backlog of files to be copied into place and tags to be
340 written. (Plugin tasks, like looking up lyrics and genres, also run at this
341 time.) If beets pauses after you see all the albums go by, have patience.
342
343 .. _replaceq:
344
345 …put a bunch of underscores in my filenames?
346 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
347
348 When naming files, beets replaces certain characters to avoid causing problems
349 on the filesystem. For example, leading dots can confusingly hide files on Unix
350 and several non-alphanumeric characters are forbidden on Windows.
351
352 The :ref:`replace` config option controls which replacements are made. By
353 default, beets makes filenames safe for all known platforms by replacing several
354 patterns with underscores. This means that, even on Unix, filenames are made
355 Windows-safe so that network filesystems (such as SMB) can be used safely.
356
357 Most notably, Windows forbids trailing dots, so a folder called "M.I.A." will be
358 rewritten to "M.I.A\_" by default. Change the ``replace`` config if you don't
359 want this behavior and don't need Windows-safe names.
360
361 .. _pathq:
362
363 …say "command not found"?
364 ~~~~~~~~~~~~~~~~~~~~~~~~~
365
366 You need to put the ``beet`` program on your system's search path. If you
367 installed using pip, the command ``pip show -f beets`` can show you where
368 ``beet`` was placed on your system. If you need help extending your ``$PATH``,
369 try `this Super User answer`_.
370
371 .. _open a new ticket: https://github.com/beetbox/beets/issues/new?template=bug-report.md
372
373 .. _pip: https://pip.pypa.io/en/stable/
374
375 .. _this super user answer: https://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them/284361#284361