12116 Commits
Author SHA1 Message Date
Šarūnas Nejus 01f1fafc88 Release: do not fail when mastodon auth fails v2.2.0 2024-12-02 06:55:56 +00:00
Šarūnas Nejus 27d66d4b36 Change zero documentation mentions of genre to genres (#5486)
I've spent 2 hours troubleshooting why none of my music had genre tag.
It was because the single `genre`, without `s` doesn't seem to cover any
good ganre tags... at least it didn't on my opus files

looking at the code:
https://github.com/beetbox/mediafile/blob/7ecd86101ec3344e7fb25bbf781cd7f86646aa9d/mediafile.py#L1669-L2167
i don't honestly know why anyone created the single `ganre` field in the
first place
2024-12-02 02:21:08 +00:00
Šarūnas Nejus 242d0e8cf3 Include tests and manual in sdist and update dependencies, and include changelog to the release (#5520)
* Fixes #5513
* Fixes #5518

This PR adds the `test` folder and manuals to the package source tarball
and upgrades the dependencies to fix a few vulnerabilities.

I also added a fix for the changelog not making it to the release notes.
2024-12-02 00:08:16 +00:00
Šarūnas Nejus 0eab8b68dd Skip autobpm tests if librosa isn't available (#5516)
Debian doesn't have `librosa`. Allow the tests to continue.
2024-11-30 15:35:00 +00:00
Stefano Rivera 336b5b369e Skip autobpm tests if librosa isn't available
Except under GitHub CI, where we expect all tests to run.
2024-11-30 09:32:08 -04:00
Šarūnas Nejus f39eb984ca Update dependencies 2024-11-26 16:06:29 +00:00
Šarūnas Nejus a7f00eaf13 Fix missing changelog in the release notes
Seems like this is the missing bit:
https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#using-job-outputs-in-a-matrix-job
2024-11-26 15:59:41 +00:00
Šarūnas Nejus f5a02462b1 Fixup changelog rst formatting for this and prev version 2024-11-26 15:45:58 +00:00
Šarūnas Nejus 9c4d4d9632 Include test files, manual to sdist 2024-11-26 15:38:13 +00:00
Šarūnas Nejus 37a2ceccd1 Fix coverage upload from forks: Attempt #2 (#5514)
The fix is based on the following comment:

https://github.com/codecov/codecov-action/issues/1594#issuecomment-2394913029
2024-11-23 20:48:35 +00:00
Šarūnas Nejus 0e6ba457a6 Fix Hybrid SACD importing (#5149)
Fixes #5148. 

When importing, the code that matches tracks does not consider the
medium number. This causes problems on Hybrid SACDs (and other releases)
where the artists, track numbers, titles, and lengths are the same on
both layers.

I added a distance penalty for mismatching medium numbers.

Before:

```
$ beet imp .

/Volumes/Music/ti/Red Garland/1958 - All Mornin' Long - 1 (6 items)

  Match (95.4%):
  The Red Garland Quintet - All Mornin' Long
  ≠ media, year
  MusicBrainz, 2xHybrid SACD (CD layer), 2013, US, Analogue Productions, CPRJ 7130 SA, mono
  https://musicbrainz.org/release/6a584522-58ea-470b-81fb-e60e5cd7b21e
  * Artist: The Red Garland Quintet
  * Album: All Mornin' Long
  * Hybrid SACD (CD layer) 1
     ≠ (#2-1) All Mornin' Long (20:21) -> (#1-1) All Mornin' Long (20:21)
     ≠ (#2-2) They Can't Take That Away From Me (10:24) -> (#1-2) They Can't Take That Away From Me (10:27)
     ≠ (#2-3) Our Delight (6:23) -> (#1-3) Our Delight (6:23)
  * Hybrid SACD (CD layer) 2
     ≠ (#1-1) All mornin' long (20:21) -> (#2-1) All Mornin' Long (20:21)
     ≠ (#1-2) They can't take that away from me (10:27) -> (#2-2) They Can't Take That Away From Me (10:25)
     ≠ (#1-3) Our delight (6:23) -> (#2-3) Our Delight (6:23)
➜ [A]pply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort, eDit, edit Candidates?
```

Note that all tracks tagged with disc 1 get moved to disc 2 and vice
versa.

After:

```
$ beet-test imp .

/Volumes/Music/ti/Red Garland/1958 - All Mornin' Long - 1 (6 items)

  Match (95.4%):
  The Red Garland Quintet - All Mornin' Long
  ≠ media, year
  MusicBrainz, 2xMedia, 2013, US, Analogue Productions, CPRJ 7130 SA, mono
  https://musicbrainz.org/release/6a584522-58ea-470b-81fb-e60e5cd7b21e
  * Artist: The Red Garland Quintet
  * Album: All Mornin' Long
  * Hybrid SACD (CD layer) 1
     ≠ (#1-1) All mornin' long (20:21) -> (#1-1) All Mornin' Long (20:21)
     ≠ (#1-2) They can't take that away from me (10:27) -> (#1-2) They Can't Take That Away From Me (10:27)
     ≠ (#1-3) Our delight (6:23) -> (#1-3) Our Delight (6:23)
  * Hybrid SACD (SACD layer) 2
     * (#2-1) All Mornin' Long (20:21)
     * (#2-2) They Can't Take That Away From Me (10:24)
     * (#2-3) Our Delight (6:23)
➜ [A]pply, More candidates, Skip, Use as-is, as Tracks, Group albums,
Enter search, enter Id, aBort, eDit, edit Candidates?
```

Yay!
2024-11-23 04:04:30 +00:00
InvisibleFunction 32e9e58a35 Fix SACD Imports 2024-11-22 22:33:09 -05:00
Šarūnas Nejus db71444fe7 Disable OIDC for coverage uploads from forks
This is based on the following comment:
https://github.com/codecov/codecov-action/issues/1594#issuecomment-2394913029
2024-11-23 01:13:16 +00:00
Šarūnas Nejus ef328ed740 Add a quick check for MST Store Python install (#5470)
Quick fix for #5467.

Checks if the path for python is under the windows store folder then
error and point the user to the beets
[documentation](https://beets.readthedocs.io/en/stable/guides/main.html).

Happy for feedback to improve, but thought it best to exit as early as
possible.
2024-11-22 13:46:09 +00:00
Andrew Rogl 1d63bf9871 Update error logging as suggested 2024-11-22 18:07:28 +10:00
Andrew Rogl ec4b26f986 Update changelog 2024-11-22 18:07:18 +10:00
Andrew Rogl 22810b6720 Windows & VSCode & Python 2024-11-22 18:04:43 +10:00
Andrew Rogl 3750c63fb6 Manually format messages 2024-11-22 18:04:43 +10:00
Andrew Rogl f0f77aa741 Update related window files to match 3.8 2024-11-22 18:04:43 +10:00
Andrew Rogl 3798ac5d02 Add a quick check for MST Store Python install 2024-11-22 18:04:43 +10:00
Šarūnas Nejus 176661bbf8 Changelog notes need to go under Unreleased 2024-11-22 07:18:14 +00:00
Šarūnas Nejus 6444111cde bitesize to good first issue: Update changelog.rst (#5477) 2024-11-22 05:05:39 +00:00
Šarūnas Nejus 65e935bee5 Perform a regex substitution in the substitute plugin (#5357)
This utilises regex substitution in the substitute plugin. The previous
approach only used regex to match the pattern, then replaced it with a
static string. This change allows more complex substitutions, where the
output depends on the input.

### Example use case
Say we want to keep only the first artist of a multi-artist credit, as
in the following list:
```
Neil Young & Crazy Horse -> Neil Young
Michael Hurley, The Holy Modal Rounders, Jeffrey Frederick & The Clamtones -> Michael Hurley
James Yorkston and the Athletes -> James Yorkston
````
This would previously have required three separate rules, one for each
resulting artist. By using a regex substitution, we can get the desired
behaviour in a single rule:
```yaml
substitute:
  ^(.*?)(,| &| and).*: \1
```
(Capture the text until the first `,` ` &` or ` and`, then use that
capture group as the output)

### Notes
I've kept the previous behaviour of only applying the first matching
rule, but I'm not 100% sure it's the ideal approach.
I can imagine both cases where you want to apply several rules in
sequence and cases where you want to stop after the first match.
2024-11-22 05:02:50 +00:00
Šarūnas Nejus 979f1239ca Revert "Release: temporarily ignore errors with bumping version and pypi push"
This reverts commit cf3acec555.
2024-11-22 02:13:29 +00:00
Šarūnas Nejus 0780bf386c Release: make sure release artefacts are present for the tagging job v2.1.0 2024-11-22 02:05:36 +00:00
Šarūnas Nejus cf3acec555 Release: temporarily ignore errors with bumping version and pypi push 2024-11-22 01:58:26 +00:00
Šarūnas Nejus 4a5b9a26f1 Release: fix github-tag-action version 2024-11-22 01:57:10 +00:00
snejus bc16ed1817 Increment version to 2.1.0 2024-11-22 01:50:28 +00:00
Šarūnas Nejus 7488c94d38 Release: try checking out the master branch 2024-11-22 01:49:46 +00:00
Šarūnas Nejus aa0db049a5 Release: fix bumping the version in the changelog 2024-11-22 01:32:15 +00:00
Šarūnas Nejus c6c4afa543 Release: Make sure to checkout the new commit with bumped version 2024-11-22 01:22:47 +00:00
Šarūnas Nejus ea6ddde351 Fix changelog retrieval workflow step 2024-11-22 00:59:50 +00:00
RollingStar 82e8171d4a Update changelog.rst 2024-11-17 18:55:16 -05:00
Šarūnas Nejus 6a7efdf53d Update mediafile to 0.13.0 (#5494)
Fixes #5420.
2024-11-15 07:07:29 +00:00
Šarūnas Nejus de171f03fc Test helpers: Remove unneeded data generation abstractions (#5463)
This PR refactors the test codebase by removing redundant functions and
simplifying item and album creation. Key changes include:

- Removed redundant `_item_ident` index tracker from `_common.py`.
- Removed `album` function from `_common.py` replacing it with direct
`library.Album` invocations.
- Removed `generate_album_info` and `generate_track_info` functions,
replacing them directly with `TrackInfo` and `AlbumInfo`.
- Updated `setup.cfg` to exclude test helper files from coverage
reports.
- Adjusted the tests regarding the changes, and simplified
`test_mbsync.py`.
2024-11-13 14:16:15 +00:00
Šarūnas Nejus 7e9f7fc8de Improve ListenBrainz error handling and simplify playlist handling (#5480)
Fixes #5459
2024-11-13 14:11:53 +00:00
Šarūnas Nejus 9345103bd4 Fix the `TypeError when import.set_fields` is provided non-string values (#5495)
Fixes #4840 by converting input values to strings before they are used.
Modifies the test cases for ``set_fields`` to appropriately test this
behavior.
2024-11-11 16:52:25 +00:00
adamharder3andŠarūnas Nejus a98cf47c06 Update docs/changelog.rst
Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2024-11-11 10:43:31 -05:00
Alok Saboo b9c6ee208e lint error 2024-11-10 20:27:41 -05:00
Alok Saboo 35c6e13255 Update line length 2024-11-10 20:25:28 -05:00
Alok Saboo 3586669dd5 Merge branch 'lb_error' of https://github.com/arsaboo/beets into lb_error 2024-11-10 20:24:36 -05:00
Alok Saboo 24115167d3 Merge remote-tracking branch 'upstream/master' into lb_error 2024-11-10 20:23:34 -05:00
Alok SabooandŠarūnas Nejus c1b4b58e65 Update beetsplug/listenbrainz.py
Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2024-11-10 20:23:11 -05:00
Adam Harder 8448d8b4be changelog 2024-11-06 23:27:18 -05:00
Adam Harder 507c91765d remove debugging code 2024-11-06 23:17:38 -05:00
Adam Harder d6ac687de1 fix #4840 and add to test case 2024-11-06 23:14:47 -05:00
Jack Wilsdon 5a3cace84e Use correct JPEG header in tests 2024-11-03 20:46:29 +00:00
Jack Wilsdon 4c22c1bbea Update mediafile to 0.13.0 2024-11-03 20:31:10 +00:00
Šarūnas Nejus fa10dcf11a Fix docs build (#5492)
Seems like readthedocs build expects docs dependencies to be available
as an extra, see one of the failing builds:
https://app.readthedocs.org/projects/beets/builds/26079213/.

You can see this has been failing due to missing 'pydata_sphinx_theme'
which is one of our dependencies:

```
    raise ThemeError(__('no theme named %r found (missing theme.toml?)') % name)
    sphinx.errors.ThemeError: no theme named 'pydata_sphinx_theme' found (missing theme.toml?)
    Theme error:
    no theme named 'pydata_sphinx_theme' found (missing theme.toml?)
```
2024-10-31 00:50:01 +00:00
Šarūnas Nejus 6180ce1973 Revert "ci: Replace pull_request with pull_request_target"
This was a very bad idea since this made CI operate within the context
of the *base* branch, which meant that the tests were testing code in
the `master` branch instead of the branch that was to be merged!
2024-10-30 12:27:44 +00:00