Commit graph

3585 commits

Author SHA1 Message Date
AdrienCos
96b89e77f6 Fix the error with CAA where no image would be downloaded when thumbnails are missing 2023-10-07 23:14:03 +02:00
AdrienCos
e7105a9763 Fix the error with CAA where the pre-sized thumbs of release groups would be ignored 2023-10-07 21:25:02 +02:00
Adrian Sampson
b822fe0f5c
Merge pull request #4923 from tandy-1000/autobpm
Add autobpm plugin
2023-10-02 15:56:23 -04:00
tandy1000
7961cf3aaa Add autobpm plugin
This plugin uses librosa to automatically calculate the BPM for a track.
It is based on the keyfinder plugin, and rounds the BPM to an int.

Co-authored-by: Adrian Sampson <adrian@radbox.org>
2023-09-30 16:25:06 +01:00
Kian-Meng Ang
873a91c541 Fix typos
Found via `codespell -S ./test/rsrc,genres.txt -L
caf,fo,ue,searchin,crashers,crasher,te,skool,egal,nothin`
2023-09-25 12:52:26 +08:00
Adrian Sampson
c15ccb16bf
Merge pull request #4900 from fracai/4326-scrub-no-rewrite
4326 scrub should not restore on import if "write" is disabled
2023-09-16 12:47:07 -04:00
Arno Hautala
d8eba458bd use ui.should_write() to control restore during import 2023-09-06 18:50:01 -04:00
J0J0 Todos
4f4e4cdc70 Fix docstring issues in substitute module
to finally make linter happy.
2023-08-31 09:26:42 +02:00
Daniele Ferone
f3f6118b8f Linting fixes in substitute plugin 2023-08-31 08:04:24 +02:00
Daniele Ferone
a4363fb680 Fixes in substitute plugin docs 2023-08-31 08:04:10 +02:00
Daniele Ferone
07c33756b7 _substitute_rules became a class field 2023-08-31 07:08:10 +02:00
Daniele Ferone
249b420b19 Added plugin 2023-08-31 07:07:09 +02:00
Sam Caldwell
b7e3d37c1b feat[embyupdate]: add handling for private users
Adds a `userid` config option for the `embyupdate` plugin. When the
`userid` is provided, the Emby user lookup is bypassed. This avoids a
failure to get the user ID for private users.

Closes: #4402
2023-08-24 18:50:29 -07:00
J0J0 Todos
8d835b8cab Fix ipfs plugin and test_ipfs
by using store(inherit=False) for the creation of a new "ipfs album" as well as
when test_ipfs creates album+items to compare with.
Or put differently: Make ipfs and test_ipfs keep the old store() behaviour for
which the plugin initially was built for.
2023-08-23 06:34:16 +02:00
Adrian Sampson
49846e7851
lyrics: Bypass None values in Google backend
Fixes #4875.
2023-08-13 18:52:39 -04:00
luzpaz
8419149c7a
Fix various typos 2023-08-09 21:26:15 -04:00
Adrian Sampson
7f7db33cf8
Adapt to some recent flake8/pycodestyle changes
As surfaced in this CI run:
https://github.com/beetbox/beets/actions/runs/5716141601/job/15486984755?pr=4866

These all look like perfectly reasonable improvements that are unlikely
to break anything.
2023-07-31 10:00:41 -07:00
J0J0 Todos
342421a36c
Update beetsplug/importfeeds.py
Co-authored-by: Adrian Sampson <adrian@radbox.org>
2023-07-27 20:14:39 +02:00
J0J0 Todos
60227c48f5 Add m3u per session feature to importfeeds plugin 2023-07-27 07:56:14 +02:00
J0J0 Todos
e9f840580a Trigger subsonicupdate on db_change and splupdate
- Trigger subsonicupdate on database_change event instead of only at import
  event.
- Send a new event from smartplaylist plugin whenever lists are updated/created
  and have subsonicupdate plugin listen to it.
- Make sure the both events register a new listener that launches the actual
  subsonic library update at the very end of a beets run (cli_exit) instead of
  during each change (similar to how mpdupdate plugin does it).
2023-07-27 07:41:50 +02:00
J0J0 Todos
871be9c98b Log smartplaylist create msg as info log
instead of debug log. In an explicit run (not while importing) it doesn't hurt
to get some progress to the UI.
2023-07-25 07:52:51 +02:00
J0J0 Todos
c03bd26e3a
Merge pull request #4854 from JOJ0/discogs_single_album_refactor
Support providing album information on singleton imports via Discogs
2023-07-25 06:23:27 +02:00
wisp3rwind
3965858ac1 replaygain: apply review feedback: fixup previous refactor, improve tests
by adding files which are not completely silent, thus hitting a different
code path in some calculations

