Šarūnas Nejus
68eee96c03
Define InQuery and use it in PlaylistQuery
...
While working on the DB optimisation I discovered one query which does
not follow the 'FieldQuery' interface - 'PlaylistQuery', so I looked
into it in more detail.
One special thing about it is that it uses 'IN' SQL operator, so
I defined 'InQuery' query class to have this logic outside of the
playlist context.
Otherwise, it seems like 'PlaylistQuery' is a field query, even if it
has a very special way of resolving values it wants to query. In the
future, we may want to consider moving this kind of custom
_initialisation_ logic away from '__init__' methods to
factory/@classmethod: this should make it more clear that the purpose of
such logic is to resolve the data that is required to define
a particular FieldQuery class fully.
2024-04-30 22:20:36 +01:00
wisp3rwind
a9423b7b2d
lyrics: remove version switch that became obsolete when we dropped Python 3.5
2024-04-27 16:02:26 +02:00
J0J0 Todos
d510177820
Merge pull request #5121 from mgoltzsche/generate-playlist-item-attributes
2024-04-20 08:04:32 +02:00
Max Goltzsche
883bbb3e4b
smartplaylist: rename output format m3u8 to extm3u
2024-04-13 04:55:43 +02:00
Max Goltzsche
c0afd3eb3c
smartplaylist: allow exporting item fields
...
Allow generating extm3u playlists so that they contain additional item fields such as the `id`.
The feature is required by the mgoltzsche/beets-webm3u plugin (M3U server) to transform playlists using a request based item URI template which may require additional fields such as the `id`, e.g. `beets:library:track;$id`.
2024-04-13 04:55:37 +02:00
Dr-Blank
6a27a8de3c
satisfy the linter
2024-04-11 13:42:56 -04:00
Dr-Blank
c88953805b
bugfix: ignore subdirectories of ignored
...
directories in unimported plugin
2024-03-22 18:20:47 -04:00
Dr-Blank
66b459b8d0
Refactor Candidate class in fetchart.py to improve
...
validation and resizing logic
2024-03-18 09:17:33 -04:00
Serene
3548e35360
Merge pull request #5122 from Bobo1239/master
...
convert: Correctly identify WAVE format as lossless
2024-03-02 09:05:53 +10:00
Boris-Chengbiao Zhou
47ba590999
convert: Correctly identify WAVE format as lossless
...
Seems like this entry was added before mediafile gained support for WAVE
files in commit 832f3d. Adjust it to fix detection.
2024-03-01 17:58:26 +01:00
Serene
8720d6413b
Merge pull request #5063 from Maxr1998/fix-advancedrewrite-simple-rules
...
advancedrewrite: Fix simple rules being overwritten by advanced rules
2024-03-01 16:08:37 +10:00
Serene
35e8eb985f
Merge pull request #5058 from arsaboo/lb
...
Add initial version of the Listenbrainz plugin
2024-03-01 15:51:50 +10:00
Serene-Arc
83242fd7cf
Apply formatting
2024-03-01 15:21:25 +10:00
Maxr1998
ba66808c74
advancedrewrite: Fix multi-valued fields specified as a single string
2024-01-01 19:33:22 +01:00
Maxr1998
b1d9169abe
advancedrewrite: Fix simple rules being overwritten by advanced rules
2024-01-01 18:32:06 +01:00
Alok Saboo
ce023a3c53
Revert unwanted commits
2023-12-25 17:14:45 -05:00
Alok Saboo
7838e70d41
Revert "Merge remote-tracking branch 'upstream/master' into lb"
...
This reverts commit 6bfe26642c , reversing
changes made to 9b8dbe8055 .
2023-12-23 12:25:22 -05:00
Alok Saboo
6bfe26642c
Merge remote-tracking branch 'upstream/master' into lb
2023-12-23 12:19:30 -05:00
Alok Saboo
9b8dbe8055
Add logging
2023-12-23 12:19:04 -05:00
Alok Saboo
47584f20cb
Formatting
2023-12-22 16:13:01 -05:00
Alok Saboo
537b57d99d
Make sure only Jams and Exploration playlists are added.
...
Sometimes, there are other playlists that are created (e.g., Top Missed Recordings of 2023, Top Discoveries of 2023). Right now, I am excluding these. We may want to address them separately.
2023-12-22 16:12:42 -05:00
Alok Saboo
71a6a4fb4a
Formatting
2023-12-22 10:25:42 -05:00
Alok Saboo
7440ca51fb
Error handling
2023-12-22 10:25:27 -05:00
Alok Saboo
2eb8000a0b
Update docstrings
2023-12-21 12:24:04 -05:00
Alok Saboo
0ed65564b3
Update listenbrainz.py
2023-12-21 12:16:24 -05:00
Alok Saboo
4541644961
Updated docs
2023-12-21 11:57:14 -05:00
Alok Saboo
e8dc2cb5da
Sort imports
2023-12-21 09:27:21 -05:00
Alok Saboo
4f6689742c
Update listenbrainz.py
2023-12-20 10:47:50 -05:00
Alok Saboo
b010fb507f
Update listenbrainz.py
2023-12-20 10:30:14 -05:00
Alok Saboo
75deae5f47
Update lastimport.py
2023-12-20 10:28:45 -05:00
Alok Saboo
c445e5ee79
Update listenbrainz.py
2023-12-20 10:26:05 -05:00
Alok Saboo
d83a07d368
Update listenbrainz.py
2023-12-20 10:23:54 -05:00
Alok Saboo
ec3711f4a9
Update lastimport.py
2023-12-20 10:23:33 -05:00
Alok Saboo
5e4cb20c4a
Update lastimport.py
2023-12-20 10:21:45 -05:00
Alok Saboo
135faac62e
Update lastimport.py
2023-12-20 10:20:16 -05:00
Alok Saboo
c437a5594e
Update lastimport.py
2023-12-20 10:16:33 -05:00
Alok Saboo
d7823a0f24
Update lastimport.py
2023-12-20 10:15:07 -05:00
Alok Saboo
272c7c32bc
Allow handling of None
2023-12-20 10:13:09 -05:00
Alok Saboo
6d44c6af00
Update listenbrainz.py
2023-12-20 10:06:02 -05:00
Alok Saboo
3ead37775e
Update listenbrainz.py
2023-12-20 09:47:42 -05:00
Alok Saboo
fc9e68eccf
Update listenbrainz.py
2023-12-20 09:46:06 -05:00
Alok Saboo
aa117bb760
Update listenbrainz.py
2023-12-20 09:45:02 -05:00
Max Goltzsche
6b929c6e72
web: fix range request support
...
Do not let the web plugin overwrite the Content-Length header with the full file length since flask/werkzeug sets the requested range's/chunk's size when handling a range request.
This allows to play large audio/opus files using e.g. a browser/firefox or gstreamer/mopidy without making a reverse-proxy/nginx emulate range request support and hide range-related headers from the backend.
2023-12-20 01:23:13 +01:00
Alok Saboo
4a46769a2c
Update listenbrainz.py
2023-12-19 18:40:34 -05:00
Alok Saboo
84da424fae
Update listenbrainz.py
2023-12-19 18:39:36 -05:00
Alok Saboo
f5735f6e09
Update listenbrainz.py
2023-12-19 18:24:53 -05:00
Alok Saboo
d17d1468c9
Update listenbrainz.py
2023-12-19 18:23:21 -05:00
Alok Saboo
b39779d838
Update listenbrainz.py
2023-12-19 18:16:22 -05:00
Alok Saboo
a0b41e8474
Update listenbrainz.py
2023-12-19 18:13:11 -05:00
Alok Saboo
f376c21b03
Update listenbrainz.py
2023-12-19 18:12:16 -05:00
Alok Saboo
a35d7648b1
Update listenbrainz.py
2023-12-19 18:10:36 -05:00
Alok Saboo
af55c1ecb8
Update listenbrainz.py
2023-12-19 18:06:45 -05:00
Alok Saboo
9e7b70903c
Update listenbrainz.py
2023-12-19 17:24:24 -05:00
Alok Saboo
14063951bf
Update listenbrainz.py
2023-12-19 17:18:54 -05:00
Alok Saboo
3000664344
Update listenbrainz.py
2023-12-19 17:13:08 -05:00
Alok Saboo
f3d8655ee5
Update listenbrainz.py
2023-12-19 17:12:12 -05:00
Alok Saboo
92bb8584d4
Update listenbrainz.py
2023-12-19 17:10:29 -05:00
Alok Saboo
cac7f7d2dd
Update listenbrainz.py
2023-12-19 17:06:50 -05:00
Alok Saboo
efcb54995e
Update listenbrainz.py
2023-12-19 17:06:11 -05:00
Alok Saboo
e884d78351
Update listenbrainz.py
2023-12-19 17:05:07 -05:00
Alok Saboo
cd4e44ec06
Update listenbrainz.py
2023-12-19 16:55:58 -05:00
Alok Saboo
6a94276af9
Update listenbrainz.py
2023-12-19 16:53:22 -05:00
Alok Saboo
240faaa619
Update listenbrainz.py
2023-12-19 16:51:54 -05:00
Alok Saboo
03888fa5b3
Update listenbrainz.py
2023-12-19 16:49:40 -05:00
Alok Saboo
c99cd85083
Update listenbrainz.py
2023-12-19 16:47:40 -05:00
Alok Saboo
7cae5eb70e
Update listenbrainz.py
2023-12-19 16:46:43 -05:00
Alok Saboo
702570f495
Update listenbrainz.py
2023-12-19 16:44:17 -05:00
Alok Saboo
04dc0f6862
Update listenbrainz.py
2023-12-19 16:40:41 -05:00
Alok Saboo
2be00a4d17
Update listenbrainz.py
2023-12-19 16:39:44 -05:00
Alok Saboo
69a0ce6e7d
Update listenbrainz.py
2023-12-19 16:36:58 -05:00
Alok Saboo
eeb4c4b5cc
Update listenbrainz.py
2023-12-19 16:34:00 -05:00
Alok Saboo
393ff0c7bd
Update listenbrainz.py
2023-12-19 15:51:03 -05:00
Alok Saboo
549827a46a
Update listenbrainz.py
2023-12-19 15:49:02 -05:00
Alok Saboo
ed98370077
Update listenbrainz.py
2023-12-19 15:48:19 -05:00
Alok Saboo
cb58f32173
Update listenbrainz.py
2023-12-19 15:41:08 -05:00
Alok Saboo
658d1d7340
Update listenbrainz.py
2023-12-19 15:39:10 -05:00
Alok Saboo
a2428f4845
Update listenbrainz.py
2023-12-19 15:38:20 -05:00
Alok Saboo
444fd2e83d
Update listenbrainz.py
2023-12-19 15:37:00 -05:00
Alok Saboo
4afd992fbd
Update listenbrainz.py
2023-12-19 15:34:06 -05:00
Alok Saboo
b12a59ed58
Update listenbrainz.py
2023-12-19 15:31:12 -05:00
Alok Saboo
0d56ec7232
Update listenbrainz.py
2023-12-19 15:30:19 -05:00
Alok Saboo
969ff61cf9
Update listenbrainz.py
2023-12-19 15:28:10 -05:00
Alok Saboo
7d6c123436
Update listenbrainz.py
2023-12-19 15:18:27 -05:00
Alok Saboo
619fb17383
Update listenbrainz.py
2023-12-19 14:57:44 -05:00
Alok Saboo
2c25076fbf
Update listenbrainz.py
2023-12-19 14:55:30 -05:00
Alok Saboo
d4cb8ff654
Create listenbrainz.py
2023-12-19 14:28:46 -05:00
Max Goltzsche
58e5b02929
smartplaylist: add --uri-format option
...
Beets web API already allows remote players to access audio files but it doesn't provide a way to expose the playlists defined using the smartplaylist plugin.
Now the smartplaylist plugin provides an option to generate ID-based item URIs/URLs instead of paths.
Once playlists are generated this way, they can be served using a regular HTTP server such as nginx.
To provide sufficient flexibility for various ways of integrating beets remotely (e.g. beets API, beets API with context path, AURA API, mopidy resource URI, etc), the new option has been defined as a template with an `$id` placeholder (assuming each remote integration requires a different path schema but they all rely on using the beets item `id` as identifier/path segment).
To prevent local path-related plugin configuration from leaking into a HTTP URL-based playlist generation (invoked with CLI option in addition to the local playlists generated into another directory), setting the new option makes the plugin ignore the other path-related options `prefix`, `relative_to`, `forward_slash` and `urlencode`.
Usage examples:
* `beet splupdate --uri-format 'http://beets:8337/item/$id/file '` (for beets web API)
* `beet splupdate --uri-format 'http://beets:8337/aura/tracks/$id/audio '` (for AURA API)
(While it was already possible to generate playlists containing HTTP URLs previously using the `prefix` option, it did not allow to generate ID-based URLs pointing to the beets web API but required to expose the audio files using a web server directly and refer to them using their file system `$path`.)
Relates to #5037
2023-12-16 05:37:27 +01:00
Max Goltzsche
385c05f98e
smartplaylist: change option --extm3u to --output
...
The boolean flags `--extm3u` and `--no-extm3u` are replaced with a string option `--output=m3u|m3u8`.
This reduces the amount of options and allows to evolve the CLI to support more playlist output formats in the future (e.g. JSON) without polluting the CLI at that point.
2023-12-16 00:23:03 +01:00
Maxr1998
41719d7b49
advancedrewrite: Apply same rewrite to more corresponding album fields
2023-12-15 17:23:40 +01:00
Adrian Sampson
1efd67cb82
Merge pull request #5044 from Maxr1998/advancedrewrite-rewrite
...
advancedrewrite: Support simple syntax and improve advanced syntax
2023-12-15 09:34:25 -05:00
Max Goltzsche
222b3a34f9
smartplaylist: expose config as CLI options
...
Add CLI options to `splupdate` command:
* `--playlist-dir`, `-d`
* `--relative-to`
* `--prefix`
* `--urlencode`
* `--forward-slash`
* `--pretend-paths`
2023-12-15 03:51:27 +01:00
Max Goltzsche
b07a2e42f4
smartplaylist: add extm3u/extinf/m3u8 support
...
This is to be able to display meaningful metadata and search a playlist within a player without having to load the linked audio files of a playlist.
2023-12-14 01:46:14 +01:00
Maxr1998
304a052dfd
advancedrewrite: Support simple syntax and improve advanced syntax
2023-12-13 14:48:43 +01:00
J0J0 Todos
e5d10004ae
Merge pull request #4807 from doronbehar/mbsubmit-improvements
...
mbsubmit: Add picard `PromptChoice`
2023-12-06 13:08:20 +01:00
Doron Behar
729a11e211
mbsubmit: Add picard PromptChoice
...
Make it possible to open picard from the import menu when there are weak
recommendations.
2023-12-05 13:49:03 +02:00
Alok Saboo
4348a49a4f
Formatting fixes
2023-12-04 11:38:34 -05:00
Alok Saboo
bdc7de874d
Revert code cleanup
2023-12-04 11:37:01 -05:00
Alok Saboo
316b22e9f9
Code cleanup
2023-12-04 11:22:28 -05:00
Alok Saboo
c102505621
Add ConnectionError handling
2023-12-04 10:32:55 -05:00
Adrian Sampson
df2d6ae753
Merge branch 'master' into deezer_error
2023-12-02 13:49:16 -05:00
Alok Saboo
a4ce25fce0
Changed debug logs to error
2023-12-01 12:09:47 -05:00
Alok Saboo
7ffbd040a1
Updated error handling
2023-12-01 08:43:14 -05:00
Alok Saboo
753e4e9a39
Add 502 error handling
2023-11-28 09:58:42 -05:00
Alok Saboo
1a77d9575b
Formatting fixes
2023-11-25 10:29:02 -05:00
Alok Saboo
2115f31070
Fix comments
2023-11-25 10:27:29 -05:00
Alok Saboo
e5df18c981
Merge remote-tracking branch 'upstream/master' into deezer_error
2023-11-23 09:40:21 -05:00
Alok Saboo
dee893a7d0
Add helper function and address comments
2023-11-23 09:40:03 -05:00
Alok Saboo
b2fe89d70c
formatting fixes
2023-11-22 12:03:33 -05:00
Alok Saboo
33f8ae3e50
Use exception instead of a module in try-except block
2023-11-22 12:02:39 -05:00
Alok Saboo
b4cc654153
Formatting fixes
2023-11-22 11:56:06 -05:00
Alok Saboo
3f68856e58
Lint
2023-11-22 11:54:10 -05:00
Alok Saboo
4cf2c6d3a1
Handle Deezer API errors
2023-11-22 11:52:33 -05:00
Alok Saboo
138216a6bb
Update docstring
2023-11-16 12:23:42 -05:00
Alok Saboo
3b707b9276
Update spotify.py
2023-11-15 10:31:20 -05:00
Alok Saboo
e2f83cdf77
Fix typo
2023-11-15 10:24:34 -05:00
Alok Saboo
3b8cb98e6d
Update beetsplug/spotify.py
...
Co-authored-by: J0J0 Todos <2733783+JOJ0@users.noreply.github.com>
2023-11-15 10:21:53 -05:00
Alok Saboo
c64df0d27a
Update beetsplug/spotify.py
...
Co-authored-by: J0J0 Todos <2733783+JOJ0@users.noreply.github.com>
2023-11-15 10:21:42 -05:00
Alok Saboo
33944d457b
formatting
2023-11-12 09:45:29 -05:00
Alok Saboo
9e1c530c9d
also include EAN and UPC
2023-11-12 09:43:59 -05:00
Alok Saboo
e7d86f2fc9
Update spotify.py
2023-11-12 09:40:25 -05:00
Alok Saboo
7952f0a71d
Also obtain track ISRC
2023-11-11 21:35:14 -05:00
Alok Saboo
d561ba7793
Add isrc
2023-11-11 21:23:50 -05:00
Alok Saboo
86daa0111c
Update spotify.py
2023-11-11 21:02:52 -05:00
jeff
7b0f5fb3f3
Add config option to prefer synced lyrics over plain
2023-11-05 11:26:33 -05:00
jeff
e14982cad7
Add LRCLIB as a provider for the lyrics plugin
2023-11-05 11:26:33 -05:00
wisp3rwind
05383a0dab
replaygain: typings
...
also, minor clean-up (remove unused function after_version, f-string
conversion)
2023-11-05 08:25:39 +01:00
Alok Saboo
c1e91f42df
Formatting
2023-11-01 18:12:23 -04:00
Alok Saboo
d4a4934f7a
Improve error handling
2023-11-01 17:38:50 -04:00
Adrian Sampson
6655760732
Merge pull request #4974 from fhchl/master
2023-10-26 10:09:07 -04:00
Adrian Sampson
a2d6819276
Merge pull request #4972 from henges/henges/discogs-fetchart
...
discogs: Populate `cover_art_url` attribute
2023-10-25 14:51:33 -04:00
Leet
eea7c19abc
Use gender-neutral language
2023-10-23 17:41:38 -04:00
U-LAPTOP-4EP3DB2K\alexa
5fe19c1d1d
PR feedback: fix formatting
2023-10-23 09:47:19 +08:00
fhchl
3e1d496ba1
return empty lists instead of None
2023-10-22 20:46:36 +02:00
U-LAPTOP-4EP3DB2K\alexa
3e06ca2af4
Use images attr over cover_image
2023-10-22 21:51:29 +08:00
U-LAPTOP-4EP3DB2K\alexa
6e88da7298
Merge branch 'master' into henges/discogs-fetchart
2023-10-22 20:48:54 +08:00
U-LAPTOP-4EP3DB2K\alexa
c31146e3f5
Discogs <-> fetchart integration
2023-10-22 20:42:45 +08:00
Serene-Arc
a6e5201ff3
Apply formatting tools to all files
...
This is 'the big one', which touches every file so that it all conforms
to the given standard.
2023-10-22 09:53:18 +10:00
Alok Saboo
f79fd64aeb
Simplify loop and update changelog entry
2023-10-21 16:16:51 -04:00
Alok Saboo
ee42f79b25
Update retry logic
2023-10-21 09:43:01 -04:00
Alok Saboo
66bf0023ea
Merge remote-tracking branch 'upstream/master' into spotify_timeout
2023-10-15 09:36:54 -04:00
Maxr1998
9660dd6130
Fix remaining linter warnings
2023-10-14 15:00:57 +02:00
Maxr1998
f809e241ef
Fix linter warnings
2023-10-14 15:00:57 +02:00
Maxr1998
0a4c8e4952
Add advanced rewrite plugin
...
This plugin allows rewriting fields based on a given library query. This can be helpful, for example, when an artist was renamed but you'd like to keep their older releases under their old name, or if you have a single track from a Various Artists release and want to have it included with the original artist.
2023-10-14 15:00:57 +02:00
Alok Saboo
7fd470a793
resume after reauthentication
2023-10-11 20:39:53 -04:00
Alok Saboo
e064492bd8
additional error handling
2023-10-11 20:37:12 -04:00
Alok Saboo
d9a99ff5f7
add missing space in the log message
2023-10-10 15:42:38 -04:00
Alok Saboo
4b955152c5
change to f-string
2023-10-10 15:22:10 -04:00
Alok Saboo
b69de85d49
Add 429 and 503 error handling
2023-10-10 15:20:29 -04:00
Alok Saboo
989ee5a69c
Remove retry logic
2023-10-10 14:49:50 -04:00
Alok Saboo
d87e3e6628
Update error code
2023-10-09 08:59:15 -04:00
Alok Saboo
e68369bc8a
Change retry logic
2023-10-07 18:59:02 -04:00
Alok Saboo
97ad4baee4
Update spotify.py
2023-10-07 18:30:03 -04:00
Alok Saboo
d09af885ed
Change the log to error
2023-10-07 18:23:16 -04:00
Alok Saboo
36a92381e7
add a default timeout of 30 seconds
2023-10-07 18:22:39 -04:00
Alok Saboo
337e5f4548
gracefully handle Spotify timeout error
2023-10-07 18:19:58 -04:00
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
Alok Saboo
fa822d6ab2
Add a check for valid data
2023-05-25 13:55:57 -04:00
Alok Saboo
c0e3a530f7
Update spotify.py
2023-05-25 13:41:09 -04:00
Alok Saboo
652877617a
Change preposition
2023-05-11 20:17:23 -04:00
Alok Saboo
e4c669adcd
Address review comments.
2023-05-11 20:12:32 -04:00
Alok Saboo
16e6a2d490
Merge remote-tracking branch 'upstream/master' into coverarturl
2023-05-07 14:29:04 -04:00
wisp3rwind
f5b20114b4
fetchart: revert a cleanup from 4774 that could break plugins
...
cf. @arogl's comment 254bb297c8 (commitcomment-111922347)
> Now that this has been merged, external plugins that add to the fetchart plugin now fail with:
>
> ```AttributeError: module 'beetsplug.fetchart' has no attribute 'SOURCES_ALL'``
2023-05-05 20:36:28 +02:00
Alok Saboo
f06c5ed593
Update debug logs
2023-05-02 09:51:45 -04:00
Alok Saboo
27a50ce364
Remove unrelated commits
2023-05-02 09:39:59 -04:00
Alok Saboo
1c21821f4a
Added changelog and additional error handling
2023-05-02 08:22:54 -04:00
Alok Saboo
17d1a431bc
Merge remote-tracking branch 'upstream/master' into coverarturl
2023-05-02 08:08:17 -04:00
Alok Saboo
45f4ce6f9a
Add additional checks to prevent Spotify calls
2023-05-02 08:01:41 -04:00
Alok Saboo
4349c1e489
Update fetchart.py
2023-04-30 08:54:51 -04:00
Alok Saboo
2dc784d3a8
Merge remote-tracking branch 'upstream/master' into coverarturl
2023-04-30 08:51:17 -04:00
wisp3rwind
d236747587
fetchart: add add_default_config() method to sources
...
in order to move the remaining source-specific code out of plugin
initialization and into the source classes
2023-04-30 10:15:40 +02:00
wisp3rwind
254bb297c8
fetchart: add available() method to sources
...
in order to move (some of) the source-specific code out of plugin
initialization and into the source classes
2023-04-30 10:04:54 +02:00
Alok Saboo
9944599639
Update fetchart.py
2023-04-29 16:44:20 -04:00
Alok Saboo
456cfd7dae
Update fetchart.py
2023-04-29 16:40:10 -04:00
Alok Saboo
2f0d416965
Cleanup
2023-04-29 13:41:51 -04:00
Alok Saboo
7dd9137f92
Update fetchart.py
2023-04-29 13:31:18 -04:00
Alok Saboo
17591c3ffd
Update fetchart.py
2023-04-29 13:30:50 -04:00
Alok Saboo
5cdd9b5747
Add to sources_all
2023-04-29 13:27:40 -04:00
Alok Saboo
17d2193c02
Add cover_art_url as fetchart source
2023-04-29 13:19:59 -04:00
Alok Saboo
44751b020e
Merge remote-tracking branch 'upstream/master' into spotify_fetch
2023-04-29 08:45:15 -04:00
wisp3rwind
4ae1e8278c
web: fix for breaking werkzeug change
...
cf. https://github.com/pallets/werkzeug/issues/2506
didn't check when part_isolating was introduced, but presumably, it
should be harmless to set this attribute for old werkzeug versions that
didn't have it yet
2023-04-29 11:37:46 +02:00
Alok Saboo
d4eb3a6b82
Update fetchart.py
2023-04-28 18:05:27 -04:00
Alok Saboo
067a3633d3
Change error handling
2023-04-28 18:02:17 -04:00
Alok Saboo
34fe9344ae
change preposition
2023-04-28 08:50:01 -04:00
Alok Saboo
654b57f50a
Make beautifulsoup optional
2023-04-28 08:47:32 -04:00
Alok Saboo
036667c51e
change variable to lower case
2023-04-27 18:13:39 -04:00
Alok Saboo
18bcadcfdc
Add spotify art source
2023-04-27 18:10:09 -04:00
Alok Saboo
bb2ce02e07
Remove logging
2023-04-18 20:54:43 -04:00
Alok Saboo
0492f1f214
Address comments
2023-04-14 08:10:13 -04:00
Alok Saboo
1e3fee8495
Use temp folder instead of cwd
2023-04-14 08:08:59 -04:00
Alok Saboo
023f3d7df7
Merge remote-tracking branch 'upstream/master' into embedart_url
2023-04-09 15:11:21 -04:00
Alok Saboo
3a1e4bd845
Remove temporary logging
2023-04-09 14:07:55 -04:00
Alok Saboo
8357617f02
Change indentation
2023-04-09 14:02:10 -04:00
Alok Saboo
34a4e7be5f
Move away from PIL and use mimetypes instead
2023-04-09 13:58:26 -04:00
Šarūnas Nejus
b5b1afbfff
Also perform bareasc queries in SQL
2023-04-09 18:43:33 +01:00
Alok Saboo
99ca3e96d4
Add more error handling for the img.save function
2023-04-09 09:58:31 -04:00
Alok Saboo
9c3f4a4ac8
Change image format to PNG
2023-04-08 22:03:59 -04:00
Alok Saboo
b3008b74b8
Remove unused imports
2023-04-08 21:12:23 -04:00
Alok Saboo
23b42e80e2
Merge remote-tracking branch 'upstream/master' into embedart_url
2023-04-08 21:07:41 -04:00
Alok Saboo
93f4068cca
Address review comments
2023-04-08 21:01:10 -04:00
J0J0 Todos
86929eb6a0
convert: playlist: Adapt code comments
...
- Remove initial comment around playlist entry condition (which is better
suited for user docs anyway, and stated there already)
- Add explanation above the items_paths playlist contents creation list
comprehension.
2023-04-02 19:34:13 +02:00
J0J0 Todos
16e361baf3
convert: playlist: item_paths relative to playlist
...
Ensure entries in items_paths are generated with a path relative to the
location of the playlist file.
2023-04-02 13:10:14 +02:00
J0J0 Todos
a4d03ef586
convert: playlist: M3U write + contents as bytes
...
Make sure we stay with the beets standard of handling everything internally as
bytes.
- M3UFile.write() method writes in wb mode.
- Playlist contents and EXTM3U header is handled as bytes.
- item.destination() gives us unicode string paths, we tranlate to bytes
using util.bytestring_path().
- Fix test_playlist*write* tests to encode UTF-8 assert strings as bytes using
bytestring_path() before comparision.
2023-03-29 07:46:08 +02:00
J0J0 Todos
20a0012f79
convert: playlist: Use normpath for playlist file
...
Fixes FileNotFoundError when for example a tilde (~) characteris used for a
--dest path.
2023-03-29 07:46:08 +02:00
J0J0 T
d248063f96
convert: playlist: Improve --playlist help text
2023-03-29 07:46:08 +02:00
J0J0 T
cb630c45f6
convert: playlist: Also use syspath() for contents
...
of playlist. We want to have processed every entry in the media list we
pass to the M3UFile instance.
2023-03-29 07:46:08 +02:00
J0J0 T
7d121c390b
convert: playlist: Move M3UFile class to separate
...
module in util package.
2023-03-29 07:46:08 +02:00
J0J0 T
55b386375a
convert: playlist: Move m3u creation after conversions
...
- Move the creation of the playlist file to the very end, right after
self._parallel_convert, in the convert plugin's main function.
- In the test code, the destination directory is created when the
conversion happens, thus this fixes test_playlist and doesn't hurt the
feature - The playlist creation can as well be the very last step in
the process.
2023-03-29 07:21:27 +02:00
J0J0 T
5dfff50005
convert: playlist: Refactor m3u writing to class
...
and also implement a currently untested load() method.
2023-03-29 07:21:27 +02:00
J0J0 T
c251ed19c4
convert: playlist: Generate m3u file in one batch
...
to avoid any possible interference with the threaded file conversion
mechanism.
2023-03-29 07:21:27 +02:00
J0J0 T
d589e77ade
convert: playlist: Fix redundant join path
...
It's done in _get_opts_and_config already.
2023-03-29 07:21:27 +02:00
J0J0 T
c0b1bc9867
convert: playlist feature: Better relative path gen
...
Use Item.destination method for generation of relative paths to media
files in playlist. The fragment keyword enables returning the path as
unicode instead of bytes, let's keep that in mind.
2023-03-29 07:21:27 +02:00
J0J0 T
16e25bb61b
convert: playlist feature: Fix relative paths
...
pointing to media files in playlist. Also refine code comment and move
to a better fitting place.
2023-03-29 07:21:27 +02:00
J0J0 T
fd8fe69738
convert: Playlist feature linting fixes
2023-03-29 07:21:27 +02:00
J0J0 T
d448e0c4de
convert: Refine and fix playlist feature
...
- Improve --help text
- Use unicode instead of bytes when adding media file paths to the
playlist file.
- The "standard" (?) of m3u8 defines that unicode should ensure support
of special characters in media file names. util.displayable_path() is
used to do the conversion from bytes. We save everything in bytes in
the config since it seemes to be the way this plugin or beets in
general likes to save paths.
- Join dest and playlist in the config reader method already to have it
ready in both methods that require the full path to the playlist file.
2023-03-29 07:21:27 +02:00
J0J0 T
861bc69df5
convert: Add a quick & dirty m3u playlist feature
2023-03-29 07:21:27 +02:00
Alok Saboo
3b39a4fe66
Raise OSError
2023-03-28 13:23:26 -04:00
Alok Saboo
2fcdb8c2ca
Add FilesystemError handling
2023-03-28 09:22:51 -04:00
Alok Saboo
a4b4df8b12
More error handling
2023-03-27 19:28:09 -04:00
Alok Saboo
2e2a3bf223
Add additional error handling
2023-03-27 11:56:26 -04:00
J0J0 Todos
5bf4e3d92f
Dedicated flex attrs for Deezer, Beatport album ID
...
- Similar to what the Spotify plugin does, on imports we save to a field
`..._album_id` (spotify_album_id, deezer_album_id, beatport_album_id)
- It would be good to submit such a change to the 3rd-party plugins beetcamp
and beatport4 as well (beatport_album_id, bandcamp_album_id).
- We might need to investigate why none of these
flex attr fields get populated to the beets album level (`beet info -a`,
album_attributes db table), it is only available at the item level (`beet
info`, item_attributes db table). This should be tackled in a future
issue/PR.
2023-03-26 13:20:07 +02:00
Alok Saboo
2060e047d2
Update parser options
2023-03-19 10:21:32 -04:00
Alok Saboo
2d942ce722
Move import inside the function
2023-03-19 09:15:38 -04:00
Alok Saboo
59d5d23bb3
Update embedart.py
2023-03-18 19:12:29 -04:00
Alok Saboo
64c2ae138d
Update embedart.py
2023-03-18 19:11:24 -04:00
Alok Saboo
81835b0721
Update embedart.py
2023-03-18 19:08:46 -04:00
Alok Saboo
4dd165495f
Update embedart.py
2023-03-18 19:00:28 -04:00
Alok Saboo
feeeb4080c
Update embedart.py
2023-03-18 18:58:32 -04:00
Alok Saboo
f051d67947
Add option to import using URL
2023-03-18 18:23:53 -04:00
Adrian Sampson
2e18f84b38
Merge pull request #4698 from ghbrown/discogs_client_check
...
discogs_client version check
2023-03-10 21:56:48 -08:00
ghbrown
f1b7832d52
Change minimum discogs_client version to 2.3.15
2023-03-10 15:28:29 -06:00
Andrew Rogl
e33369d231
Fix typo in beetsplug/deezer.py
...
Found another typo
2023-03-10 17:28:52 +10:00
ghbrown
bad541e2c4
Address lint errors for discogs_client version check
2023-03-09 17:38:47 -06:00
ghbrown
437f6e76e4
Add warning about (python3-)discogs-client version
2023-03-09 17:16:11 -06:00
Andrew Rogl
5662fef842
Fix type in deezer.py
2023-03-09 17:05:03 +10:00
J0J0 Todos
f36c55f730
Refactor Beatport plugin to use _get_id
...
from MetadataSourcePlugin and save beatport_id_regex in id_extractors module.
This streamlines the Beatport release ID extraction magic with plugins Deezer
and Spotify.
2023-03-08 18:12:31 +01:00
J0J0 Todos
8ab25694a5
Move Deezer ID regex to id_extractors module
...
in beets.util package.
2023-03-08 18:12:31 +01:00
J0J0 Todos
284180ec75
Refactor MetadataSourcePlugin._get_id()
...
and put to use in Spotify plugin.
- Make _get_id() a staticmethod usable from outside a metadata source plugin.
- id_regex now has to be passed as an argument instead of assuming it is
accessible via an instance variable (self.id_regex).
- In the Spotify plugin, import spotify_id_regex from util.id_extractors
2023-03-08 18:12:31 +01:00
J0J0 Todos
0175a9aed8
Introduce new module beets.util.id_extractors
...
- We introduce a new submodule of beets.util named id_extractors.
- Parts of the ID extraction utilites required by metadata source plugins
should live there.
- Also this enables future usage of those utilities from the "outside" of
metadata source plugins.
- Move Discogs ID extractor to the new module and change test_discogs to use
the new location.
- Add spotify_id_regex variable to the new module.
2023-03-08 18:12:31 +01:00
J0J0 Todos
1f9113af73
Merge pull request #4582 from jpluscplusm/jcm_fix_albumtypes
...
Store `albumtypes` multi-value field consistently in-DB & in-tag, preventing continual file re-tagging
2023-03-08 14:26:19 +01:00
Alok Saboo
abf6b1e1f3
Update spotify.py
2023-02-28 09:38:23 -05:00
Alok Saboo
c73ecb89d3
Update spotify.py
2023-02-28 09:36:16 -05:00
J0J0 Todos
93fa19f493
Fix albumtypes plugin and its tests
...
The new database type DelimitedString does list to string and vice versa
conversions itself.
2023-02-27 13:43:03 +01:00
Mark Trolley
55255b0087
Deprecate absubmit and update acousticbrainz plugins
...
Fixes #4627 .
AcousticBrainz is shutting down as of early 2023. Deprecate the absubmit
plugin and update the acousticbrainz plugin to require configuration of
an AcousticBrainz server instance.
2023-02-20 17:42:07 -05:00
Benedikt
22ca6eff82
Merge pull request #4374 from wisp3rwind/pr_drop_old_python
...
Drop Python 3.6, some Python 2 + Python <= 3.6 cleanup
2023-02-19 10:19:36 +01:00
Mark Trolley
13ce920fd1
Fix cover art archive fetching
...
PR #3748 changed the way cover art is fetched from the cover art
archive, but the manual addition of a `-` to the width suffix that was
needed when the image URI was being constructed manually was not
removed. Because of this the plugin would try to look up the property
under `thumbnails` that didn't exist (for example `-1200` instead of
`1200`), which would fail.
2023-02-17 19:01:20 -05:00
wisp3rwind
12173d30a8
permissions: Move syspath conversion to the actual API boundary
2023-02-12 14:04:24 +01:00
night199uk
23598df155
Avoid calling chmod in some scenarios.
...
This guards the os.chmod calls so it's only called IF the
permissions need changing. This guards against an exception in
certain complex library setups.
2023-02-11 19:28:52 -08:00
J0J0 Todos
527052e13d
Merge branch 'master' into splupdate_dry_run
2023-01-31 07:07:09 +01:00
ghbrown
a99eb77337
Improve where an how data added to tracks of album
2023-01-20 22:15:50 -06:00
ghbrown
cbb1b21408
Use tracks field in item_candidates; add more info to tracks of AlbumInfo
2023-01-20 21:07:15 -06:00
ghbrown
2df41b9e16
Limit number of returned track candidates
2023-01-16 18:43:26 -06:00
ghbrown
2e916404f9
early exit; add data_source
2023-01-12 19:41:04 -06:00
ghbrown
2db0796fad
Implement item_candidates for Discogs
2023-01-11 13:20:54 -06:00
Adrian Sampson
6989bce6ca
Merge pull request #4515 from JOJ0/fix_discogs_multi_artist
...
Handle "join keyword" in `MetadataSourcePlugin.get_artist()`
2023-01-06 10:30:23 -08:00
Adrian Sampson
5383d55076
Merge pull request #4616 from jackwilsdon/remove-musixmatch-default
...
Remove Musixmatch from default enabled sources
2023-01-02 15:29:12 -08:00
J0J0 Todos
29ed4abb52
Use join_key arg in Discogs source plugin
...
Fixes #4401
2023-01-02 13:47:31 +01:00
J0J0 Todos
6fb6f59c40
fromfilename: Use logging magic from inherited BeetsPlugin
...
and change log level to INFO.
2023-01-02 13:29:21 +01:00
J0J0 T
c1abcf3310
fromfilename: Add debug log messages
...
that inform when the plugin replaced bad artist, title or tracknumber metadata.
2023-01-02 13:29:21 +01:00
J0J0 Todos
5461ddf9f2
fromfilename: Move <title> regex to the very end
...
since it's the least significant as discussed in the PR's thread.
2023-01-02 13:29:21 +01:00
J0J0 Todos
2839302d53
fromfilename: Swap regex lines as suggested in #4561
2023-01-02 13:29:21 +01:00
Jack Wilsdon
dad9d2393d
Remove Musixmatch from default enabled sources
...
Musixmatch are currently blocking all requests with the beets user
agent. See #4585 .
2022-12-31 14:34:07 +00:00
wisp3rwind
d24cf69269
remove old Python: remove util.text_string
...
This was a helper for situations when Python 2 and 3 APIs returned bytes
and unicode, respectively. In these situation, we should nowadays know
which of the two we receive, so there's no need to wrap & hide the
`bytes.decode()` anymore (when it is still required).
Detailed justification:
beets/ui/__init__.py:
- command line options are always parsed to str
beets/ui/commands.py:
- confuse's config.dump always returns str
- open(...) defaults to text mode, read()ing str
beetsplug/keyfinder.py:
- ...
beetsplug/web/__init__.py:
- internally, paths are always bytestrings
- additionally, I took the liberty to slighlty re-arrange the code: it
makes sense to split off the basename first, since we're only
interested in the unicode conversion of that part.
test/helper.py:
- capture_stdout() gives a StringIO, which yields str
test/test_ui.py:
- self.io, from _common.TestCase, ultimately contains a
_common.DummyOut, which appears to be dealing with str (cf.
DummyOut.get)
2022-12-24 13:09:26 +01:00
wisp3rwind
3510e6311d
web: slight refactor to make path handling more readable
...
(at least, more readable to me)
2022-12-24 13:09:26 +01:00
wisp3rwind
22826c6d36
drop old Python: remove obsolete custom string formatter in hooks plugin
2022-12-24 13:09:26 +01:00
wisp3rwind
67f0c73eec
drop old Python: don't handle obsolte exception in keyfinder plugin
2022-12-24 13:09:26 +01:00
wisp3rwind
bd09cc90b6
drop Python 3.6: docs, a few safe simplifications
2022-12-18 09:20:04 +01:00
J0J0 Todos
87ed0f12ea
Add --pretend option to splupdate command
2022-12-06 07:03:02 +01:00
Luke Harder
f155d3ba75
bug 4406 fix v5 (tests pass again)
2022-11-22 20:40:13 -05:00
Luke Harder
4a1f25e1b1
bug 4406 fix v4 (added configurable threshold)
2022-11-22 13:25:09 -05:00
Luke Harder
252121f537
bug 4406 fix
2022-11-10 12:54:45 -05:00
Aidan Epstein
c906e55ba9
Fix recent bug that would not transcode when format was wrong
...
Bug introduced in c6d623241b , should_transcode would return False even when the format was different.
Also fix up tests and documentation.
2022-10-19 08:55:51 -07:00
Adrian Sampson
407b1fd013
Merge pull request #4510 from KucharczykL/KucharczykL-remove-duplicate-triphop
...
Remove duplicate "Trip-hop" genre
2022-10-03 11:13:06 -07:00
Adrian Sampson
1ebcbf6944
Merge branch 'master' into fix_max_bitrate_default
2022-10-03 11:02:07 -07:00
Lukáš Kucharczyk
a41a9b7aa1
Remove duplicate "Trip-hop" genre
2022-10-03 19:58:23 +02:00
Jordi Ortolá Ankum
95e0161876
Merge branch 'master' into fix_max_bitrate_default
2022-10-03 10:49:51 +02:00
Adrian Sampson
82d41446a2
Use fsdecode for template substitution
...
The idea in this PR is to converge on Python's `fsdecode` and `fsencode`
for argument manipulation. This seems to match up with the Python
standard library's assumptions: namely, on Windows, we use `fsdecode` to
get back to Unicode strings:
54bbb5e336/Lib/subprocess.py (L561)
So let's start by dropping this utility and going straight for
`fsdecode` here to match.
2022-10-01 16:37:47 -07:00
Adrian Sampson
675dd7b9a9
Add logging for command output on errors
2022-10-01 16:08:32 -07:00
Adrian Sampson
9803939a1c
replaygain: Fix error handling for parallel runs
...
The parallelism strategy in #3478 , in retrospect, used a pretty funky
way to deal with exceptions in the asynchronous work---since
`apply_async` has an `error_callback` parameter that's meant for exactly
this. The problem is that the wrapped function would correctly log the
exception *and then return `None`*, confusing any downstream code.
Instead of just adding `None`-awareness to the callback, let's just
avoid running the callback altogether in the case of an error.
2022-10-01 15:47:41 -07:00
Jordi
c6d623241b
Fix beets#4472 - set 'max_bitrate' default param to none
2022-10-01 01:20:30 +02:00
Alok Saboo
4692199166
Add dateype back
2022-09-17 21:05:16 -04:00
Alok Saboo
e4063b5880
remove datetype
2022-09-17 20:56:48 -04:00
Alok Saboo
85b500e41a
Fix spotify_updated bug
2022-09-17 20:25:36 -04:00
Alok Saboo
d267f9a8a9
Remove f-string
2022-08-24 09:32:39 -04:00
Alok Saboo
9d8ce14e9a
Cleanup mbsubmit
2022-08-24 09:24:33 -04:00
Alok Saboo
c48aef3f33
Update mbsubmit.py
2022-08-24 09:16:20 -04:00
Alok Saboo
2168292455
Update mbsubmit.py
2022-08-24 09:11:45 -04:00
Adrian Sampson
8cb314350c
Avoid BeautifulSoup deprecation warning
...
The `text` parameter to `SoupStrainer` was renamed to `string` in 2015
(4.4.0) and started producing a warning this year (4.11.0).
https://bazaar.launchpad.net/%7Eleonardr/beautifulsoup/bs4/view/head:/CHANGELOG
2022-08-21 09:50:53 -07:00
vicholp
fde2ad3f65
fix get item file of web plugin
2022-08-03 01:22:35 -04:00
Alok Saboo
c03537c12b
Address comments
2022-08-01 08:06:42 -04:00
Alok Saboo
a8434f6c38
Add last_update
2022-07-31 10:33:16 -04:00
Adrian Sampson
c5e68f5643
Adapt to pycodestyle changes
2022-07-30 19:54:24 -04:00
Aidan Epstein
ac5634d592
Fix old alias
...
It looks like the convert option for wma used to be called windows media. We could just remove this alias, but might be good to keep for backwards compatibility.
2022-07-30 16:10:58 +00:00
Alok Saboo
06825e0729
Return an empty sequence
2022-07-15 09:22:23 -04:00
Alok Saboo
28614d94dc
lint
2022-07-12 10:32:55 -04:00
Alok Saboo
85e58d48a2
Update spotify.py
2022-07-12 09:30:07 -04:00
Alok Saboo
4e63c8893b
refactor handle_reponse
2022-07-12 09:28:23 -04:00
Alok Saboo
e1153f7772
revert
2022-07-11 11:42:24 -04:00
Alok Saboo
d82362df3e
Update spotify.py
2022-07-11 11:40:32 -04:00
Alok Saboo
525e5eafd5
revert
2022-07-11 11:36:52 -04:00
Alok Saboo
7b94bbd764
Update spotify.py
2022-07-11 11:36:08 -04:00
Alok Saboo
c2ad2b3d4c
Update spotify.py
2022-07-10 13:23:10 -04:00
Alok Saboo
2bd61a7c48
Update spotify.py
2022-07-10 13:15:25 -04:00
Alok Saboo
a28f8835cb
Update spotify.py
2022-07-10 13:12:38 -04:00
Alok Saboo
b64cefb0d0
Add params to debug
2022-07-10 13:11:27 -04:00
Alok Saboo
2a18ab062e
Remove extra pass statement
2022-07-09 15:00:29 -04:00
Alok Saboo
82e12c6b4b
Add missing whitespaces
2022-07-08 17:08:04 -04:00
Alok Saboo
27c37465e4
Merge branch 'spotify_error' into spotify_track
2022-07-08 15:00:34 -04:00
Alok Saboo
a4baa742d5
Update error code
2022-07-07 14:14:11 -04:00
Alok Saboo
5fb35128d2
Merge remote-tracking branch 'upstream/master' into spotify_track
2022-07-06 10:38:02 -04:00
Alok Saboo
e0d5de4714
Add album information to spotify tracks
...
update
Update spotify.py
Update spotify.py
Update spotify.py
Update spotify.py
Update spotify.py
Update spotify.py
Update spotify.py
Update spotify.py
Update spotify.py
Update hooks.py
Update hooks.py
Update spotify.py
Update spotify.py
Update spotify.py
Update spotify.py
Update spotify.py
Update spotify.py
Update hooks.py
Update spotify.py
Update spotify.py
Cleanup
more cleanup
2022-07-06 10:36:08 -04:00
Alok Saboo
c7f465f968
Address comments
2022-07-05 20:46:14 -04:00
Alok Saboo
ca4b5bcec4
lint
2022-07-04 14:34:32 -04:00
Alok Saboo
12d9b1bd22
Update exception
2022-07-04 14:31:28 -04:00
Alok Saboo
95243019e9
Update exception
2022-07-04 14:29:27 -04:00
Alok Saboo
85e124bcd0
lint errors
2022-07-04 14:15:08 -04:00
Alok Saboo
1d241b0d52
Update error handling
2022-07-04 14:12:22 -04:00
Alok Saboo
016526f30e
Lint
2022-07-01 10:29:20 -04:00
Alok Saboo
6a131d2108
Address comments
2022-07-01 10:26:08 -04:00
Mark Trolley
bfe008ed24
Fix typo in Acousticbrainz warning log
...
Add missing space in Acousticbrainz plugin warning log.
2022-06-30 14:19:58 -04:00
Alok Saboo
decdb16a15
lint
2022-06-29 20:13:48 -04:00
Alok Saboo
54af411b62
Address comments
2022-06-29 19:54:12 -04:00
Alok Saboo
9bde98c440
Update beetsplug/spotify.py
...
Co-authored-by: Adrian Sampson <adrian@radbox.org>
2022-06-29 19:47:21 -04:00
toaru_yousei
91c2cd2ee5
Fix importadded plugin with reflink
2022-06-29 08:06:26 +09:00
Alok Saboo
086de854d1
Update spotify.py
2022-06-26 11:56:13 -04:00
Alok Saboo
276c551059
Update spotify.py
2022-06-26 11:46:42 -04:00
Alok Saboo
8102bd2e35
Add import
2022-06-20 16:59:03 -04:00
Alok Saboo
fc8d3fceeb
Define item_types for spotify attributes
2022-06-20 16:52:05 -04:00
Alok Saboo
abe4f203b1
Changed log to debug
2022-06-18 11:23:22 -04:00
Alok Saboo
1cd78ad3c5
Change log to info
2022-06-16 09:28:07 -04:00
Alok Saboo
4d826168a4
Remove sleep
2022-06-16 09:00:17 -04:00
Alok Saboo
3c68f717e9
Added an extra second (based on other libraries)
2022-06-13 10:16:10 -04:00
Alok Saboo
8ba2c015ab
Sorted imports using iSort
2022-06-13 09:57:07 -04:00
Alok Saboo
c9f9ed3b64
lint
2022-06-13 09:31:19 -04:00
Alok Saboo
a2e6680e2f
Address comments
2022-06-13 09:26:15 -04:00
Alok Saboo
4bb8862b6f
lint
2022-06-12 19:28:47 -04:00
Alok Saboo
c4dec04dcf
Fix lint
2022-06-12 19:27:15 -04:00
Alok Saboo
71be6d5138
Add 429 API error handling
2022-06-12 19:21:38 -04:00
Alok Saboo
9a392f3157
Address try/except comment
2022-06-12 13:58:08 -04:00
Alok Saboo
3d917edd67
Update spotify.py
2022-06-12 13:31:40 -04:00
Alok Saboo
3cd6fd64ca
Added comment about sleep
2022-06-12 13:30:23 -04:00
Alok Saboo
f77a146f17
remove force config option
2022-05-17 20:52:30 -04:00
Alok Saboo
b2a90bf089
Changed spotify labels based on comment
2022-05-17 15:43:16 -04:00
Alok Saboo
9420cf4c6c
Address comments
2022-05-17 15:04:45 -04:00
Alok Saboo
39600bcbbb
Update beetsplug/spotify.py
...
Co-authored-by: Adrian Sampson <adrian@radbox.org>
2022-05-17 14:50:34 -04:00
Alok Saboo
d313da2765
Update beetsplug/spotify.py
...
Co-authored-by: Adrian Sampson <adrian@radbox.org>
2022-05-17 14:50:27 -04:00
Alok Saboo
c66225708e
Update beetsplug/spotify.py
...
Co-authored-by: Adrian Sampson <adrian@radbox.org>
2022-05-17 14:50:14 -04:00
Alok Saboo
72e037f1ed
Update spotify.py
2022-05-13 10:13:15 -04:00
Alok Saboo
80843d7720
Update spotify.py
2022-05-13 10:08:56 -04:00
Alok Saboo
f6c0bdac75
revert
2022-05-13 10:03:08 -04:00
Alok Saboo
4eb83e8d97
Save track popularity during the import to save an API call
2022-05-13 09:58:12 -04:00
Alok Saboo
d465471308
Add force option in config
2022-05-13 08:42:17 -04:00
Alok Saboo
4c4cafbf04
Update spotify.py
2022-05-12 20:42:13 -04:00
Alok Saboo
9c9f52b7e5
remove logging
2022-05-12 20:40:03 -04:00
Alok Saboo
db1c77fb25
Update spotify.py
2022-05-12 20:38:01 -04:00
Alok Saboo
ba3a582483
Update spotify.py
2022-05-12 20:36:04 -04:00
Alok Saboo
e8de749eaf
Clean up docstrings
2022-05-12 20:24:40 -04:00
Alok Saboo
b1ad49a054
Update spotify.py
2022-05-12 20:09:40 -04:00
Alok Saboo
1b02d65112
Fix return
2022-05-08 12:42:20 -04:00
Alok Saboo
1d43ea2dba
Save Spotify album_id and track_id as flexible attributes
2022-05-08 12:21:44 -04:00
olgarrahan
a26a530996
replace_br function added to reduce code duplication
2022-04-17 15:25:14 -04:00
olgarrahan
16d74bafc3
Genius lyrics header bug fixed and updated test case for lyrics plugin
2022-04-16 13:19:13 -04:00
olgarrahan
c0bb2ff2a1
Genius lyrics header bug fixed and updated test case for lyrics plugin
2022-04-15 16:37:05 -04:00
Benedikt
1167453ed8
Merge pull request #4313 from wisp3rwind/pr_artresizer_oo
...
Refactor: ArtResizer backends are classes
2022-03-23 23:05:43 +01:00
wisp3rwind
b76a3fcaa4
artresizer: move ImageMagick/PIL code from thumbnails plugin to ArtResizer
...
Makes the dispatch to the chosen backend simpler in the thumbnails
plugin. Given that ArtResizer is not only about resizing art anymore,
these methods fit there quite nicely.
2022-03-12 23:34:46 +01:00
wisp3rwind
8a969e3041
artresizer: backend classes part 1: stub classes, version checks
2022-03-12 19:48:45 +01:00
Adrian Sampson
bf66895191
Merge pull request #4302 from DucNg/auto_keep
...
Add auto_keep option to convert plugin - attempt to fix #1840
2022-03-11 08:09:09 -05:00
Duc Nguyen
c4281ddacc
add some documentation
2022-03-09 18:34:31 +01:00
Duc Nguyen
a2325e72ad
refactoring
2022-03-04 10:42:18 +01:00
Duc Nguyen
af5858d200
doc + linter + changelog
2022-03-04 10:42:17 +01:00
Duc Nguyen
18e8b73c33
add option to convert items after import
...
convert items after imports but also keep original files intact
2022-03-04 10:40:59 +01:00
J0J0 T
c85f903cae
Revert "discogs: Add extract_release_id_regex sanity check"
...
This reverts commit c3cc055fdd3830bbe1c5470fe540684278a6ecc7.
We assume the Discogs API never returns a release response without an
URI.
2022-03-04 08:17:49 +01:00
J0J0 T
b609047d64
discogs: Add extract_release_id_regex sanity check
...
Check whether any input worth pattern checking was passed.
2022-03-04 08:17:49 +01:00
J0J0 T
c9c1123756
discogs: Fix discogs_albumid extraction
...
Use extract_release_id_regex instead of extract_release_id to get the
release ID out ouf the Discogs release URL.
2022-03-04 08:17:49 +01:00
Joseph Heyburn
4bde4d082d
discogs: allow style to be appended to genre
...
- Added more verbose documentation to `append_style_genre`
- Refactor based on code review
2022-03-03 10:03:31 +00:00
Joseph Heyburn
55e4917df3
discogs: allow style to be appended to genre
...
- Adds a configuration that, when enabled, will append the style to genre
- Rationale is to have more verbose genres in genre tag of players that only support genre
2022-03-02 22:04:36 +00:00
Adrian Sampson
5f45e9e108
Tiny wording tweaks for #4281
2022-02-16 16:34:38 -05:00
Jaime Marquínez Ferrándiz
fedb8b0b8f
fish plugin: Assign the default output path to the option instead of using None
2022-02-16 21:42:08 +01:00
Jaime Marquínez Ferrándiz
b46b4d2045
fish plugin: Simplify directory creation
2022-02-16 21:34:24 +01:00
Jaime Marquínez Ferrándiz
40fcb25221
fish plugin: Split long line
2022-02-16 08:15:30 +01:00
Jaime Marquínez Ferrándiz
8e5156d01c
fish plugin: Add --output option
2022-02-15 23:11:30 +01:00
Adam Fontenot
07eb26f276
Resize album art when embedding (convert plugin)
...
Fixes #2116
2022-02-09 23:52:21 -08:00
Adrian Sampson
088cdfe995
Revert some of #4226
...
Rectify a couple of things in that PR, pointed out here:
https://github.com/beetbox/beets/pull/4226#issuecomment-1011499620
- Undo the `pretend` sensitivity in the import path, because it's not
clear how this setting could ever be true.
- Preserve the log message in debug mode, even when quiet.
2022-01-29 18:31:48 -05:00
wisp3rwind
8572e9bcec
replaygain: add docstrings
2022-01-22 14:00:32 +01:00
wisp3rwind
d19cc593e3
replaygain: better types to represent peak methods
...
thanks @ybnd in review https://github.com/beetbox/beets/pull/3996 for
this suggestion to properly represent the sum type
2022-01-22 14:00:32 +01:00
wisp3rwind
80f7c58e5a
replaygain test: add basic per_disc testcase
...
The per_disc codepath is currently not exercised at all by the tests.
This test is not very meaningful, but better than nothing.
2022-01-22 14:00:32 +01:00
wisp3rwind
a2df6df9da
replaygain: store_track, store_album are methods on *Task
...
Also, add a convenience function `store()` that dispatches two the
either of the two methods. This will be useful later, when rewriting the
parallel code (but doesn't simplify the code now).
2022-01-22 14:00:32 +01:00
wisp3rwind
9ead9cdbb8
replaygain: pass the write flag explicitly
...
The variable was previously captured by the closure. This is in
preparation for moving these nested functions elsewhere.
2022-01-22 14:00:32 +01:00
wisp3rwind
ad75cbf4a5
replaygain: Flatten data structures
...
Now that we have the *Task objects, the AlbumGain tuple can be removed.
2022-01-22 14:00:32 +01:00
wisp3rwind
67d85d18ad
replaygain: introduce Task objects to bundle the state related to computations
...
Renames *GainHandler -> *Task and instead of having a singleton
instance, creates a *Task object for each album/item to process. The
advantage is that now, related data can be bundled in the instance,
instead of passing multiple arguments around.
2022-01-22 14:00:32 +01:00
wisp3rwind
ae3e95f9d3
replaygain: Convert the ad-hoc tag_specific_values to classes
...
The plugin has loads of indirection and nested functions which make it
really hard to reason about. The larger picture here is that I'd like to make
the code more manageable before reworking the parallelism issues.
In particular, instead of manually implementing an interface using a
function that returns a tuple of function pointers, this commit creates proper
classes. Again, no functionality is changed, this only moves code
around.
2022-01-22 14:00:32 +01:00
wisp3rwind
edf2bda1ce
replaygain: store backend name as class attribute
...
Doesn't change any functionality, but appears a little cleaner to me.
2022-01-22 14:00:32 +01:00
wisp3rwind
96025c6de6
replaygain: avoid determining the method again and again
2022-01-22 14:00:32 +01:00
wisp3rwind
3eb49fca2e
replaygain: clarify docs for overwrite/force and actually respect it correctly
...
The code used to always check the 'overwrite' config value, while that
should only apply during imports. The manual 'replaygain' command has it's
own '-f' flag.
The logic for this flag was changed quite a few times recently, see
https://github.com/beetbox/beets/pull/3816
https://github.com/beetbox/beets/issues/3872
https://github.com/beetbox/beets/pull/3890
but apparently we (me and @ybnd) never really got it right...
If it is some comfort, the logic was never correct in the first place.
2022-01-22 14:00:32 +01:00
wisp3rwind
6689502854
replaygain: rewrite long conditionals in a more imperative manner (2/2)
...
This is significantly easier to parse (for me, at least).
Also, void building some lists inside of any(...) in the process.
2022-01-22 14:00:32 +01:00
wisp3rwind
356a775c5e
replaygain: rewrite long conditionals in a more imperative manner (1/2)
...
This is significantly easier to parse (for me, at least).
Also, void building some lists inside of any(...) in the process.
2022-01-22 14:00:32 +01:00
wisp3rwind
807f124ef8
really remove all six imports
...
apparently, pyupgrade didn't know how to handle these...
2022-01-20 00:26:01 +01:00
Adrian Sampson
b5762bd381
Merge branch 'master' into discogs_skip_untagged
2022-01-10 18:53:12 -08:00
ybnd
414760282b
Remove footer text from Genius lyrics
2022-01-10 22:09:03 +01:00
ybnd
3f896ab281
Make Tekstowo scraper more specific
2022-01-10 19:03:36 +01:00
J0J0 T
e35c767e2c
Skip Discogs query on insufficiently tagged files
...
- When files are missing both, album and artist tags, the Discogs metadata
plugin sends empty information to the Discogs API which returns arbitrary
query results.
- This patch catches this case and states it in beets import verbose output.
2022-01-10 08:27:18 +01:00
mousecloak
438262844a
Fixed style violation
2022-01-07 21:39:19 -08:00