Commit graph

2154 commits

Author SHA1 Message Date
RollingStar
82e8171d4a
Update changelog.rst 2024-11-17 18:55:16 -05:00
Šarūnas Nejus
7e9f7fc8de
Improve ListenBrainz error handling and simplify playlist handling (#5480)
Fixes #5459
2024-11-13 14:11:53 +00:00
adamharder3
a98cf47c06
Update docs/changelog.rst
Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2024-11-11 10:43:31 -05:00
Alok Saboo
24115167d3 Merge remote-tracking branch 'upstream/master' into lb_error 2024-11-10 20:23:34 -05:00
Adam Harder
8448d8b4be changelog 2024-11-06 23:27:18 -05:00
Joseph Bushell
2e6e1809e3 Update docs/changelog.rst
Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2024-10-26 18:18:06 +01:00
Alok Saboo
c49de7afe6 Update changelog.rst 2024-10-25 10:53:26 -04:00
RollingStar
fdb678cd1a
bitesize to good first issue: Update changelog.rst 2024-10-20 11:49:41 -04:00
Šarūnas Nejus
d3955bac65
Update Tekstowo backend to fetch lyrics directly
- Refactored Tekstowo backend to fetch lyrics directly from song pages.
- Added `encode` method to convert artist and title to their URL format,
  where non-alphanumeric characters are replaced with underscores.
- Removed the now redundant search functionality and associated tests.
- Simplified `extract_lyrics` method to directly parse lyrics without
  any checks.
2024-10-12 02:14:18 +01:00
Nicholas Boyd Isacsson
65096c425a Update changelog and documentation 2024-10-05 15:51:41 +02:00
Karl Besser
71b5a9651c Add reference to ftintitle plugin in changelog
Add references to the ftintitle plugin for the bug fixes #5441 and #5436
that are related to this plugin.
2024-09-30 10:20:29 -05:00
Karl-Ludwig Besser
ab86b2d1e8
Merge branch 'beetbox:master' into fix_false_positive_ftintitle 2024-09-30 10:17:19 -05:00
Andrew Rogl
04ee04150a
Reworked #4709 after latest release (#5447)
Fixes #4709 SQL use of Double Quoted Strings.
2024-09-30 10:28:15 +01:00
Karl Besser
85fc8e50cf Add changelog about fixing false positives in "feat. X" detection 2024-09-26 17:24:47 -04:00
Karl Besser
5aa96aad17 Add changelog entry about new "feat. X" matching 2024-09-23 12:31:02 -04:00
Arav K.
d3bc27a58f [changelog] Note 'platformdirs' integration 2024-09-20 23:27:36 +02:00
Konstantin
796c9addfb
Fixes TypeError in the Discogs plugin (#5415)
Handles the case when discogs return `None` for format descriptions.

---------

Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2024-09-19 21:27:16 +01:00
Šarūnas Nejus
c13f0f2f6e
Deezer: Improve requests error handling (#5421)
This PR adds gracefully handling requests error in teh Deezer plugin.
2024-09-17 18:52:42 +01:00
Šarūnas Nejus
5785522170
fetchart: defer file removal config option evaluation (#5244)
Defer the evaluation of the source file removal options (`import.delete`
and `import.move`) to the point where the fetchart plugin is actually
called instead of only evaluating those configuration options on plugin
initialization.
This is to allow other plugins (such as the
[ytimport](https://github.com/mgoltzsche/beets-ytimport/blob/v1.8.1/beetsplug/ytimport/__init__.py#L194)
plugin) to invoke the import directly (within the same python process;
implicitly invoking the fetchart plugin) with temporarily overwritten
configuration options.

Addresses
https://github.com/beetbox/beets/issues/5167#issuecomment-2106465172
2024-09-16 11:44:46 +01:00
Alok Saboo
f57dc66444 Deezer: Improve requests error handling
## Description

This PR adds gracefully handling requests error in teh Deezer plugin. Right now, it errors out when it receives error:

```bash
Traceback (most recent call last):
  File "/home/arsaboo/.local/bin/beet", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/ui/__init__.py", line 1865, in main
    _raw_main(args)
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/ui/__init__.py", line 1852, in _raw_main
    subcommand.func(lib, suboptions, subargs)
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/ui/commands.py", line 1395, in import_func
    import_files(lib, paths, query)
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/ui/commands.py", line 1326, in import_files
    session.run()
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/importer.py", line 360, in run
    pl.run_parallel(QUEUE_SIZE)
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/util/pipeline.py", line 447, in run_parallel
    raise exc_info[1].with_traceback(exc_info[2])
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/util/pipeline.py", line 312, in run
    out = self.coro.send(msg)
          ^^^^^^^^^^^^^^^^^^^
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/util/pipeline.py", line 195, in coro
    func(*(args + (task,)))
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/importer.py", line 1497, in lookup_candidates
    task.lookup_candidates()
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/importer.py", line 688, in lookup_candidates
    artist, album, prop = autotag.tag_album(
                          ^^^^^^^^^^^^^^^^^^
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/autotag/match.py", line 548, in tag_album
    for matched_candidate in hooks.album_candidates(
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/plugins.py", line 593, in decorated
    for v in generator(*args, **kwargs):
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/autotag/hooks.py", line 759, in album_candidates
    yield from plugins.candidates(items, artist, album, va_likely, extra_tags)
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/plugins.py", line 390, in candidates
    yield from plugin.candidates(
               ^^^^^^^^^^^^^^^^^^
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beets/plugins.py", line 772, in candidates
    results = self._search_api(query_type="album", filters=query_filters)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/arsaboo/.local/lib/python3.12/site-packages/beetsplug/deezer.py", line 282, in _search_api
    response.raise_for_status()
  File "/home/arsaboo/.local/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://api.deezer.com/search/album?q=album%3A%22Y+Hate+%3F%22+artist%3A%22Parmish+Verma%22
```

## To Do

- [ ] Documentation. (If you've added a new command-line flag, for example, find the appropriate page under `docs/` to describe it.)
- [x] Changelog. (Add an entry to `docs/changelog.rst` to the bottom of one of the lists near the top of the document.)
- [ ] Tests. (Very much encouraged but not strictly required.)
2024-09-15 11:34:29 -04:00
J0J0 Todos
98f4a88923
ftintitle: New customization option to keep feature in artist field (#5356) 2024-09-06 13:41:15 +02:00
Tânio Scherer
0b067e9f5b Create a new template function: capitalize
Update documentation

Update changelog
2024-09-05 23:00:50 -03:00
Karl-Ludwig Besser
39acba5200
Merge branch 'master' into ftintitle_keep_artist 2024-09-05 12:32:20 +02:00
ThinkChaos
65f2285dd3
fix(import): don't throw away album flexible fields
As noted by 5bf4e3d92f, MusicBrainz
external IDs (`*_album_id`) were only saved for items and not albums.
This commit addresses that by copying `AlbumInfo` fields to the `Album`,
i.e. what's saved in the DB.
This is similar to how `TrackInfo` fields are copied to `Item` instances
except the copying is done at a different time since we only get an
`Album` much later in the import flow.
2024-08-26 13:06:28 -04:00
Šarūnas Nejus
e3776f1910
autobpm: Do not import 'beat' subpackage immediately to improve startup time 2024-08-19 22:44:16 +01:00
Šarūnas Nejus
5b5c564a69
autobpm: Add a new beat_track_kwargs configuration option to autobpm 2024-08-19 22:44:16 +01:00
Šarūnas Nejus
49cae5ca23
autobpm: Fix the issue with tempo being a numpy array 2024-08-19 22:44:16 +01:00
Šarūnas Nejus
03cf567a90
autobpm: Add autobpm extra and update the docs
Given that librosa has been introducing breaking changes like there's no
tomorrow, use '^' version specifier to only allow updating the patch
version.
2024-08-19 22:44:16 +01:00
Serene
e33b513161
Remove beets.util.confit (#5334) 2024-07-21 10:29:01 +10:00
Karl Besser
43304a9eaa Add keep_artist_in_title to changelog 2024-07-09 23:53:12 -04:00
HomerHaddock
bdf9eb2a26 Change changelog to reflect fix to #4815 2024-07-07 23:23:22 -06:00
Arav K.
9a6245a593 Note the removal of beets.util.confit in the changelog 2024-06-26 02:11:57 +02:00
Max Goltzsche
90f0ae2d93
fetchart: defer file removal config option eval
Defer the evaluation of the source file removal options (`import.delete` and `import.move`) to the point where the fetchart plugin is actually called instead of only evaluating those configuration options on plugin initialization.
This is to allow other plugins (such as the [ytimport](https://github.com/mgoltzsche/beets-ytimport/blob/v1.8.1/beetsplug/ytimport/__init__.py#L194) plugin) to invoke the import directly (within the same python process; implicitly invoking the fetchart plugin) with temporarily overwritten configuration options.

Relates to https://github.com/beetbox/beets/issues/5167#issuecomment-2106465172
2024-06-26 01:53:04 +02:00
Serene
de0742b9d6
Merge branch 'master' into bug-fetchart-resize-logic-fix 2024-06-25 14:30:39 +10:00
Šarūnas Nejus
4e06b59b60
Filter albums by tracks fields and vice versa (#5327)
Fixes #4360

This PR enables querying albums by track fields and tracks by album
fields, and speeds up querying albums by `path` field.

It originally was part of #5240, however we found that the changes
related to the flexible attributes caused degradation in performance. So
this PR contains the first part of #5240 which joined `items` and
`albums` tables in queries.
2024-06-25 02:04:45 +01:00
Arkadiy Illarionov
859072ee9e Use typing_extensions only when needed
Self was added in Python 3.11
TypeAlias was added in Python 3.10
2024-06-22 16:02:24 +03:00
Šarūnas Nejus
981a61bd56
Add support for filtering relations 2024-06-21 15:05:29 +01:00
Šarūnas Nejus
2800a323a2
Revert "Make queries fast, filter all flexible attributes (#5240)"
This reverts commit 143b9202f3, reversing
changes made to 8508a57d77.
2024-06-19 21:51:44 +01:00
Šarūnas Nejus
2f80ff07e4
Add a changelog note and a mention in queries.rst 2024-06-16 23:44:07 +01:00
Serene
8a28fd5707
Remove the beet executable and update shebangs (#5303)
## Description

This is a very simple PR, just removing the (apparently unused) `beet`
executable from the repository and substituting `bin/env python` for
`bin/python3` where possible.

Fixes #4604.
2024-06-15 11:11:50 +10:00
Šarūnas Nejus
a3721fea81
Check all Python files when poetry.lock changes 2024-06-14 20:12:19 +01:00
Arav K.
8b3890bb4d [changelog] note the removal of the 'beet' script 2024-06-14 14:55:06 +02:00
Šarūnas Nejus
a4ed6ab62a
Document the changes 2024-06-10 13:46:27 +01:00
Serene
f01d80902b
Fix reflink: "auto" option (#5288) 2024-06-10 20:20:21 +10:00
Leo Nikkilä
7bcca193d5 Fix reflink: "auto" option
The docs say:

> The `auto` option uses reflinks when possible and falls back to plain
> copying when necessary.

I've been using this option for a while, and recently discovered that
despite the option, copying fails between two BTRFS filesystems with:

    Error: OS/filesystem does not support reflinks. during link of paths /mnt/fs1/file, /mnt/fs2/file

I tracked this down to how the configuration is handled in the importer.
2024-06-08 01:26:24 +03:00
Šarūnas Nejus
3e5e1eca87
release.py: simplify bumping the version
Additionally, update the 'in progress' header in the changelog: instead
of using a specific version number, simply say 'Unreleased' since we do
not know in advance what version will the changes be eventually
released.

This also simplifies latest changelog retrieval.
2024-06-07 09:01:44 +01:00
Šarūnas Nejus
0aa361e6c8
Remove support for Python 3.7 in the build and docs 2024-06-05 04:41:02 +01:00
Kirill A. Korinsky
d8ea474764
Update changelog.rst 2024-06-03 13:28:47 +02:00
Serene
731acd848c
Add timeout argument to all requests calls (#5262) 2024-06-02 14:44:28 +10:00
Serene-Arc
6edd80a1d5
Fix changelog version 2024-05-30 14:21:30 +10:00
Serene-Arc
33ab22db8c Increment version numbers to 2.0.0 2024-05-30 04:05:25 +00:00
Lev Gorodetskiy
53d72c14ea
Update changelog 2024-05-25 12:28:08 -03:00
Serene
7543a351ed
Merge pull request #5184 from freddiewanah/master
Enhancement: Refactor Test Code for Efficiency and Quality
2024-04-21 09:06:38 +10:00
J0J0 Todos
d510177820
Merge pull request #5121 from mgoltzsche/generate-playlist-item-attributes 2024-04-20 08:04:32 +02:00
ktetzlaff
b47635dc29 Prefer VISUAL environment variable over EDITOR
When unix tools make use of an external editor, they typically check the
environment variable VISUAL and fall back to EDITOR. This commit adds the
additional check for VISUAL to the existing EDITOR check (where VISUAL is
preferred over EDITOR).
2024-04-14 12:15:30 +02:00
Serene
125f26fdb1
Merge pull request #5160 from Dr-Blank/bug-unimported-failing-to-ignore-subdirectories 2024-04-14 12:58:53 +10:00
Max Goltzsche
c0afd3eb3c
smartplaylist: allow exporting item fields
Allow generating extm3u playlists so that they contain additional item fields such as the `id`.

The feature is required by the mgoltzsche/beets-webm3u plugin (M3U server) to transform playlists using a request based item URI template which may require additional fields such as the `id`, e.g. `beets:library:track;$id`.
2024-04-13 04:55:37 +02:00
Dr-Blank
c3e922e2d2
missing changelog for #5153 2024-04-11 14:12:46 -04:00
Dr-Blank
ada2f80de6
add changelog entry for bug-fix 2024-04-11 13:05:46 -04:00
Dr-Blank
640c9613c0
add changelog for bug fix 2024-04-11 13:01:04 -04:00
freddiewanah
52271bc093 update changelog 2024-04-10 15:57:37 +02:00
InvisibleFunction
33c8ae7a4b Update in response to comments 2024-03-07 09:11:54 -05:00
InvisibleFunction
94e294581b Update Changelog 2024-03-06 09:12:58 -05:00
Serene
3548e35360
Merge pull request #5122 from Bobo1239/master
convert: Correctly identify WAVE format as lossless
2024-03-02 09:05:53 +10:00
Boris-Chengbiao Zhou
47ba590999 convert: Correctly identify WAVE format as lossless
Seems like this entry was added before mediafile gained support for WAVE
files in commit 832f3d. Adjust it to fix detection.
2024-03-01 17:58:26 +01:00
Serene
fa8b1201c3
Merge pull request #5103 from Josef-Friedrich/remove-unused-functions
Remove unused functions
2024-03-01 15:59:31 +10:00
Serene
35e8eb985f
Merge pull request #5058 from arsaboo/lb
Add initial version of the Listenbrainz plugin
2024-03-01 15:51:50 +10:00
Josef Friedrich
7abaa2da98 Document change in the changelog.rst 2024-02-12 09:56:24 +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
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
Alok Saboo
ce023a3c53 Revert unwanted commits 2023-12-25 17:14:45 -05:00
Alok Saboo
7838e70d41 Revert "Merge remote-tracking branch 'upstream/master' into lb"
This reverts commit 6bfe26642c, reversing
changes made to 9b8dbe8055.
2023-12-23 12:25:22 -05:00
Alok Saboo
6bfe26642c Merge remote-tracking branch 'upstream/master' into lb 2023-12-23 12:19:30 -05:00
Alok Saboo
a88591824c Add lastimport changelog 2023-12-23 10:32:26 -05:00
Alok Saboo
7f4da6e023 Update changelog.rst 2023-12-20 10:46:35 -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
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
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
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
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
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
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
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
Max Goltzsche
177f284d40
expose incremental_skip_later as cli option
Closes #4958
2023-12-05 01:03:22 +01:00
Max Goltzsche
8a3b9acdee
expose import.quiet_fallback as cli option 2023-12-04 22:56:25 +01:00
Alok Saboo
79216e1f64 Update changelog.rst 2023-12-04 10:37:06 -05:00
RollingStar
ae8866f85c
Update changelog.rst for config_default 2023-12-04 01:43:54 -05:00
Adrian Sampson
df2d6ae753
Merge branch 'master' into deezer_error 2023-12-02 13:49:16 -05:00
Adrian Sampson
85268ad061
Merge pull request #5013 from arsaboo/spotify_error
Spotify: Add 502 error handling
2023-12-02 13:35:08 -05:00
Alok Saboo
079936c826 Merge remote-tracking branch 'upstream/master' into deezer_error 2023-12-01 08:40:58 -05:00
Alok Saboo
51c017ab6f Update changelog.rst 2023-11-28 10:04:04 -05:00