Commit graph

5601 commits

Author SHA1 Message Date
Diego Moreda
8d9db9ffe6 info: minor cleanups
* Rename filter() function to avoid warning of reserved built-in symbol.
* Remove mediafile fixture on two tests.
2015-11-24 16:41:56 +01:00
Diego Moreda
1ef407672a info: add item format and length format arguments
* Add custom output formatting via a format string to InfoPlugin. The command
accepts a formatting string via the "-f" parameter, which is handled by its
CommonOptionsParser and applied during print_data().
* Modify the emitters in order to include an Item into the list of fields, that
is formatted according to the format string if specified.
* Add an argument to allow the user to choose if track lengths are displayed as
raw floats or using a human-readable form (mm:ss), defaulting to human-readable
form.
2015-11-24 16:31:01 +01:00
Adrian Sampson
0a719a0152 Fix formatting in logging for #1721 2015-11-22 10:30:20 -08:00
Adrian Sampson
1d0984a294 Slight log rewording 2015-11-21 12:54:50 -08:00
Adrian Sampson
e55b01c2bb Better artresizer error logging
Should help diagnose #1721.
2015-11-21 12:52:19 -08:00
Adrian Sampson
eb68177fee Fix #1735: convert --pretend encoding error 2015-11-21 12:40:45 -08:00
Adrian Sampson
9702011884 Changelog for #1433 2015-11-20 11:28:51 -08:00
Adrian Sampson
6c0f43cf1c Thumbnails: Fix string memory management
Should fix #1433. The problem now was that we were freeing the string memory
that Python expected to be managing in a string object held by the `uri`
variable. Now, we do a silly dance to copy the memory out of the buffer
returned by the library and return that instead.
2015-11-20 11:26:35 -08:00
Adrian Sampson
530b42156b Thumbnails: Declare more interface types
Seems to address a segfault indicated in #1433, but there are still crashes
lurking.
2015-11-20 10:55:25 -08:00
Adrian Sampson
fd2cacbc25 Minor docs refinements for #1728
- Use a marginally more realistic example in the changelog.
- The -- convention is actually not the purview of shells; it's just a de
  facto standard for command-line parsers. Fortunately, argparse supports it
  out of the box.
