Skip to content

Commit 69dc06d

Browse files
committed
Make musicbrainzngs dependency optional and requests required
1 parent d8f201e commit 69dc06d

File tree

7 files changed

+55
-23
lines changed

7 files changed

+55
-23
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ jobs:
5858
- if: ${{ env.IS_MAIN_PYTHON != 'true' }}
5959
name: Test without coverage
6060
run: |
61-
poetry install --without=lint --extras=autobpm --extras=lyrics --extras=replaygain --extras=reflink --extras=fetchart --extras=chroma --extras=sonosupdate
61+
poetry install --without=lint --extras=autobpm --extras=lyrics --extras=replaygain --extras=reflink --extras=fetchart --extras=chroma --extras=sonosupdate --extras=parentwork
6262
poe test
6363
6464
- if: ${{ env.IS_MAIN_PYTHON == 'true' }}
6565
name: Test with coverage
6666
env:
6767
LYRICS_UPDATED: ${{ steps.lyrics-update.outputs.any_changed }}
6868
run: |
69-
poetry install --extras=autobpm --extras=lyrics --extras=docs --extras=replaygain --extras=reflink --extras=fetchart --extras=chroma --extras=sonosupdate
69+
poetry install --extras=autobpm --extras=lyrics --extras=docs --extras=replaygain --extras=reflink --extras=fetchart --extras=chroma --extras=sonosupdate --extras=parentwork
7070
poe docs
7171
poe test-with-coverage
7272

docs/plugins/listenbrainz.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,12 @@ service.
99
Installation
1010
------------
1111

12-
To enable the ListenBrainz plugin, add the following to your beets configuration
13-
file (config.yaml_):
12+
To use the ``listenbrainz`` plugin, first enable it in your configuration (see
13+
:ref:`using-plugins`). Then, install ``beets`` with ``listenbrainz`` extra
1414

15-
.. code-block:: yaml
15+
.. code-block:: bash
1616
17-
plugins:
18-
- listenbrainz
17+
pip install "beets[listenbrainz]"
1918
2019
You can then configure the plugin by providing your Listenbrainz token (see
2120
intructions here_) and username:

docs/plugins/mbcollection.rst

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,18 @@ maintain your `music collection`_ list there.
66

77
.. _music collection: https://musicbrainz.org/doc/Collections
88

9-
To begin, just enable the ``mbcollection`` plugin in your configuration (see
10-
:ref:`using-plugins`). Then, add your MusicBrainz username and password to your
11-
:doc:`configuration file </reference/config>` under a ``musicbrainz`` section:
9+
Installation
10+
------------
11+
12+
To use the ``mbcollection`` plugin, first enable it in your configuration (see
13+
:ref:`using-plugins`). Then, install ``beets`` with ``mbcollection`` extra
14+
15+
.. code-block:: bash
16+
17+
pip install "beets[mbcollection]"
18+
19+
Then, add your MusicBrainz username and password to your :doc:`configuration
20+
file </reference/config>` under a ``musicbrainz`` section:
1221

1322
::
1423

docs/plugins/missing.rst

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,21 @@ This plugin adds a new command, ``missing`` or ``miss``, which finds and lists
55
missing tracks for albums in your collection. Each album requires one network
66
call to album data source.
77

8+
Installation
9+
------------
10+
11+
To use the ``missing`` plugin, first enable it in your configuration (see
12+
:ref:`using-plugins`). Then, install ``beets`` with ``missing`` extra
13+
14+
.. code-block:: bash
15+
16+
pip install "beets[missing]"
17+
818
Usage
919
-----
1020

11-
Add the ``missing`` plugin to your configuration (see :ref:`using-plugins`). The
12-
``beet missing`` command fetches album information from the origin data source
13-
and lists names of the **tracks** that are missing from your library.
21+
The ``beet missing`` command fetches album information from the origin data
22+
source and lists names of the **tracks** that are missing from your library.
1423

1524
It can also list the names of missing **albums** for each artist, although this
1625
is limited to albums from the MusicBrainz data source only.

docs/plugins/parentwork.rst

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,15 @@ This plugin adds seven tags:
3838
to keep track of recordings whose works have changed.
3939
- **parentwork_date**: The composition date of the parent work.
4040

41-
To use the ``parentwork`` plugin, enable it in your configuration (see
42-
:ref:`using-plugins`).
41+
Installation
42+
------------
43+
44+
To use the ``parentwork`` plugin, first enable it in your configuration (see
45+
:ref:`using-plugins`). Then, install ``beets`` with ``parentwork`` extra
46+
47+
.. code-block:: bash
48+
49+
pip install "beets[parentwork]"
4350
4451
Configuration
4552
-------------

poetry.lock

Lines changed: 10 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ confuse = ">=1.5.0"
4848
jellyfish = "*"
4949
lap = ">=0.5.12"
5050
mediafile = ">=0.12.0"
51-
musicbrainzngs = ">=0.4"
5251
numpy = ">=1.24.4"
5352
platformdirs = ">=3.5.0"
5453
pyyaml = "*"
54+
requests = ">=2.32.5"
5555
requests-ratelimiter = ">=0.7.0"
5656
typing_extensions = "*"
5757
unidecode = ">=1.3.6"
@@ -62,6 +62,7 @@ flask = { version = "*", optional = true }
6262
flask-cors = { version = "*", optional = true }
6363
langdetect = { version = "*", optional = true }
6464
librosa = { version = "^0.10.2.post1", optional = true }
65+
musicbrainzngs = { version = ">=0.4", optional = true }
6566
mutagen = { version = ">=1.33", optional = true }
6667
Pillow = { version = "*", optional = true }
6768
py7zr = { version = "*", optional = true }
@@ -73,7 +74,6 @@ python3-discogs-client = { version = ">=2.3.15", optional = true }
7374
pyxdg = { version = "*", optional = true }
7475
rarfile = { version = "*", optional = true }
7576
reflink = { version = "*", optional = true }
76-
requests = { version = "*", optional = true }
7777
resampy = { version = ">=0.4.3", optional = true }
7878
requests-oauthlib = { version = ">=0.6.1", optional = true }
7979
soco = { version = "*", optional = true }
@@ -152,9 +152,13 @@ import = ["py7zr", "rarfile"]
152152
kodiupdate = ["requests"]
153153
lastgenre = ["pylast"]
154154
lastimport = ["pylast"]
155+
listenbrainz = ["musicbrainzngs"]
155156
lyrics = ["beautifulsoup4", "langdetect", "requests"]
157+
mbcollection = ["musicbrainzngs"]
156158
metasync = ["dbus-python"]
159+
missing = ["musicbrainzngs"]
157160
mpdstats = ["python-mpd2"]
161+
parentwork = ["musicbrainzngs"]
158162
plexupdate = ["requests"]
159163
reflink = ["reflink"]
160164
replaygain = [

0 commit comments

Comments
 (0)