Commit graph

4180 commits

Author SHA1 Message Date
Šarūnas Nejus
d486885af3
pyupgrade Python 3.10 2025-11-08 12:09:52 +00:00
Ratiq Narwal
e9afe069bc Accept lyrics source as a string 2025-11-06 17:19:27 -08:00
Sebastian Mohr
25ae330044 refactor: moved some more imports that are only used in the commands
in their respective files. Also fixed some imports
2025-11-03 14:03:25 +01:00
asardaes
c087851770 Prefer alias if import languages not defined 2025-11-01 13:52:14 +01:00
asardaes
040b2dd940 Add custom_tags_only mode for mbpseudo plugin 2025-11-01 13:52:14 +01:00
asardaes
cb758988ed Fix data source penalty for mbpseudo 2025-11-01 13:52:14 +01:00
asardaes
160297b086 Add tests for mbpseudo plugin 2025-11-01 13:51:34 +01:00
asardaes
229651dcad Update mbpseudo implementation for beets 2.5 2025-11-01 13:51:34 +01:00
asardaes
a42cabb477 Don't use Optional 2025-11-01 13:51:34 +01:00
asardaes
ab5705f444 Reimplement mbpseudo plugin inheriting from MusicBrainzPlugin 2025-11-01 13:51:34 +01:00
asardaes
79f691832c Use Optional 2025-11-01 13:51:34 +01:00
asardaes
0d90649029 Fix linting issues 2025-11-01 13:51:34 +01:00
asardaes
f3934dc58b Add mbpseudo plugin 2025-11-01 13:51:34 +01:00
asardaes
ac0b221802 Revert "Use pseudo-release's track titles for its recordings"
This reverts commit f3ddda3a422ffbe06722215abeec63436f1a1a43.
2025-11-01 13:51:34 +01:00
asardaes
017930dd99 Use pseudo-release's track titles for its recordings 2025-11-01 13:51:34 +01:00
Alok Saboo
7724c661a4 hopefully...this works 2025-10-30 10:49:51 -04:00
Alok Saboo
447511b4c8 ruff formating 2025-10-30 10:47:07 -04:00
Alok Saboo
8305821488 more lint 2025-10-30 10:34:30 -04:00
Alok Saboo
4302ca97eb resolve sorucery issue....make it thread safe 2025-10-30 10:29:07 -04:00
Alok Saboo
e6c70f06c1 lint 2025-10-30 10:20:53 -04:00
Alok Saboo
0d11e19ecf Spotify: gracefully handle 403 from deprecated audio-features API
Add a dedicated AudioFeaturesUnavailableError and track audio-features
availability with an audio_features_available flag. If the audio-features
endpoint returns HTTP 403, raise the new error, log a warning once, and
disable further audio-features requests for the session. The plugin now
skips attempting audio-features lookups when disabled (avoiding repeated
failed calls and potential rate-limit issues).

