Commit Graph
3541 Commits
Author SHA1 Message Date
Š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
Arav K. 0a985fdfb4 [doc/reference/config] Re-write explanation for 'overwrite_null'
See: <https://github.com/beetbox/beets/pull/5373#discussion_r1702848037>
2024-09-12 14:26:50 +02:00
Arav K. c668dfae71 Document 'overwrite_null'
Solves #5314.
2024-09-12 14:26:50 +02:00
Šarūnas Nejus 54b2435c72 Update dependencies and do not install reflink on Windows for tests (#5407)
See my comment under #5406 for context

> The build on win32 is failing to install reflink because it's [only
supported until Python
3.7](https://gitlab.com/rubdos/pyreflink/-/blob/master/setup.py?ref_type=heads).
>
> I will address this in a separate PR and rebase this one accordingly
once the fix is merged.
>
> Note: this issue popped up now because I added a new requests-mock
dependency which invalidated cached dependencies.
2024-09-08 12:31:02 +01: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
Karl Besser aa891d21d4 Add example use case of keep_artist option to docs
Update the documentation of the new `keep_in_artist` option, adding an
example use case.
2024-09-05 12:15:53 +02:00
Šarūnas Nejus c2d9bcf767 Update dead link in reflink docs 2024-09-04 19:06:55 +01: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
Arav K. 657fffd5b7 [docs/team] Add '@bal-e' 2024-07-31 23:24:18 +02:00
Serene e33b513161 Remove beets.util.confit (#5334) 2024-07-21 10:29:01 +10:00
Karl Besser a11b557a6d Fix typo in docs 2024-07-10 13:05:58 -04:00
Karl Besser acb4680c72 Add keep_in_artist option to ftintitle documentation 2024-07-09 23:55:33 -04: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 d7bf28deed Replace setup.py packaging by Poetry (#5266)
Migrate `beets` package configuration to Poetry which nowadays seems to
be the gold standard.

I have been using Poetry since 2019 and I have mostly been happy a happy
user: it makes local dev setup easy and has the tools I need to maintain
python packages day to day, including reliable dependency resolution,
versioning and publishing to Pypi.

It's a user-friendly tool, so it should make it more straightforward for
contributors to setup and navigate the codebase, and ultimately,
hopefully facilitate more frequent releases!

Since poetry manages local virtual environment, we do not have much need
for tox any more. Therefore, it was replaced by a task runner
`poethepoet`. Type `poe` in the project directory to see the available
commands.

- [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.)
2024-06-12 10:59:24 +01:00
Šarūnas Nejus c2a13ee4b1 Format docs/conf.py 2024-06-11 15:22:58 +01:00
Leonardo Santos a7169d0645 small grammar corrections 2024-06-10 20:18:58 -03:00
Šarūnas Nejus a4ed6ab62a Document the changes 2024-06-10 13:46:27 +01:00
Šarūnas Nejus 7bbd215efc Update all docs with Poetry 2024-06-10 13:10:16 +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
Max Goltzsche 2e9308f713 docs: mention autogenre plugin 2024-04-20 05:33:48 +02:00
Max Goltzsche 2821eac973 docs: add smartplaylist example config and m3u 2024-04-20 05:33:20 +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