Commit graph

11575 commits

Author SHA1 Message Date
Serene-Arc
35257c7cd0 Exclude flake8 rule for black compatibility 2024-03-01 15:34:50 +10:00
Serene-Arc
96b6cea772 Update versions 2024-03-01 15:21:25 +10:00
Serene-Arc
22d8f89735 Pin formatter version 2024-03-01 15:21:25 +10:00
Serene-Arc
83242fd7cf Apply formatting 2024-03-01 15:21:25 +10:00
J0J0 Todos
dae525741b
Merge pull request #5096 from raspbeguy/alpine 2024-02-21 13:33:46 +01:00
raspbeguy
258e52af5b
Add alpine instructions 2024-02-06 09:19:17 +01:00
Serene
7f1250dd0a
Merge pull request #5084 from sumpfralle/finalize-beets-test-exposure
Finalize beets.test packaging
2024-01-18 13:19:21 +10:00
Lars Kruse
3c2a66e148 build: add missing "beets.test" package
In commit 508d28f66b the package `beets.test` was introduced.
But it was not added to the list of packages in `setup.py`.
Thus, it was not part of a beets installation for now.
2024-01-18 00:13:48 +01:00
Lars Kruse
7b1bee6c38 style: apply alphabetical order to all lists in setup.py 2024-01-18 00:02:33 +01:00
Serene
ddb34de72a
Merge pull request #5081 from mthies-unibi/zsh-completion-fixes
Fixes zsh completion dependency on specific awk/sed/sqlite3 versions and settings
2024-01-17 21:43:21 +10:00
Michael Thies
35af8d363a added changelog entry 2024-01-17 10:36:56 +01:00
Serene
5c964ce77d
Merge pull request #5068 from sumpfralle/reusable-test-code
Allow reuse of test code in other projects
2024-01-16 14:28:31 +10:00
Lars Kruse
508d28f66b tests: move reusable test-related modules into the beets package
External Python packages interfacing beets may want to use an in-memory
beets library instance for testing beets-related code.
The `TestHelper` class is very helpful for this purpose.
Previously `TestHelper` was located in the `test/` directory.
Now it is part of `beets` itself (`beets.test.helper.TestHelper`) and
can be easily imported.
2024-01-15 19:40:57 +01:00
Lars Kruse
2b99c12430 tests: move TerminalImportSessionSetup from tests.test_ui_importer to test.helper
This class is imported by some other test modules.
Thus, it should reside in a module, which is obviously used by other
tests.
2024-01-15 19:40:57 +01:00
Lars Kruse
7707e23456 tests: move reusable components from test.test_importer to test.helper
`ImportHelper` and `AutotagStub` are used in many tests.
Thus, they should reside in a module which is obviously used by multiple
tests.
2024-01-15 19:40:57 +01:00
Lars Kruse
4c2362b361 tests: remove import path mangling while importing 'test._common'
The import path mangling is not relevant (anymore?) for the two
ways of running tests:

* `python3 test/testall.py` (see CONTRIBUTING.rst):
  The `testall.py` script already adds the project path to `sys.path`.
* `tox -e py-cov`: this command is supposed to be run from the project
  path. Thus, the current directory is already the first of location
  in `sys.path`.

The previous mangling of the import path while loading a module could
lead to unwanted side-effects hidden in an unexpected location.
Instead, import path mangling should take place in the script being
called by the user (here: `testall.py`).
2024-01-15 19:40:57 +01:00
Serene
7df14b6b3f
Merge pull request #5080 from sumpfralle/remove-sphinx-version-pin
build: remove version pin for Sphinx
2024-01-15 21:16:50 +10:00
Lars Kruse
3d308f9b6a build: remove version pin for Sphinx
In cf69cad56f the Sphinx version was pinned to "<4.4.0".

The issue at that time (a spurious warning) is described in:
  https://github.com/sphinx-doc/sphinx/issues/10112

The problematic check was removed in Sphinx v4.5:
  https://www.sphinx-doc.org/en/master/changes.html#id334

The issue of spurious warnings was finally fixed in v5.x:
  https://github.com/sphinx-doc/sphinx/pull/10137

