Commit Graph
5642 Commits
Author SHA1 Message Date
Adrian Sampson 4db91c8bd2 Fix a too-long line 2015-11-16 13:03:50 -08:00
Adrian Sampson f767f1c2a3 New confirmation prompt
We now ask for a trinary edit/apply/cancel confirmation *after* showing the
updates. This lets you decide whether you're done based on a "preview" of the
changes and keep editing if they don't look right.
2015-11-16 13:01:24 -08:00
Adrian Sampson d87a747477 Condense edit plugin documentation
Also avoided adding some unused command-line options.
2015-11-16 12:43:59 -08:00
Adrian Sampson c679e3f307 Merge branch 'editor' of github.com:sampsyo/beets into editor 2015-11-16 12:28:35 -08:00
Adrian Sampson feabf1a6ef Offer a chance to fix YAML parse errors
An alternative to 749ef85638 by @jmwatte.
2015-11-16 12:27:32 -08:00
jmwatte bb39cd509d cleaned up edit.rst 2015-11-16 10:37:38 -08:00
Adrian Sampson 52c2b3f479 Merge pull request #1727 from diego-plan9/editor
Editor: update extra fields test, save only dirty items
2015-11-16 10:32:45 -08:00
Diego Moreda 917628340e edit: save only items with changes
* Modify save_write() so only the items that do have pending changes (ie. dirty
items) are saved to the database.
2015-11-16 14:48:05 +01:00
Diego Moreda e31680123b edit: update extra fields in yaml test
* Update test for extra fields in edited yaml, allowing the user to add fields
while editing. Rename the test to test_single_edit_add_field to reflect its
purpose more accurately.
2015-11-16 14:46:13 +01:00
Diego Moreda 2adf70209f edit: add test for extra fields on user yaml
* Add test_invalid_yaml_extra_field, testing the handling of user appended
fields (in particular, a non existing field) during the yaml editing.
2015-11-15 18:36:24 +01:00
Diego Moreda 5f2e5d73cc edit: update unit tests
* Update unit tests in order to reflect the changes on the last refactor of
edit.py (patch edit.edit instead of EditPlugin.get_editor, revise stdin strings
to match current version, remove TODO on docstrings from malformed and invalid
yaml tests).
2015-11-15 18:09:20 +01:00
Adrian Sampson cfba04bc9d Don't ask for confirmation if nothing changed 2015-11-14 14:58:53 -08:00
Adrian Sampson 80facbab6f More robust forbidden-change detection 2015-11-14 14:57:32 -08:00
Adrian Sampson 1c44969255 Simplify interfaces and add docs 2015-11-14 14:50:24 -08:00
Adrian Sampson eb1bb132b1 Simplify metadata application 2015-11-14 14:48:10 -08:00
Adrian Sampson 58205e1bef Simplify data filtering 2015-11-14 14:33:04 -08:00
Adrian Sampson 029915814b Abort if nothing changed 2015-11-14 14:28:00 -08:00
Adrian Sampson 5096653483 Simpler serialization
Just use a dictionary instead of a list of tiny one-key dictionaries. Still
need to update the deserialization.
2015-11-14 14:23:57 -08:00
Adrian Sampson 9848b51008 Simplify field selection 2015-11-14 14:19:09 -08:00
Adrian Sampson 105cd73906 Start expunging opts carry-through
A dedicated command function takes care of the options and turns them into
normal variables.
2015-11-14 14:05:40 -08:00
Adrian Sampson 3c01c49a2c Less chatty interface
Removed three prompts:
1. The "really edit?" prompt. If you don't want to edit, you can just not make
   any changes.
2. The "done?" loop. This seems unnecessary; we'll confirm afterward anyway.
3. The YAML checker. This removal could indeed make things inconvenient, since
   your changes get thrown away if you make a YAML mistake. For the moment,
   simplicity is taking priority.