The sample files were generated using
> sox -n whitenoise.flac synth 00:00:02 whitenoise
> ffmpeg -i whitenoise.flac whitenoise.opus
> ffmpeg -i whitenoise.flac whitenoise.mp3
2023-07-22 12:47:19 +02:00
wisp3rwind
b8be2af11d replaygain: in Gst backend, pass paths instead of items around
This is a preparation for moving the Gst calculation to multiprocessing
worker threads. Passing only the file paths to the worker threads instead of
synchronizing the entire `Item`s (i.e. minimizing the data that is
shared between the processes) hopefully helps to prevent any issues with
this approach.
2023-07-22 12:47:19 +02:00
wisp3rwind
fa37085493 replaygain: in ffmpeg backend refactor album gain calculation
now that we have the `track_results` upfront, some simplifications are
possible
2023-07-22 12:47:19 +02:00
wisp3rwind
76f6c86291 replaygain: in ffmpeg backend, analyse items upfront, then summarize...
...album gains. This is in preparation for parallelizing the track
analysis, and computing the album values in the plugin's "main thread"
once all items are done.
2023-07-22 12:47:19 +02:00
wisp3rwind
545ed6f385 replaygain: log album name for album tasks
doesn't seem to be very useful to log the _list of items_ here
2023-07-22 12:47:19 +02:00
wisp3rwind
7ec7a0d362 replaygain: avoid hasattr in favor of None values
to check for an optional ThreadPool. Seems more idiomatic and readable.
2023-07-22 12:47:19 +02:00
J0J0 Todos
f84b9ea7cf DiscogsPlugin.item_candidates attaches album info
to the TrackInfo objects it returns.

Additionally a new feature is introduced that uses string_dist to find the
correct track on the Discogs album.
2023-07-20 09:12:42 +02:00
J0J0 Todos
0630f4a263 Strip word "vinyl" when searching Discogs
In DiscogsPlugin.get_albums() we already strip away the words "CD" and "disk".
It makes sense to also remove "vinyl"
2023-07-18 08:05:22 +02:00
J0J0 Todos
3debf4edca Fix early exit in Discogs item_candidates method 2023-07-18 07:51:12 +02:00
wisp3rwind
29c21860a9 add missing syspath conversions (2/3, beetsplug) 2023-07-16 10:17:40 +02:00
Alok Saboo
ef8a780e1c Add error handling for invalid Deezer track_id 2023-07-13 09:53:41 -04:00
Alok Saboo
63122da24d remove unused imports 2023-07-10 15:55:42 -04:00
Alok Saboo
c00cdd3cc7 Error handling 2023-07-10 15:52:36 -04:00
Alok Saboo
acd604f102 Update deezer.py 2023-07-10 15:39:28 -04:00
Alok Saboo
a027612216 error handling 2023-07-10 15:34:06 -04:00
Alok Saboo
014d41f208 Error handling 2023-07-10 15:30:20 -04:00
Alok Saboo
6460e4d829 added deezer_updated to keep track of update time 2023-07-09 19:06:04 -04:00
Alok Saboo
a291ec3f0b convert urs to f-string format 2023-07-09 18:43:35 -04:00
Alok Saboo
783ea2a444 Add function to update Deezer rank 2023-07-09 18:39:15 -04:00
Alok Saboo
cdfebdba8e Update deezer.py 2023-07-09 18:02:11 -04:00
Alok Saboo
5419a78bd2 Added additional fields to be imported from Deezer 2023-07-09 17:59:50 -04:00
wisp3rwind
a84b3542f9 typing: corrections for dbcore/types.py
tricky...
- the only way I found to express the concept of the "associated type"
  (in Rust lingo) model_type was by making Type generic over its value
  and null types.
- in addition, the class hierarchy of Integer and Float types had to be
  modified, since previously some of them would have conflicting null
  types relative to their super class (this required a change to the
  edit plugin; hopefully no more breakage is caused by these changes)
- don't import the query module, but only the relevant Query's to avoid
  confusing the module query and the class variable query
2023-06-24 11:51:00 +02:00
wisp3rwind
bc7c447b3c beetsplug/playlist: actually use SQL clause
As far as I can tell, the fast SQL path was never used before, since a
query would use the default `clause()` implementation. It is only the
`FieldQuery.clause()` that could delegate to `col_clause()`, but
`PlaylistQuery` is not a `FieldQuery`.
2023-06-23 11:00:09 +02:00
wisp3rwind
09d2c87f29 typings: corrections for dbcore/queryparse
- Add NamedQuery abstract class to be able to express the expectation
  that a query should be such a query (and have a specific constructor
  signature) in construct_query_part
- slightly (and probably completely irrelevantly) improve Query.__hash__
- also, sprinkle some ABC/abstractmethod around to clarify things
2023-06-23 10:59:51 +02:00
J0J0 Todos
0d8f8a3cff Fix ValueError in convert plugin auto_convert_keep 2023-06-22 09:13:09 +02:00
lonebyte
2c3aca23e1
Fix the sorting of fanart.tv covers
fanart.tv uses a string to output the number of likes (see https://fanart.tv/api-docs/api-v3/). In order to sort numerically we need to convert the string into an int.
2023-06-14 20:25:18 +02:00
Alok Saboo
7a9d8f9752 added error handling 2023-05-26 08:40:15 -04:00
Alok Saboo
0f1add8b02 Change to spotify_album_id 2023-05-26 08:31:51 -04:00