Commit graph

10964 commits

Author SHA1 Message Date
Stefano Pigozzi
21bf37befa
Use definition lists with the plugins' names
So that they are easier to find when knowing the name of an enabled plugin
2023-01-20 12:36:44 +01:00
Stefano Pigozzi
71ed854d1e
Add sphinx and sphinx_rtd_theme as deps for a new docs extra 2023-01-20 12:11:52 +01:00
Serene-Arc
7f5a28348c Add some typings 2023-01-20 13:20:15 +10:00
ghbrown
2df41b9e16 Limit number of returned track candidates 2023-01-16 18:43:26 -06:00
Adrian Sampson
6c06a18f8b
Merge pull request #4631 from ghbrown/discogs_s_docs
Add Discogs singleton limitation to docs
2023-01-13 17:22:51 -08: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
ghbrown
a6dfd1b40c Writing improvements 2023-01-11 11:40:25 -06:00
ghbrown
8938319075 Add Discogs singleton limitation to docs 2023-01-10 12:25:01 -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
J0J0 Todos
f1794e8709 Support generators in MetadataSourcePlugin.get_artist method 2023-01-03 09:08:31 +01:00
J0J0 Todos
1b0f49fc3b Simplify MetadataSourcePlugin.get_artist method
- Originally a list of "artists" was generated and joined together to a final
  string later.
- This simplifies by concatinating to a final string within the main loop.
- Also this commit gets rid of a mysterious replacement code (` ,' -> ',')
2023-01-03 09:08:21 +01: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
Benedikt
3ddaba4740
Merge pull request #4600 from JOJ0/fromfile_fix
fromfilename: Fix regex ordering and add debug logging
2023-01-02 14:25:38 +01:00
J0J0 Todos
e1d6110249 Changelog for #4515 2023-01-02 13:47:31 +01:00
J0J0 Todos
29ed4abb52 Use join_key arg in Discogs source plugin
Fixes #4401
2023-01-02 13:47:31 +01:00
J0J0 Todos
fddeecb29f Add join_key arg to source plugin get_artist method
Add an optional argument to MetadataSourcePlugin.get_artist method that enables
making use of a field containing a keyword supposed to be used to combine
artists together into a single string like "Feat.", "And", "Vs." and so on.
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 Todos
688ad4aad5 fromfilename: Changelog for #4600 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
Jack Wilsdon
2106f471af Add missing placeholders to extlinks captions
Sphinx 6.0.0 changed extlinks to always require placeholders in link
captions. See 93cf1a57d9
2022-12-31 14:23:34 +00:00
wisp3rwind
a6d74686d8 test: separate case_sensitive unit tests from PathQueryTest
- move tests for case_sensitive to test_util.py, since this is not
  really the concern of PathQueryTest
- removes part of the tests, since the tests that patch os.path.samefile
  and os.path.exists are super brittle since they test the
  implementation rather than the functionality of case_sensitive().
  This is a prepartory step for actually changing the implementation,
  which would otherwise break the tests in a confusing way...
2022-12-24 13:36:53 +01: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
35e167f75e remove old Python: in logging, update comments and support new kwargs
We still need these custom Logger modifications, but the precise
reasoning as given in the comments didn't quite apply anymore.
Also, `stack_info` and `stacklevel` arguments have been added in recent
Python, which we now support.
2022-12-24 13:09:26 +01:00
wisp3rwind
7c2aa02de2 remove old Python: in logging, rm workarounds for broken string conversions 2022-12-24 13:09:26 +01:00
wisp3rwind
9f58673433 drop old Python: update a bunch of comments, removing Python 2 details
These didn't match the code anymore (which had already been changes
manually or automatically as part of the 2->3 transition).
2022-12-24 13:09:26 +01:00
wisp3rwind
c816b2953d drop old Python: remove obsolete exception handling for Windows symlinks
when symlinks aren't supported, recent python will only raise
NotImplementedError (or might even support symlinks), ending up in the
other except arm
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
5cdb0c5c5c drop old Python: rm python 2 leftovers in library.FileOperationError.__str__ 2022-12-24 13:07:48 +01:00
Benedikt
cc7abe3a47
Merge pull request #4591 from wisp3rwind/pr_mypy
Add mypy to tox and CI
2022-12-19 18:08:29 +01:00
Benedikt
3f9dd0acb1
Merge pull request #4586 from wisp3rwind/pr_test_4528
tests: add a (xfailing) test for issue #4528
2022-12-18 09:25:44 +01:00
wisp3rwind
632698680f drop old Python: simplify datetime usage 2022-12-18 09:20:04 +01:00
wisp3rwind
bd09cc90b6 drop Python 3.6: docs, a few safe simplifications 2022-12-18 09:20:04 +01:00
wisp3rwind
f419543f07 docs: remove unused link target, update links to python docs 2022-12-18 09:20:04 +01:00
wisp3rwind
1c7889b0ba tests: add a (failing) test for issue #4528 2022-12-18 09:10:02 +01:00
wisp3rwind
d15c5c4ba2 mypy: ignore_missing_imports = True 2022-12-18 09:09:49 +01:00
wisp3rwind
d604c7e175 add mypy to actions, but allow failure 2022-12-18 09:09:49 +01:00
wisp3rwind
e577838631 add mypy tox environment and dependencies 2022-12-18 09:09:49 +01:00
Benedikt
195ef6c78a
Merge pull request #4593 from wisp3rwind/pr_fix_mediafile_tests
tests: fix assertions for empty MediaFile.images
2022-12-18 08:51:11 +01:00
wisp3rwind
d5f998b312 tests: fix assertions for empty MediaFile.images
used to work due to inconsistent mediafile implementation, but with
https://github.com/beetbox/mediafile/pull/64 (in mediafile >= 0.11.0)
list fields are None if non-existent, not the empty list
2022-12-18 08:41:42 +01:00
Serene-Arc
1950a98da8 Add typing for module 2022-12-16 10:44:31 +10:00
Serene-Arc
5044d13d8d Add typing for module 2022-12-16 10:44:31 +10:00
Serene-Arc
4606ff20ce Add missing typing 2022-12-16 10:44:31 +10:00
Serene-Arc
00c0626e8b Add typing for module 2022-12-16 10:44:31 +10:00
J0J0 Todos
bcc9c93f97 Add docs for #4573 2022-12-06 07:49:36 +01:00