2015-11-14 13:53:25 -08:00
Adrian Sampson ce31c2df23 Remove some dead code and hoist utility functions 2015-11-14 13:43:58 -08:00
Adrian Sampson f27c486389 Remove separator and not_fields from docs
The `separator` option has already been removed. `not_fields` is an internal
detail and doesn't need to be documented (yet).
2015-11-14 13:39:30 -08:00
Adrian Sampson de6813eab5 Remove vestigial editor config option
We now just use $EDITOR.
2015-11-14 13:38:41 -08:00
Adrian Sampson b33a024549 Simplify write logic 2015-11-14 13:37:17 -08:00
Adrian Sampson b593d01100 Use qualified names for ui utilities 2015-11-14 13:33:02 -08:00
Adrian Sampson 2d8350ef03 Use standard machinery for opening editor 2015-11-14 13:31:42 -08:00
Adrian Sampson 72b26235ad Merge branch 'master' into editor 2015-11-14 13:28:04 -08:00
Adrian Sampson e3f7da5467 Update test for simpler interactive_open 2015-11-14 13:26:04 -08:00
Adrian Sampson 3a5dd47e3a Factor out shlex.split workaround 2015-11-14 13:23:51 -08:00
Adrian Sampson d5b7ce64da Move EDITOR discovery to a util function 2015-11-14 13:23:51 -08:00
Adrian Sampson e235cb7c42 Remove vestiges of diff_method option 2015-11-14 12:56:53 -08:00
Adrian Sampson d7d609442e Remove diff_method option
Our built-in "diff"-like functionality is pretty good because it's aware of
beets' data structures and types. This makes it more legible, in my opinion,
than an ordinary textual diff. So for now, I'm making this the only option (in
the spirit of making the plugin as straightforward as humanly possible).
2015-11-14 12:53:45 -08:00
Adrian Sampson 71e1547291 Remove some communication through fields
This is the first of many changes to reduce the use of `self.x` where plain
parameter passing can make things more clear.
2015-11-14 12:50:53 -08:00
Adrian Sampson 54b61ee2d4 Merge pull request #1717 from jmwatte/editor
change opts.extra to type choice
2015-11-13 13:20:58 -08:00
Adrian Sampson 9c968456c1 Fix #1666: malformed binary data in SoundCheck 2015-11-13 12:21:36 -08:00
jmwatte 5eca75321e simplify by removing sum-option and renaming for clarity 2015-11-13 17:56:03 +01:00
jmwatte 024ab0159b remove webbrowser for opening default editor/browser 2015-11-13 15:03:27 +01:00
jmwatte 386578d69c change opts.extra to type choice 2015-11-13 11:24:19 +01:00
Diego Moreda d9ebb3409a edit: add album query tests, revise failing ones
* Add tests for executing the command with album queries (-a), testing the edit
of album and albumartist fields.
* Revise invalid and malformed yaml tests so they return a failure instead of
an error.
2015-11-11 15:50:32 +01:00
xsteadfastx 2048aa660b Merge pull request #1714 from xsteadfastx/master
Added embyupdate plugin
2015-11-11 08:58:10 +01:00
Marvin Steadfast 17dcc7ab21 Fixed two typos in the embyupdate docs 2015-11-11 08:54:58 +01:00
Diego Moreda 6e6aa9700d edit: more assertions on existing tests, new tests
* Modify existing tests in order to explicitely check for differences (or lack
of) in the items fields, with the intention to ensure that no unintended changes
slip through.
* Added tests for modifying a single item from a list of items, and for editing
the album field of the items (stub for discussing whether the actual album
should be updated, etc).
2015-11-10 19:16:04 +01:00
Marvin Steadfast 4b2b9fe2ce Added embyupdate plugin
Its a simple plugin that triggers a library refresh after the library
got changed. It does the same thing like the plexupdate plugin.
2015-11-10 10:15:01 +01:00
Adrian Sampson 48637f22e9 smartplaylist: Handle exceptional cases in setup 2015-11-09 21:52:10 -08:00
Adrian Sampson 66a22dffd9 Merge pull request #1711 from diego-plan9/editor
editor: add unit tests, minor changes
2015-11-09 17:11:04 -08:00
Diego Moreda 41b4987990 edit: add initial black-box tests
* Add tests for the edit plugin, including a helper for bypassing the manual
yaml editing. Tests are focused on "black-box" functionality, running the
command and making assertions on the changes made to the library.
2015-11-09 21:51:14 +01:00
Adrian Sampson 98f48237f5 Tiny docs tweaks for #1708 2015-11-08 13:04:26 -08:00
Adrian Sampson 9165b7cf45 Trailing comma (#1708) 2015-11-08 13:02:07 -08:00
Adrian Sampson 5bf344e149 Merge pull request #1708 from m-urban/config_va_name
Made various artist title configurable
2015-11-08 13:00:51 -08:00