Technically it would be suitable to add a negative version pin of Sphinx
for "4.4".
But that version is quite outdated and at least Debian never shipped
Sphinx v4.4 in a stable release.

We force sphinx to be at least v5 in order to fix an unrelated recent
compatibility requirement of `sphinxcontrib.applehelp`.
2024-01-15 12:00:53 +01:00
Michael Thies
c153f72e47 zsh completion script for the beet command is more portable now:
- avoids the mawk-specific {,n} regex operator
- a directly usable sqlite3 output format is selected explicitly, when retrieving suggestions for field values; this avoids the previously used GNU-sed-specific post-processing of the sqlite3 output
- completion caching is enabled for the beet command and its parameter contexts, even if not enabled globally by the user; caching is required for field value suggestions
2024-01-15 09:58:39 +01:00
Serene
828c6e7dbd
Merge pull request #5064 from Maxr1998/fix-multi-value-field-rewrite
advancedrewrite: Fix multi-valued fields specified as a single string
2024-01-13 19:37:58 +10:00
Maxr1998
ba66808c74
advancedrewrite: Fix multi-valued fields specified as a single string 2024-01-01 19:33:22 +01:00
Adrian Sampson
296f01b775
Merge pull request #5057 from mgoltzsche/fix-web-plugin-range-requests
web: fix/add range request support
2023-12-22 08:46:44 -05:00
Max Goltzsche
6b929c6e72
web: fix range request support
Do not let the web plugin overwrite the Content-Length header with the full file length since flask/werkzeug sets the requested range's/chunk's size when handling a range request.
This allows to play large audio/opus files using e.g. a browser/firefox or gstreamer/mopidy without making a reverse-proxy/nginx emulate range request support and hide range-related headers from the backend.
2023-12-20 01:23:13 +01:00
J0J0 Todos
bcf180d14d
Merge pull request #4987 from RollingStar/master 2023-12-17 18:04:28 +01:00
RollingStar
d927262bd5
Merge branch 'master' into master 2023-12-17 10:48:31 -05:00
RollingStar
9f958b886e
Update docs/changelog.rst
Co-authored-by: J0J0 Todos <2733783+JOJ0@users.noreply.github.com>
2023-12-17 10:47:41 -05:00
Adrian Sampson
3ea4a0ba46
Merge pull request #5050 from Maxr1998/abort-on-template-field-conflicts
beetsplug: Error out on conflicts in template functions
2023-12-16 10:51:14 -05:00
Adrian Sampson
3165d5dec0
Merge pull request #5048 from mgoltzsche/smartplaylist-track-path-template
smartplaylist: add --uri-format option
2023-12-16 10:49:55 -05:00
Maxr1998
e64ee0b0cd
beetsplug: Error out on conflicts in template functions
Raises an exception if multiple plugins provide template functions for the same field.

Closes #5002, supersedes #5003.
2023-12-16 16:38:32 +01:00
Max Goltzsche
58e5b02929
smartplaylist: add --uri-format option
Beets web API already allows remote players to access audio files but it doesn't provide a way to expose the playlists defined using the smartplaylist plugin.
Now the smartplaylist plugin provides an option to generate ID-based item URIs/URLs instead of paths.
Once playlists are generated this way, they can be served using a regular HTTP server such as nginx.

To provide sufficient flexibility for various ways of integrating beets remotely (e.g. beets API, beets API with context path, AURA API, mopidy resource URI, etc), the new option has been defined as a template with an `$id` placeholder (assuming each remote integration requires a different path schema but they all rely on using the beets item `id` as identifier/path segment).

To prevent local path-related plugin configuration from leaking into a HTTP URL-based playlist generation (invoked with CLI option in addition to the local playlists generated into another directory), setting the new option makes the plugin ignore the other path-related options `prefix`, `relative_to`, `forward_slash` and `urlencode`.

Usage examples:
* `beet splupdate --uri-format 'http://beets:8337/item/$id/file'` (for beets web API)
* `beet splupdate --uri-format 'http://beets:8337/aura/tracks/$id/audio'` (for AURA API)