2015-11-20 10:07:29 -08:00
Adrian Sampson
6cb8db3b2e Merge pull request #1728 from diego-plan9/notquery
Add boolean "not" query operator
2015-11-20 10:00:05 -08:00
Diego Moreda
51bf6a1c9f Add documentation for NotQuery, cleanup
* Add changelog and query.rst documentation entries for the usage of negated
queries.
* Cleanup NotQuery class as suggested during code review (PEP conforming
docstring, clarification on empty clause match behaviour).
2015-11-20 18:06:22 +01:00
Peter Kessen
49a1e3c5d5 Merge pull request #1733 from pkess/fix_encoding
Fixed missing encoding definition in python files
closes #1722
2015-11-19 21:16:40 +01:00
Adrian Sampson
27b5b407c2 Fix #1732 by importing ctypes on demand 2015-11-19 10:10:17 -08:00
Peter Kessen
0e5a1e6b00 added encoding to beet itself 2015-11-19 19:09:11 +01:00
Adrian Sampson
7233173507 Fix some outdated comments 2015-11-19 10:08:37 -08:00
Peter Kessen
f5eca77117 added encoding as comment
last file for encoding check
python3 file without license
2015-11-19 18:54:02 +01:00
Peter Kessen
6b408507f6 added encoding as comment in files
added line like
# -*- coding: utf-8 -*-
to all files without license
2015-11-19 18:52:57 +01:00
Peter Kessen
3eb8008b11 added encoding as comment in files
added line like
# -*- coding: utf-8 -*-
to all files with correct license in header
2015-11-19 18:41:01 +01:00
Diego Moreda
40bfed756b Revise not query syntax, cleanup, modify docstring
* Revise the NotQuery syntax, replacing the '¬' character with '^'. Fix tests
to conform to this change, and cleanup the PARSE_QUERY_PART_REGEX.
* Modify parse_query_part() docstring to mention the negate parameter on the
returned tuple, and added an example.
2015-11-19 18:04:47 +01:00
Diego Moreda
e69b3b3c5d Fix NotQuery assertion by using sets, not lists
* Fix issue with an assertion that was order-sensitive and caused a problem on
some tox runs.
2015-11-18 17:40:47 +01:00
Diego Moreda
e457479558 Add NotQuery syntax tests
* Add tests to NotQueryTest for testing the results of using queries with
negation.
* Fix issue on test_dbcore due to the modifications on the tuple returned by
parse_query_part (the number of elements was changed from 3 to 4).
2015-11-18 17:27:22 +01:00
Diego Moreda
0293504a24 Update negation query syntax, prefix always first
* Update the negation query sintax so that the negation prefix ("-" or "¬") is
always the first part of a query, instead of after the ":" separator.
* Modify queryparse, so that the detection of the negation is done inside
parse_query_part() (using the modified PARSE_QUERY_PART_REGEX, and returning
the negation flag) instead of construct_query_part.
* Revert the prefixes dict on beets.library to the original dict (only one item,
with the RegexpQuery prefix).
2015-11-18 16:59:50 +01:00
Diego Moreda
dd8b80e320 Make NotQuery subclass Query, update tests
* Modify NotQuery so it subclasses Query instead of MutableCollectionQuery.
* Update instances where NotQuery objects are created on tests and queryparse,
as NotQuery expects a single Query as a parameter to the constructor instead of
a list of Queries.
2015-11-18 14:54:20 +01:00
Diego Moreda
f2c8e9ff07 Add "not" query operator, initial draft
* Add support for user friendly "not" operator in queries without requiring to
use regular expressions, via adding NotQuery to beets.dbcore.query.
* Update the prefix list at library.parse_query_parts() and the query parsing
mechanisms in order to create a NotQuery when the prefix is found.
* Add two TestCases, NotQueryMatchTest as the negated version of MatchTest, and
the more generic NotQueryTest for testing the integration of the NotQuery with
the rest of the existing Query subclasses.
2015-11-16 21:36:42 +01:00
Peter Kessen
ecbd337c47 Added file encoding definition to badfiles.py 2015-11-15 14:51:12 +01:00
Adrian Sampson
e39dede8b4 Merge pull request #1720 from Schweinepriester/master
Replace PIL with Pillow
2015-11-15 00:18:27 -08:00
Kai
61e992fd47 Replace PIL with Pillow 2015-11-15 04:25:42 +01: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
9c968456c1 Fix #1666: malformed binary data in SoundCheck 2015-11-13 12:21:36 -08: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
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
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
Manfred Urban
57faf015d9 Adapted va_name in other files 2015-11-08 17:28:55 +01:00
Manfred Urban
95b80b37aa Updated documentation 2015-11-08 17:04:36 +01:00
Manfred Urban
485870f288 Made various artist title configurable 2015-11-08 16:22:36 +01:00
Adrian Sampson
34e6e39fe5 mbsync: Debug logging
Log *something* for each album, so you can tell that it's doing something even
when there are no changes. To help diagnose #1707.
2015-11-07 15:37:13 -08:00
Fabrice Laporte
57cf702668 Update index.rst 2015-11-07 23:18:30 +01:00
Adrian Sampson
80bfd186ae Use should_write for modify, update, and mbsync
This should address the surprising situation in #1697, where `import` went
fine but then `update` unexpectedly changed filenames.
2015-11-07 13:34:47 -08:00
Adrian Sampson
d78ee1cf28 Add a corresponding should_move wrapper 2015-11-07 13:26:21 -08:00
Adrian Sampson
9f7aa866bd Use ui.should_write everywhere
There sure are a lot of plugins that want to write metadata!
2015-11-07 13:20:09 -08:00
Adrian Sampson
5b761f029e A new should_write configuration wrapper
The idea is that it is so common to check whether we need to write tags (or
move files), and we're constantly re-implementing the same logic everywhere.
It's not even the prettiest logic, as it commingles the importer settings with
general settings. So it's important that we encapsulate the decision so we can
make it better in the future.
2015-11-07 13:14:33 -08:00
Adrian Sampson
cb6edb46ef Use ` instead of * for plugin event names 2015-11-07 12:12:48 -08:00
Adrian Sampson
4e20ddcef9 Doc refinements for #1499 2015-11-07 12:11:05 -08:00