{"action":"created","issue":{"url":"https://api.github.com/repos/sampsyo/beets/issues/1706","labels_url":"https://api.github.com/repos/sampsyo/beets/issues/1706/labels{/name}","comments_url":"https://api.github.com/repos/sampsyo/beets/issues/1706/comments","events_url":"https://api.github.com/repos/sampsyo/beets/issues/1706/events","html_url":"https://github.com/sampsyo/beets/pull/1706","id":115689886,"number":1706,"title":"Edit plugin","user":{"login":"sampsyo","id":188033,"avatar_url":"https://avatars.githubusercontent.com/u/188033?v=3","gravatar_id":"","url":"https://api.github.com/users/sampsyo","html_url":"https://github.com/sampsyo","followers_url":"https://api.github.com/users/sampsyo/followers","following_url":"https://api.github.com/users/sampsyo/following{/other_user}","gists_url":"https://api.github.com/users/sampsyo/gists{/gist_id}","starred_url":"https://api.github.com/users/sampsyo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sampsyo/subscriptions","organizations_url":"https://api.github.com/users/sampsyo/orgs","repos_url":"https://api.github.com/users/sampsyo/repos","events_url":"https://api.github.com/users/sampsyo/events{/privacy}","received_events_url":"https://api.github.com/users/sampsyo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-11-07T20:24:33Z","updated_at":"2015-11-15T18:02:55Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sampsyo/beets/pulls/1706","html_url":"https://github.com/sampsyo/beets/pull/1706","diff_url":"https://github.com/sampsyo/beets/pull/1706.diff","patch_url":"https://github.com/sampsyo/beets/pull/1706.patch"},"body":"Successor to #1687. This is @jmwatte's interactive editor plugin."},"comment":{"url":"https://api.github.com/repos/sampsyo/beets/issues/comments/156840165","html_url":"https://github.com/sampsyo/beets/pull/1706#issuecomment-156840165","issue_url":"https://api.github.com/repos/sampsyo/beets/issues/1706","id":156840165,"user":{"login":"diego-plan9","id":418311,"avatar_url":"https://avatars.githubusercontent.com/u/418311?v=3","gravatar_id":"","url":"https://api.github.com/users/diego-plan9","html_url":"https://github.com/diego-plan9","followers_url":"https://api.github.com/users/diego-plan9/followers","following_url":"https://api.github.com/users/diego-plan9/following{/other_user}","gists_url":"https://api.github.com/users/diego-plan9/gists{/gist_id}","starred_url":"https://api.github.com/users/diego-plan9/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diego-plan9/subscriptions","organizations_url":"https://api.github.com/users/diego-plan9/orgs","repos_url":"https://api.github.com/users/diego-plan9/repos","events_url":"https://api.github.com/users/diego-plan9/events{/privacy}","received_events_url":"https://api.github.com/users/diego-plan9/received_events","type":"User","site_admin":false},"created_at":"2015-11-15T18:02:54Z","updated_at":"2015-11-15T18:02:54Z","body":"Revised the tests, and added an extra one for testing the addition of extra fields by the user during the yaml editing. Some thoughts, as a couple of tests are failing/resulting in an error:\r\n\r\n* `test_single_title_edit_apply` is failing due to the assertion on the number of calls to `Item.write()` (it expects 1 call to `write()`, and recording 10). It seems that if a change is detected in the yaml (even if only a single item is affected), **all** items have their `.write()` method called during `EditPlugin.save_write()`.\r\nIt does not look too harmful, but I'm wondering if this behaviour is expected?\r\n\r\n* The new test (`test_invalid_yaml_extra_field`, which tries to mimic the user adding random fields to the yaml) results in an error, as the plugin marks it as a valid change during `EditPlugin.save_write()` and tries to act accordingly:\r\n```\r\nthe artist - älbum - tïtle 0\r\n  foo: bar\r\nApply changes? (y/n) \r\n```\r\nPerhaps it would be a good idea to explicitly compare the keys on the edited yaml fields with the original items during `apply_data()`, and abort if they differ, in order to catch this?\r\n\r\n*  A minor presentational issue on the generated yaml: would it be desirable to use an `OrderedDict` (combined with the `Dumper` from `confit`) for the yaml items in the hopes of preserving the field order specified by the user on `config.itemfields`?"}}