Commit graph

694 commits

Author SHA1 Message Date
Emi Katagiri-Simpson
4a43191c31
BUG: Wrong path edited when running config -e
Previously: ALWAYS edited the default config path
Corrected: When the --config <path> option is used, that path is edited
2025-03-23 15:58:06 -04:00
Šarūnas Nejus
161b0522bb
Update deprecated imports 2024-12-10 06:10:04 +00:00
Šarūnas Nejus
f36bc497c8
Fix lint issues
- Fix imports
- Fix pytest issues
- Do not assign lambda as variable
- Use isinstance instead of type to check type
- Rename ambiguously named variables
- Name custom errors with Error suffix
2024-09-21 11:59:18 +01:00
Šarūnas Nejus
85a17ee503
Reformat the codebase 2024-09-21 11:57:48 +01:00
Konstantin
2a77758ebe make comment consistent 2024-08-27 10:13:45 +00:00
Konstantin
ccda7405b9 Utilize new way of declaring a NamedTuple 2024-08-25 16:26:19 +02:00
Šarūnas Nejus
179405ed82
A couple of small updates in the code 2024-06-05 04:41:02 +01: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
InvisibleFunction
b9ab0c9867 Run black 2024-03-09 14:28:17 -05:00
InvisibleFunction
11932eb732 Fix Media Headers on Import 2024-03-03 10:53:39 -05:00
Serene-Arc
83242fd7cf Apply formatting 2024-03-01 15:21:25 +10:00
Max Goltzsche
177f284d40
expose incremental_skip_later as cli option
Closes #4958
2023-12-05 01:03:22 +01:00
Max Goltzsche
8a3b9acdee
expose import.quiet_fallback as cli option 2023-12-04 22:56:25 +01:00
Serene-Arc
9dd59058fe Fix comparison 2023-11-24 18:15:11 +10:00
Serene-Arc
fc4d7673d3 Revert line change behaviour 2023-11-24 14:27:23 +10: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
J0J0 Todos
fabfde33c6 Fix track length comparision in UI code
Fixes behaviour to what we documented already.
2023-10-14 10:43:12 +02:00
J0J0 Todos
be290e5444 A large code-overhaul of the beets ui:
- Allow user to change UI colors in config file.
 - "Change Representation" class allows Albums and Track
   matches to reuse similar formatting code
 - Functions to split text into lines for printing
 - Tests for the new UI to check wrapping functions
2023-10-14 10:42:48 +02:00
Serene
ff36c7afa7
Merge pull request #4547 from Serene-Arc/configurable_disambig 2023-10-14 16:00:30 +10:00
Serene-Arc
5cab810219 Add dynamic disambiguation strings 2023-09-17 14:28:50 +10:00
Serene-Arc
8ba67674cc Catch when items have no path 2023-09-13 12:00:24 +10:00
Arno Hautala
acff509585 smaller set of fields to update; comments 2023-09-10 22:24:36 -04:00
Arno Hautala
e0424f492c fix update_items 2023-09-10 21:33:19 -04:00
Arno Hautala
3682b27202 linted 2023-09-09 11:14:37 -04:00
Arno Hautala
65aaa96297 test 2023-09-09 11:12:58 -04:00
Arno Hautala
7ff20c5e45 fix exclude-fields argument 2023-09-08 22:41:56 -04:00
Arno Hautala
4beee232cf debug 2023-09-08 22:40:45 -04:00
Arno Hautala
4f7d94257e option for excluding fields from updates 2023-09-08 22:18:42 -04:00
J0J0 Todos
62859f4389
Merge pull request #4823 from JOJ0/album_flex_streamline
Streamline album attributes modification behaviour and allow override via CLI
2023-08-23 09:14:26 +02:00
J0J0 Todos
38f30b2c13 Handle singletons in duplicate verbose prompt 2023-08-23 07:54:26 +02:00
J0J0 Todos
245d777185 Make verbose duplicates prompt configurable 2023-08-23 07:54:26 +02:00
J0J0 Todos
d91a3e0fba Show details in resolve_duplicates prompt 2023-08-23 07:54:26 +02:00
J0J0 Todos
9616afd339 Fixes in docs for #4823
as suggested by @sampsyo.

Co-authored-by: Adrian Sampson <adrian@radbox.org>
2023-08-23 06:36:39 +02:00
J0J0 Todos
3587067c1f Option to override album mods propagation to items
Adds a cli option to the modify command that prevents inheriting `modify -a`
changes to album-tracks.
2023-08-23 06:34:16 +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
J0J0 Todos
a374977953 Append album to singleton disambiguation string
- New config option for the importer 'singleton_album_disambig' lets
  users choose whether they want to display [album names] in the list of
  candidates. Enabled by default but ony applicable if the candidate provides
  an album attribute.
- Add docs describing the new option and which source plugins currently support
  it.
2023-07-21 08:30:37 +02:00
J0J0 Todos
4087e8c790 Simplify singleton importer "Album: " print
conditions.

Co-authored-by: Benedikt <wisp3rwind@posteo.eu>
2023-07-20 09:12:42 +02:00
J0J0 Todos
4272cbec6a Show album information during singleton imports
- If the file being imported has an album tag already, display it.
- If the metadata plugin provides a new album value, preview the change.
2023-07-20 09:12:42 +02:00
J0J0 Todos
106a1638cc Improve singleton disambiguation string
When available, display e.g:
- Track Index as "Index 2"
- Alternative Track name as "Track A2"
2023-07-20 09:12:34 +02:00
wisp3rwind
b58ab909da add missing syspath conversions (3/3, beets) 2023-07-16 10:42:14 +02:00
Adrian Sampson
16a30f4d74
Merge pull request #4714 from TypicalFence/gh-654
resolve transl-tracklisting relations for pseudo releases
2023-06-26 14:40:28 -07:00
wisp3rwind
26faf8daa9 test_ui: Fix spurious warnings in completion test
probably an issue going back to the Python 2 -> 3 switch: `map` gives an
iterator nowadays so after the test case started iterating
BASH_COMPLETION_PATHS, print_completion() couldn't find the
(previously found) bash_completion anymore, and would log a spurious
warning about that.

Also, some cleaup of path type handling
2023-06-24 12:48:00 +02:00
fence
206ed23810 refactor based on review 2023-06-19 19:27:27 +02:00
fence
e992b82bdf resolve transl-tracklisting relations for pseudo releases 2023-06-19 19:27:25 +02:00
root
c59ca0fca1 enforced utf-8 encoding on imported files 2023-03-26 14:13:20 -04: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
Adrian Sampson
fb9e95b324
Fix some long lines 2022-08-20 16:50:20 -07:00
Adrian Sampson
7af40db050
Merge branch 'master' into formatted-modify 2022-08-20 16:37:52 -07:00
Jan Holthuis
cfc34826a2 feat(import): Improve error reporting when reading paths from logfile 2022-06-28 22:12:46 +02:00
Jan Holthuis
6d74ffb833 feat(import): Move logfile import logic to --from-logfile argument
As requested here: https://github.com/beetbox/beets/pull/4387#pullrequestreview-1020040380
2022-06-28 00:17:34 +02:00