Currently, `mbcollection` takes the first collection it finds (if the
user does not explicitely indicates one in the configuration).
The problem is that the user may have collections of types that we are
not interested in (e.g. recording collections, artist collections,
etc.).
Since the `get_collections` response returns the collections types, we
can only keep the `release` collections.
Added some more typehints to deezer plugin.
I know, it is properly not used much and we don't even have test for the
deezer plugin but I want to make this a bit more maintainable, mainly to
prepare for https://github.com/beetbox/beets/pull/5787 and make
migration a bit easier.
This PR moves query and type definitions away from `library.py` to
`dbcore` to improve modularity and organization.
**Key Changes:**
* **Query and Type Relocation:**
* `PathQuery` and `SingletonQuery` moved from `beets.library` to
`beets.dbcore.query`.
* `DateType`, `PathType` (and its variants `NullPathType`),
`MusicalKey`, and `DurationType` moved from `beets.library` to
`beets.dbcore.types`.
* The `BLOB_TYPE` definition was moved from `beets.library` to
`beets.dbcore.query` and then referenced in `beets.dbcore.types`.
* The `human_seconds_short` utility function was moved from `beets.ui`
to `beets.util` due to circular dependency.
* **Test Modernization:**
* The `PathQueryTest` class in `test/test_query.py` has been rewritten
to use `pytest.mark.parametrize` for more concise and readable test
cases.
* **Import Updates:** All internal references to these moved classes and
functions have been updated across the codebase.
The case_sensitive parameter was only used in tests, which now use
monkeypatch to control the behavior of util.case_sensitive() instead.
This simplifies the PathQuery initialization logic while maintaining
test coverage.
The duplicates plugin currently only supports deleting files entirely,
sometimes it's desired to only fix the library and keep files in place.
This PR adds this possibility.
## 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
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>
## Fix pipx-install-action Windows compatibility issue
Replace `BrandonLWhite/pipx-install-action@v1.0.3` with
`threeal/pipx-install-action@v1.0.0` in CI workflow due to Windows
compatibility issues.
**Changes:**
- Switch to alternative pipx-install-action that works on Windows
- Add explicit package specification for poethepoet and poetry
- Resolves GitHub issue:
https://github.com/BrandonLWhite/pipx-install-action/issues/62
**Edit**: received a reply from `pipx-install-action` maintainer with a
fix: simply remove the breaking cache from GitHub Actions: this worked
fine.
Thus I reverted the commit which introduced another action on Windows.
The only change that this PR makes is `pipx-install-action` version
upgrade.
Fixes#5797.
Today, local tests (`poe test`) will fail to run if `langdetect` is not
installed. This change makes `langdetect` required for test runs.
Although this is easy to resolve with `poetry install --all-extras`, the
code intends to work without that; it's a worthwhile fix.