Also update changelog to document the behavior.
2025-10-30 10:13:54 -04:00
Doron Behar
e181ebeaae importsource: Add new plugin (+docs/tests/changlog) 2025-10-29 08:50:01 +01:00
Šarūnas Nejus
ec141dbfd6
Explicitly wrap partial with staticmethod for Py3.14 2025-10-27 08:23:37 +00:00
J0J0 Todos
a8204f8cde lastgenre: -vvv tuning log helper, remove -d
Replace extended_debug config and CLI option with -vvv and add a helper
function.
2025-10-23 19:02:03 +02:00
Ember Light
00e3da1a92
Merge branch 'master' into ftintitle-continue-even-if-albumartist-and-artist-is-the-same 2025-10-20 15:24:43 +02:00
Jacob Danell
027b775fcd Change arg name 2025-10-20 15:22:27 +02:00
Šarūnas Nejus
99987b3f27
Merge branch 'master' into feature/web-handle-nexttrack 2025-10-20 00:31:46 +01:00
cvx35isl
1275ccf8c1
play plugin: $playlist marker for precise control where the playlist … (#4728)
…file is placed in the command

## Description

see included doc; placing the playlist filename at the end of command
just isn't working for all players

I have this in use with `mpv`

Co-authored-by: cvx35isl <cvx35isl@users.noreply.github.com>
Co-authored-by: J0J0 Todos <2733783+JOJ0@users.noreply.github.com>
2025-10-19 08:38:20 +02:00
Šarūnas Nejus
498b14ee1d
Convert autotagger plugin docs to use conf role 2025-10-19 01:34:33 +01:00
Ember Light
472aa12767 Add main functionality 2025-10-16 18:49:14 +02:00
Šarūnas Nejus
88011a7c65
Show genre change using show_model_changes 2025-10-15 11:14:26 +01:00
Šarūnas Nejus
0aac7315c3
lastgenre: refactor genre processing with singledispatch
Replace the log_and_pretend decorator with a more robust implementation
using singledispatchmethod. This simplifies the genre application logic
by consolidating logging and processing into dedicated methods.

Key changes:
- Remove log_and_pretend decorator in favor of explicit dispatch
- Add _fetch_and_log_genre method to centralize genre fetching and logging
- Log user-configured full object representation instead of specific
attributes
- Introduce _process singledispatchmethod with type-specific handlers
- Use LibModel type hint for broader compatibility
- Simplify command handler by removing duplicate album/item logic
- Replace manual genre application with try_sync for consistency
2025-10-15 09:55:52 +01:00
Šarūnas Nejus
ee289844ed
Add _process_album and _process_item methods 2025-10-15 09:55:52 +01:00
J0J0 Todos
1acec39525
lastgenre: Use apply methods during import 2025-10-15 09:52:32 +01:00
J0J0 Todos
8613b3573c
lastgenre: Refactor final genre apply
- Move item and genre apply to separate helper functions. Have one
  function for each to not overcomplicate implementation!
- Use a decorator log_and_pretend that logs and does the right thing
  depending on wheter --pretend was passed or not.
- Sets --force (internally) automatically if --pretend is given (this is
  a behavirol change needing discussion)
2025-10-15 09:52:32 +01:00
henry
0bf248d355
Add custom feat words for ftintitle (#6090)
## Description

For non English tracks (Swedish in my case) feat. words might be
something that ftintitle doesn't pick up.
Eg. for the song `Promoe med Afasi - Inflation`
[https://musicbrainz.org/recording/8e236347-61d6-4e11-9980-52f4cc6b905f](https://musicbrainz.org/recording/8e236347-61d6-4e11-9980-52f4cc6b905f)
the word `med` is `feat.` in Swedish.
With this PR you can add what ever word you wish to match as feat. so it
should cover any kind of language.

The config.yaml could look like this:
ftintitle:
  custom_feat_words: ["med"]

## To Do

<!--
- If you believe one of below checkpoints is not required for the change
you
are submitting, cross it out and check the box nonetheless to let us
know.
  For example: - [x] ~Changelog~
- Regarding the changelog, often it makes sense to add your entry only
once
reviewing is finished. That way you might prevent conflicts from other
PR's in
that file, as well as keep the chance high your description fits with
the
  latest revision of your feature/fix.
- Regarding documentation, bugfixes often don't require additions to the
docs.
- Please remove the descriptive sentences in braces from the enumeration
below,
  which helps to unclutter your PR description.
-->

- [x] 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.)
- [x] Tests. (Very much encouraged but not strictly required.)
2025-10-14 20:38:02 -07:00
Michael Krieger
dc13308784 Remove tests. Update docs. Remove unnecessary return
Remove tests.  Update docs.  Remove unnecessary return.
2025-10-14 03:17:34 +01:00
Michael Krieger
b1c87cd98c Change parameter name, add return, add tests
Change the parameter name to omit_single_disc (vs previously zero_disc_if_single_disc)

Add return of 'fields_set' so that, if triggered by the command line `beets zero`, it will still effect the item.write.

Added tests.
2025-10-14 03:17:34 +01:00
Michael Krieger
5fc15bcfa4 Misc formatting changes 2025-10-14 03:17:34 +01:00
Michael Krieger
33b350a612 Adds a zero_disc_if_single_disc to the zero plugin
Adds a zero_disc_number_if_single_disc boolean to the zero plugin for writing to files. Adds the logic that, if disctotal is set and there is only one disc in disctotal, that the disc is not set.

This keeps tags cleaner, only using disc on multi-disc albums. The disctotal is not touched, particularly as this is not usually displayed in most clients.

The field is removed only for writing the tags, but the disc number is maintained in the database to avoid breaking anything that may depend on a disc number or avoid possible loops or failed logic.
2025-10-14 03:17:34 +01:00
Ember Light
b95a17d8d3 remove feat from custom_feat_words 2025-10-12 22:40:27 +02:00
Ember Light
51c971f089 Fix sourcery-ai comments 2025-10-12 21:38:13 +02:00
Ember Light
37a5f9cb15 Add custom feat words 2025-10-12 20:47:51 +02:00
Šarūnas Nejus
c2ab93a946
Remove redundant source_weight defaults 2025-10-10 20:36:33 +01:00
Martin Atukunda
545213421b
feat(plugin/web): support for nexttrack keypress 2025-10-09 20:11:19 +03:00
J0J0 Todos
a642609faa
Merge branch 'master' into ffnp 2025-10-06 11:06:10 +02:00
Henry
ed73903deb type corrections 2025-10-04 11:59:15 -07:00
Henry
2a80bdef2e Added type hints to all functions 2025-10-04 11:03:17 -07:00
Henry
a909dddd16 adding typechecks, need to fix the medium discrepancy 2025-10-03 18:52:37 -07:00
Henry
267428f0a4 Merge branch 'master' of github.com:henry-oberholtzer/beets into discogs-anv-support 2025-10-03 15:05:48 -07:00