Commit graph

3678 commits

Author SHA1 Message Date
J0J0 Todos
7c22cd635c duplicates: Add changelog for --remove option 2025-07-05 07:24:26 +02:00
J0J0 Todos
549847bfd8 duplicates: Add docs for --remove option 2025-07-05 07:22:28 +02:00
Noor
ac96b9b64e
Preserve line breaks for example cases in substitution plugin docs (#5846)
## Description

Adds line block markup to example substitutions in the plugin
documentation, so that each case is shown on a separate line:

> The replacement can be an expression utilising the matched regex,
allowing us to create more general rules. Say for example, we want to
sort all albums by multiple artists into the directory of the first
artist. We can thus capture everything before the first ,, `` &`` or ``
and``, and use this capture group in the output, discarding the rest of
the string.
> 
> ```yaml
> substitute:
>  ^(.*?)(,| &| and).*: \1
> ```
>
> This would handle all the below cases in a single rule:
>
>> Bob Dylan and The Band -> Bob Dylan
>> Neil Young & Crazy Horse -> Neil Young
>> James Yorkston, Nina Persson & The Second Hand Orchestra -> James
Yorkston
2025-07-02 18:40:37 +00:00
dhruvravii
dd6cb538ac
Fix: Spotify plugin unable to recognize Chinese and Japanese albums. (#5705)
Fixes an issue where each spotify query was converted to ascii before sending. Adds a 
new config option to enable legacy behaviour.

A file called japanese_track_request.json was made to mimic the Spotify
API response since I don't have the credentials. Entries in that will
need to be modified with the actual entries.

Co-authored-by: Sebastian Mohr <sebastian@mohrenclan.de>
Co-authored-by: Sebastian Mohr <39738318+semohr@users.noreply.github.com>
Co-authored-by: J0J0 Todos <2733783+JOJ0@users.noreply.github.com>
2025-07-01 11:08:54 +02:00
Nicolas Mémeint
4893cee5e5 Fix the MusicBrainz search not taking into account the album/recording aliases 2025-06-15 21:33:20 +01:00
Ben Stolovitz
2f98f11d57 fix local langdetect test failures
avoid linter error

avoid other linter error

fix format

changing deps (no lock!)

poetry lock?

lint & format

attempt 2 at poetry lock

crlf -> lf line endings

changelog!
2025-05-31 18:56:21 -04:00
Ian McCowan
0f76312f31
Fix duplicate database change event send on Library.add (#5561)
## Description

Fixes #5560. Also a couple other incidental changes / improvements:
* Add `EventType` that holds the actual string literals used for event
sending. With type checking, this can prevent subtle bugs resulting from
misspelled event names.
* Fix `HiddenFileTest` by using `bytestring_path()`

## To Do

- [x] ~Documentation.~
- [x] Changelog.
- [x] Tests.

---------

Co-authored-by: J0J0 Todos <jojo@peek-a-boo.at>
Co-authored-by: J0J0 Todos <2733783+JOJ0@users.noreply.github.com>
2025-05-30 13:41:29 +00:00
Uncorrupt3318
dd2f203090
Feat: Add replace plugin (#5644)
Adds replace plugin. The plugin allows the user to replace the audio
file of a song, while keeping the tags and file name.

Some music servers keep track of favourite songs via paths and tags. Now
there won't be a need to 'refavourite'. Plus, this skips the
import/merge steps.
2025-05-27 00:17:52 +02:00
Ben Stolovitz
da5ec00aaf
[Test] Fix path tests on windows (#5803)
## Description

Fixes #5802.

Today, tests fail on most Windows machines because we hard-code `D:` as
the root drive, but most machines use `C:`. This change uses the same
normalization function in the test assertion to ensure the drives match.

## To Do

- [ ] ~~Documentation.~~
- [x] Changelog.
- [x] Tests. (this is a tests change)

## What changed?

* Updated tests to generate the drive name via normalization, instead of
hard-coding `D:`.
* Updated the `Item::destination()` method to document the
`relative_to_libdir` param.

## How tested?

* [x] Tests pass locally.
2025-05-26 19:24:57 +02:00
Sebastian Mohr
9584216209
Streamlined auto api referencing for documentation (#5795)
## Description

The current developer documentation feels somewhat cluttered due to
inline auto-generated API references for certain classes. To improve
readability and maintainability, this PR introduces a more streamlined
approach that aligns better with best practices observed in other PyData
ecosystem documentation.

Specifically, this PR:
- Adds a dedicated `api/` folder to the documentation structure.
- Moves all auto-generated references (classes, methods, etc.) to this
folder.
- Enables clean, concise linking to API elements from the narrative
documentation—without interrupting human-written content with large
autogenerated blocks.

This separation makes the documentation easier to navigate and maintain,
while still providing full API reference coverage where needed.

- [x] Documentation
- [x] Changelog
2025-05-22 11:35:40 +02:00
wisp3rwind
4fdfb393db update changelog 2025-05-20 08:59:49 +02:00
Šarūnas Nejus
e151b4b49b
Implement track_for_id to allow fetching singletons by discogs id 2025-05-19 09:43:56 +01:00
Šarūnas Nejus
9242db04a5
discogs: add configurable search_limit 2025-05-19 09:42:06 +01:00
Šarūnas Nejus
e8e9369bc7
Remove unused extra_tags parameter 2025-05-19 09:18:06 +01:00
Šarūnas Nejus
6487893315
Synchronise docs with the actual supported extra_tags 2025-05-18 20:09:51 +01:00
Šarūnas Nejus
be74936134
Handle extra_tags the way they used to be handled 2025-05-18 20:09:50 +01:00
Martin Atukunda
1714705875 doc: plugin/web: now shows notifications using Media Session API 2025-05-18 17:16:29 +01:00
Sebastian Mohr
a2e316d444 Merge remote-tracking branch 'upstream/master' into importer-restructure 2025-05-17 10:32:50 +02:00
Šarūnas Nejus
3f1d117078
Add musicbrainz to plugins docs 2025-05-17 03:32:00 +01:00
Šarūnas Nejus
e981fb1aea
Deprecate musicbrainz.enabled configuration 2025-05-17 03:32:00 +01:00
Šarūnas Nejus
874fb3da7b
Add changelog note about musicbrainz 2025-05-17 03:32:00 +01:00
Šarūnas Nejus
7ff73d9747
musicbrainz: set default config in the code 2025-05-17 03:31:59 +01:00
Šarūnas Nejus
736d7d5fd0
Make musicbrainz docs follow the typical style 2025-05-17 03:31:59 +01:00
Šarūnas Nejus
df56bfeec9
Move musicbrainz docs to a separate file 2025-05-17 03:31:59 +01:00
snejus
d487d675b9 Increment version to 2.3.1 2025-05-14 09:53:19 +00:00
Šarūnas Nejus
28781e9077
Pin Poetry version <2 2025-05-14 10:42:07 +01:00
Gavin Tronset
b92a1b3d98
Add beets-filetote to community plugins docs (#5779)
Add link to community plugin
[`beets-filetote`](https://github.com/gtronset/beets-filetote).

This plugin is the spiritual successor to
[beets-copyartifacts](https://github.com/adammillerio/beets-copyartifacts)
(`beets-copyartifacts3` was last updated 3 years ago) and
[beets-extrafiles](https://github.com/Holzhaus/beets-extrafiles) (last
updated 5 years ago).

Given the updates and changes in beets and how outdated those plugins
are, does it make sense to keep `beets-copyartifacts` in the community
plugins list?

---------

Co-authored-by: Sebastian Mohr <39738318+semohr@users.noreply.github.com>
2025-05-13 18:48:43 +02:00
Sebastian Mohr
68acaa6470 Renamed all action occurrences with Action. 2025-05-13 13:01:46 +02:00
Šarūnas Nejus
de09c3217a
Do not 'legalize' paths by removing everything following a dot
TIL that `with_suffix` does not simply append the suffix to the filename
- it instead replaces the old/current suffix. Or whatever seems to
look like a suffix, in our case, unfortunately...
2025-05-12 09:14:24 +01:00
jwynn6
677204238c
Update pathformat.rst (#5754)
Added explainer about escaping closing braces `$}`
2025-05-11 00:55:55 +00:00
snejus
250b0da900 Increment version to 2.3.0 2025-05-07 22:34:25 +00:00
Aidan Epstein
ecdff785f7
Only output verbose details for parentwork plugin when running explicitly (#5135)
Fixes #4120.
2025-05-04 09:34:37 +02:00
Sebastian Mohr
f878e4da3e
Merge branch 'master' into typehints-plugins 2025-04-15 11:52:08 +02:00
Sebastian Mohr
7e61027366 Added suggestions from code review 2025-04-15 11:49:24 +02:00
Sebastian Mohr
b4a634a443
Allow to pickle db models by removing the current connection. (#5641)
## Description

This might be a quick one, depending on how you feel about it... It
allows you to pickle DB model objects. I don't think this is used
directly in Beets, but it might be useful in general. For instance, we
encountered an issue where we wanted to quickly pickle an Item or Album.
This sometimes worked and other times failed, which seemed quite
inconsistent.

Some DB model methods and properties have the side effect of attaching
an SQLite connection to self (._db), which prevents serialization. The
fix is quite straightforward, so I thought we might want to integrate
this into beets directly.

## To Do

- [x] Changelog
- [x] Tests
2025-04-15 11:43:36 +02:00
Peter Dolan
447cc82e04
Do not write unchanged items to the library in FtInTitle (#5718)
FtInTitle performs a library store operation for every item it
processes, whether or not the item has changed. By limiting the
`item.store()` call to only those cases when the item has changed, the
plugin’s performance when processing an entire library improves by two
to three orders of magnitude.
2025-04-14 18:22:41 +00:00
Šarūnas Nejus
d1d681c1ff
mbsync: support other data sources 2025-04-14 02:28:43 +01:00
Šarūnas Nejus
441cd36e8a
missing: clarify that only musicbrainz backend supports missing albums for artist
And give this functionality a small refactor.
2025-04-14 02:28:43 +01:00
Šarūnas Nejus
4c1f217ce0
missing: support non-musicbrainz data sources 2025-04-14 02:28:42 +01:00
Šarūnas Nejus
f4de44f610 Add plugin prefix in changelog note 2025-04-14 02:19:10 +01:00
Skia
225c21b90f plugins/thumbnails: fix FFI with GIO on s390x
Using the correct function signature for g_file_new_for_path fixes the
tests on s390x.
I do not have the full story on why this failed consistently only on
s390x, but I guess the big endian might have something to play with
this.

Here is how the tests were failing:
```
169s ___________________________ ThumbnailsTest.test_uri ____________________________
169s
169s self = <test.plugins.test_thumbnails.ThumbnailsTest testMethod=test_uri>
169s
169s     def test_uri(self):
169s         gio = GioURI()
169s         if not gio.available:
169s             self.skipTest("GIO library not found")
169s
169s >       assert gio.uri("/foo") == "file:///"  # silent fail
169s E       AssertionError: assert '' == 'file:///'
169s E
169s E         - file:///
169s
169s test/plugins/test_thumbnails.py:268: AssertionError
```
You can see a full log here [1] and a history of consistent failure
here [2]. Both links are bound to expire at some point, sorry future
archeologist 🤷.

[1]: https://autopkgtest.ubuntu.com/results/autopkgtest-plucky/plucky/s390x/b/beets/20250403_162414_5d1da@/log.gz#S5
[2]: https://autopkgtest.ubuntu.com/packages/beets/plucky/s390x
2025-04-14 02:19:10 +01:00
Sebastian Mohr
5a79c6f23e
Merge branch 'master' into typehints-plugins 2025-04-10 11:05:30 +02:00
J0J0 Todos
a79dd3849a lastgenre: Better describe fallback option in docs 2025-04-09 22:52:07 +02:00
J0J0 Todos
13f1bec437 lastgenre: Improve force option definition in docs 2025-04-09 22:52:07 +02:00
J0J0 Todos
68202f3498 lastgenre: Document extended_debug setting 2025-04-09 22:52:07 +02:00
J0J0 Todos
a3ce7c4d70 lastgenre: Format a docs paragraph as "notes box"
unrelated fix in this PR...
2025-04-09 22:52:07 +02:00
Sebastian Mohr
559b87ee56 Updated changelog.
Also edited my previous changelog entry to streamline
typehint entries a bit.
2025-04-08 18:29:54 +02:00
Sebastian Mohr
753bdd9106 Added typehints for _instance, _classes and for class attributes. 2025-04-08 18:15:08 +02:00
racehd
0f2b8b794a Fix Broken link for Arch Linux package 2025-04-08 15:33:43 +02:00
Bob Cotton
670a3bcd17
Add beets-id3extract to community plugins (#5660)
Add link to community plugin beets-id3extract
2025-03-12 07:14:38 +00:00