(While it was already possible to generate playlists containing HTTP URLs previously using the `prefix` option, it did not allow to generate ID-based URLs pointing to the beets web API but required to expose the audio files using a web server directly and refer to them using their file system `$path`.)

Relates to #5037
2023-12-16 05:37:27 +01:00
Serene
adf4b9779a
Merge pull request #5053 from mgoltzsche/change-smartplaylist-extm3u-option
smartplaylist: change option --extm3u to --output
2023-12-16 12:59:16 +10:00
Max Goltzsche
385c05f98e
smartplaylist: change option --extm3u to --output
The boolean flags `--extm3u` and `--no-extm3u` are replaced with a string option `--output=m3u|m3u8`.
This reduces the amount of options and allows to evolve the CLI to support more playlist output formats in the future (e.g. JSON) without polluting the CLI at that point.
2023-12-16 00:23:03 +01:00
Adrian Sampson
b803d8446f
Merge pull request #5052 from Maxr1998/advanced-rewrite-more-corresponding-field-rewrites
advancedrewrite: Apply same rewrite to more corresponding album fields
2023-12-15 12:37:34 -05:00
Adrian Sampson
d4561664e6
Merge pull request #5051 from Maxr1998/advancedrewrite-docs-quote-issues
advancedrewrite: Add note about quoting issues to docs
2023-12-15 12:36:48 -05:00
Maxr1998
41719d7b49
advancedrewrite: Apply same rewrite to more corresponding album fields 2023-12-15 17:23:40 +01:00
Maxr1998
6e5bcbc070
advancedrewrite: Add note about quoting issues to docs 2023-12-15 17:14:00 +01:00
Adrian Sampson
1efd67cb82
Merge pull request #5044 from Maxr1998/advancedrewrite-rewrite
advancedrewrite: Support simple syntax and improve advanced syntax
2023-12-15 09:34:25 -05:00
Serene
618af1511e
Merge pull request #5047 from mgoltzsche/expose-smartplaylist-cli-opts
smartplaylist: expose config as CLI options
2023-12-15 14:44:46 +10:00
Max Goltzsche
222b3a34f9
smartplaylist: expose config as CLI options
Add CLI options to `splupdate` command:
* `--playlist-dir`, `-d`
* `--relative-to`
* `--prefix`
* `--urlencode`
* `--forward-slash`
* `--pretend-paths`
2023-12-15 03:51:27 +01:00
J0J0 Todos
bf6eb04827
Merge pull request #5034 from beetbox/YES_NO_COLOR 2023-12-14 23:37:56 +01:00
Serene
60ad1ba0d2
Merge pull request #5046 from mgoltzsche/add-extinf-support
smartplaylist: add extm3u/extinf/m3u8 support
2023-12-14 11:01:27 +10:00
Max Goltzsche
b07a2e42f4
smartplaylist: add extm3u/extinf/m3u8 support
This is to be able to display meaningful metadata and search a playlist within a player without having to load the linked audio files of a playlist.
2023-12-14 01:46:14 +01:00
Maxr1998
304a052dfd
advancedrewrite: Support simple syntax and improve advanced syntax 2023-12-13 14:48:43 +01:00
Maxr1998
4b1c7dd8be
Specify new advancedrewrite configuration in docs 2023-12-13 11:25:27 +01:00
David Logie
fd795c9da6 Add changelog entry for #5028. 2023-12-12 09:03:17 +00:00
J0J0 Todos
c1a232ec7b Fix some changelog entries 2023-12-11 11:01:54 +01:00
Adrian Sampson
0604aeadc1
Merge pull request #5022 from mgoltzsche/expose-incremental-skip-later-opt
expose incremental_skip_later as cli option
2023-12-10 11:45:36 -05:00
David Logie
2136f3a3cd Bring back NO_COLOR support.
Fixes #5028.
2023-12-07 09:28:29 +00:00
J0J0 Todos
e5d10004ae
Merge pull request #4807 from doronbehar/mbsubmit-improvements
mbsubmit: Add picard `PromptChoice`
2023-12-06 13:08:20 +01:00
Doron Behar
9357448bde mbsubmit: document new prompt choices 2023-12-05 19:21:38 +02:00