Commit graph

7983 commits

Author SHA1 Message Date
Adrian Sampson
63f50287d5 Rename some choice-related variables
These are no longer "extra"---they're *all* the choices that will be used.
2016-12-28 14:54:25 -05:00
Adrian Sampson
c98972894a Better prompt order 2016-12-28 14:49:26 -05:00
Adrian Sampson
f5e4853bb3 Move as-is and skip choices to declarative choices
That's all the standard choices that don't depend on which prompt you're
looking at! Woohoo!
2016-12-28 14:46:33 -05:00
Adrian Sampson
1e8be0a19f Use declarative style for ALBUMS/TRACKS choices
This unifies the set of choices that are shown at each prompt variant in
`choose_candidate`, making its code much shorter. Declarative programming FTW.
2016-12-28 14:40:06 -05:00
Adrian Sampson
9dff841afe Fix class anme of PromptChoice 2016-12-28 14:33:55 -05:00
Adrian Sampson
8763be5423 Revert "Fix tests for new prompt order"
This reverts commit a357cc4e1a.

We no longer need the tests to change---I was able to fix the order by
bringing the "abort" action into the standard list of options.
2016-12-28 14:33:11 -05:00
Adrian Sampson
e5a12615e4 Subsume abort action into declarative style 2016-12-28 14:32:41 -05:00
Adrian Sampson
a357cc4e1a Fix tests for new prompt order 2016-12-28 14:23:22 -05:00
Adrian Sampson
3ede874e96 Changelog note about new prompt interface 2016-12-28 14:18:27 -05:00
Adrian Sampson
6afe407f45 Remove one last duplicated set of prompts 2016-12-28 14:16:33 -05:00
Adrian Sampson
8937eec50a Refactor built-in stnadard choices 2016-12-28 14:15:40 -05:00
Adrian Sampson
2f6538aee2 Refactor search options to ordinary choices
`PromptChoice`s can now return `Proposal` values, which makes these two
options just "normal" actions that could be provided by plugins.
2016-12-28 14:08:09 -05:00
Adrian Sampson
6c825970ac Tolerate missing AlbumInfo.mediums field 2016-12-28 13:54:04 -05:00
Adrian Sampson
7c6eafa285 Refactor manual search options to use Proposal
This is the first step to making them behave like plugin actions.
2016-12-28 13:50:53 -05:00
Adrian Sampson
a414872430 Fix a missing parameter (#2349) 2016-12-28 13:36:19 -05:00
Adrian Sampson
22610b7684 Refactor extra choice return value
The `choose_candidate` function now returns the `PromptChoice` object instead
of a short letter that selects the `PromptChoice`.
2016-12-28 13:34:27 -05:00
Adrian Sampson
3578f0d429 Introduce a new Proposal type for tag results
tag_album and tag_item now return a Proposal. The idea is that plugin actions
should also be able to return Proposal values, just like the built-in actions.
2016-12-28 13:21:55 -05:00
Adrian Sampson
9b0a867c73 Expand some comments in choose_match 2016-12-28 12:40:33 -05:00
Adrian Sampson
d447d3e655 Changelog note for #2349 (fix #2347) 2016-12-28 12:06:29 -05:00
Adrian Sampson
8a62087376 Documentation tweaks for #2349 2016-12-28 12:03:57 -05:00
Adrian Sampson
2a3f3d9bfa acousticbrainz: Make some strings into comments
When not in the docstring position, it's better to use "real" comments instead
of string literals.
2016-12-28 12:01:08 -05:00
Adrian Sampson
c27879edbc Slight code formatting tweaks for #2349 2016-12-28 11:59:14 -05:00
Adrian Sampson
9db79835d6 Merge pull request #2349 from SusannaMaria/#2347
#2347: First hack of ignoring already tagged items
2016-12-28 11:55:21 -05:00
Susanna Maria Hepp
7e1e31bddd E128: continuation line under-indented for visual indent? 2016-12-28 15:30:57 +01:00
Susanna Maria Hepp
165f2e189e Repair findings from Travis CI 2016-12-28 15:11:03 +01:00
Susanna Maria Hepp
8be0a271b5 Add documentation for the force-option 2016-12-27 22:11:27 +01:00
Susanna Maria Hepp
00371de0bb Changes suggested by @sampsyo 2016-12-27 21:56:39 +01:00
Susanna Maria Hepp
c632949b64 Changes suggested by @Kraymer 2016-12-27 21:48:06 +01:00
nath@home
8e29a3ffcb Zero: Last minute unimportant fixes:
*Remove the artifact of a debug log.
*Remove meaningless version number.
*Rephrase some docstrings.
*Remove tautological comments.
2016-12-27 19:13:29 +01:00
Adrian Sampson
a4e2538324 Merge pull request #2348 from benpetty/patch-1
typo in docs
2016-12-27 08:41:21 -05:00
Susanna Maria Hepp
bbaad2f17d Introduce force option in acousticbrainz 2016-12-27 13:22:16 +01:00
Ben Petty
767798ca07 typo in docs 2016-12-26 20:27:35 -08:00
Susanna Maria Hepp
f93ee3accc First hack of ignoring already tagged items 2016-12-26 23:54:24 +01:00
Adrian Sampson
8408264142 Update test file for new set of tags
The new MediaFile tags in #2333 mean that the `test_unicode_path` test will
write new tags to this test fixture file.
2016-12-26 17:41:44 -05:00
Adrian Sampson
a9fd3df681 Docs fixes for #2329 2016-12-26 17:33:23 -05:00
Adrian Sampson
a92323945e Merge pull request #2329 from SJoshBrown/master
Add manually triggered mode for zero plugin
2016-12-26 17:29:17 -05:00
Adrian Sampson
641e62f2e0 Vastly simplify main random function
This is the payoff from the earlier refactorings: the control flow is now
consistent and clear, and the two factors (time vs. number, equal-chance or
not) are orthogonal. See also #2322.
2016-12-26 17:04:21 -05:00
Adrian Sampson
33eb4ff91b Refactor time-based selection (#2322) 2016-12-26 17:01:02 -05:00
inytar
d0dd0b2a05 Add absubmit plugins dependencies to the extras_require field 2016-12-26 16:51:14 -05:00
inytar
90ea8425cf Add documentation for the absubmit plugin 2016-12-26 16:50:51 -05:00
Adrian Sampson
d053f98e81 random: Refactor equal chance logic 2016-12-26 16:43:47 -05:00
Adrian Sampson
5bbf16c2b1 Refactor length calculation (#2322)
Also, avoid setting an unnecessary field on the album objects. :/
2016-12-26 16:32:03 -05:00
Adrian Sampson
4c2457d6ce Refactor random plugin a bit
Separate the callback function from the random selection logic.
2016-12-26 16:27:31 -05:00
inytar
146516704f Update comments for clarification 2016-12-26 16:11:48 -05:00
Adrian Sampson
3a650a151e Docs fixes for #2322 2016-12-26 16:10:46 -05:00
Adrian Sampson
c86b309762 Changelog for #2322 (fix #2305) 2016-12-26 16:09:43 -05:00
Adrian Sampson
9adfcbddd1 Merge pull request #2322 from diomekes/random-timelimit
random: add --time option, update docs
2016-12-26 16:08:14 -05:00
inytar
b86187089b Update errors and logging of ABSubmit plugin
A UserError is now raised if the plugin can be started.
If an item fails to be analyzed or be submited an error is logged and
the next item is tried.
2016-12-26 16:05:10 -05:00
Josh Brown
b6577b4226 refactor long line for PEP8 2016-12-26 14:42:10 -06:00
Josh Brown
431ec5ee7a Merge remote-tracking branch 'origin/master' 2016-12-26 14:21:19 -06:00