Diego M. Rodriguez
3f36f67940
discogs: tweak pruning of empty candidate albums
2016-12-30 11:39:19 +01:00
Diego M. Rodriguez
37cb1c295f
Merge remote-tracking branch 'upstream/master' into discogs-relax-assumptions
...
Conflicts:
docs/changelog.rst
test/test_discogs.py
2016-12-30 10:42:50 +01:00
Diego M. Rodriguez
5f83f8db1f
Merge remote-tracking branch 'upstream/master' into discogs-subtrack-handling
...
Conflicts:
docs/changelog.rst
2016-12-30 10:20:58 +01:00
Diego M. Rodriguez
072e6de3ae
discogs: add changelog for #2318 , fix typo
2016-12-30 10:17:53 +01:00
Adrian Sampson
1e215aedef
Merge branch 'master' of github.com:beetbox/beets
2016-12-29 13:31:00 -05:00
Adrian Sampson
ac41b6d6e5
Fix #2339 : scrub resets art type
...
We now use the richer `images` field instead of the more basic `art` field.
2016-12-29 13:30:17 -05:00
Diego M. Rodriguez
0a9cb1fd3d
discogs: revise subtrack merging based on subindex
...
Modify the coalescing of subtracks by taking into account the subindices
of the subtracks for deciding if they represent "logical" tracks
(merging them into one single track, as previously) or if they represent
physical tracks (treating them as individual tracks).
Add unit tests for nested logical/physical subtracks, and disc titles.
2016-12-29 18:03:54 +01:00
Diego M. Rodriguez
4364757fcc
Merge remote-tracking branch 'upstream/master' into discogs-relax-assumptions
...
Conflicts:
docs/changelog.rst
2016-12-29 13:27:06 +01:00
Diego M. Rodriguez
30f238151e
discogs: additional sanity checks parsing release
...
Add extra checks for the presence of specific field (artists, title,
id, tracklist) when parsing a Release from discogs, failing gracefully
if the fields could not be found.
Add a test for releases without required fields.
2016-12-29 13:19:01 +01:00
dopefishh
8bb703619f
use util.py3_path for web attachment filenames ( #2353 )
...
Web attachment filenames must be passed as a string for Python 3
2016-12-29 05:38:27 -05:00
Adrian Sampson
413666a825
Fix #2351 : crash in scrub on MediaFile errors
2016-12-28 16:36:51 -05:00
Diego M. Rodriguez
02666424d4
discogs: improve robustness when parsing an album
...
Improve the robustness of `get_album_info()` by preferring the use of
`get()` over accesing the dictionary keys directly for several fields,
plus adding extra checks for fields that depend on nested containers on
the Release data.
Add a test for parsing a release that contains a minimal amount of
fields.
2016-12-28 21:07:18 +01:00
Adrian Sampson
a414872430
Fix a missing parameter ( #2349 )
2016-12-28 13:36:19 -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
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
Susanna Maria Hepp
bbaad2f17d
Introduce force option in acousticbrainz
2016-12-27 13:22:16 +01:00
Susanna Maria Hepp
f93ee3accc
First hack of ignoring already tagged items
2016-12-26 23:54:24 +01: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
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
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
7833469261
add confirmation for empty query
2016-12-26 14:13:01 -06:00
Josh Brown
2903925e2f
Rewrite zero plugin manual mode
2016-12-26 13:34:34 -06:00
nathdwek@laptop
96d331ace0
Zero: cleanup plugin
2016-12-24 19:13:10 +01:00
inytar
f61aa7a016
Move extractor sha calculation to pluging init.
2016-12-23 17:48:29 -05:00
inytar
fd3ff917d2
Implement the basic AcousticBrainz Submit plugin
2016-12-23 17:27:46 -05:00
Adrian Sampson
a063336446
Fix #2332 : Unicode trouble in bpd
2016-12-20 15:16:46 -05:00
diomekes
1bc5456986
random: make --album work with --time
2016-12-17 17:24:58 -05:00
Kier Davis
eb85ff422b
convert plugin: fix braces in filenames causing tracebacks in "pretend" mode
...
Previously "pretend" mode (a.k.a. dry run mode) passed the command to be
printed directly to _log.info, whose first argument is technically a
format string. Thus the command string was parsed for replacement fields, such
as '{foo}', which could cause the format evaluation to fail if the filenames
contained in the command contained valid (or partially valid) replacement fields.
This fix simply inserts an argument '{0}' to the call to _log.info, which is a
format string that simply evaluates to the second argument to _log.info (the
command string). By doing this, the command string is not parsed for replacement
fields.
2016-12-16 00:21:35 +00:00
diomekes
fc8411f3b8
random: add --time option, update docs
2016-12-15 16:15:38 -05:00
tigranl
dd115b1310
Add ui import
2016-12-11 00:35:51 +03:00
tigranl
5ca664e4aa
Fix typos
2016-12-11 00:25:37 +03:00
tigranl
471f875dc1
Fix typo
2016-12-10 21:26:51 +03:00
tigranl
68b4a03ecd
Add tests for https
2016-12-10 19:54:44 +03:00
Johnny Robeson
bca6d2af01
Remove requests/urllib3 logging override in discogs
...
Discog plugin overrides the global logging for `requests` for a reason
that seems no longer valid.
I can't seem to reproduce the logging behavior mentioned in the
preceding comment, so I'm removing it.
If we do want to modify `requests` logging in the future, then we should
hook it into beets verbose logging.
2016-12-09 00:52:24 -05:00
tigranl
b65a7da8e2
Add SNI_SUPPORTED
2016-12-08 19:20:18 +03:00
tigranl
21208b8c39
Add SNI_SUPPORTED
2016-12-08 19:09:15 +03:00
tigranl
efa90416a0
Add SNI_SUPPORTED
...
Add SNI_SUPPORTED
2016-12-06 19:51:15 +03:00
tigranl
d065b33a81
Add SNI_SUPPORTED variable for https check
2016-12-06 18:42:01 +03:00
tigranl
73a7a4ff67
Add SNI_SUPPORTED variable for https check
2016-12-06 18:38:26 +03:00
tigranl
0fb19cfa10
Merge branch 'master' of github.com:beetbox/beets into https_fix
2016-12-06 16:20:54 +03:00
tigranl
6ba5099034
Python version check for lyrics.py
2016-12-06 16:17:25 +03:00
Adrian Sampson
991c9936fd
Fix #2299 : non-Unicode logging in badfiles
2016-12-03 11:20:06 -05:00
anshuman73
430369062b
Fixed a small typo
2016-11-29 00:28:38 +05:30
nath@home
147ced9eaa
acousticbrainz: latest adjustments
...
* Readability and consistency
* Better logging: warn by default for attributes that were not found,
but don't drown user with info when everything is going well.
2016-11-20 22:45:07 +01:00
nathdwek@laptop
eb1ea6177d
acousticbrainz: drop DefaultList, be explicitly careful
...
* I don't see DefaultList be really helpful in many other cases, so having
a beets.util.collections module (which could also conflict with the collections
module from standard library) with only that in it is a little silly.
* It was elegant and concise, but there are implementation issues: it is not
recommended to subclass builtin types, but the alternatives differ between python
2 and 3 (subclass sequence or container or collections.abc?), moreover,
interpreters can differ in the way they map syntaxic sugar to magic functions.
* Also, slicing and negative indexing could do weird things, so the class wouldn't
be really intuitive and simple at the same time
2016-11-20 22:03:41 +01:00
nathdwek@laptop
1d972b9907
acousticbrainz: rewrite _map_dict_to_scheme:
...
* Less lazy names
* Separate root function from childs more naturally
* Actually use defaultdict
2016-11-20 22:03:41 +01:00
nathdwek@laptop
324c67191d
acousticbrainz: log fetched attributes and values as info
2016-11-20 22:03:41 +01:00
nathdwek@laptop
3979619f9f
acousticbrainz: remove redundant comments
2016-11-20 22:03:41 +01:00
nath@home
7a676400dc
acousticbrainz: Refactor the json handling part
2016-11-20 22:03:41 +01:00
nath@home
1963b52903
acousticbrainz: Initial cleanup
2016-11-20 22:03:41 +01:00
Adrian Sampson
62e9a15f4d
Fix a copy n' paste error found by flake8
2016-11-16 12:03:07 -05:00
nath@home
2e78628507
convert: Don't ask for confirmation if query result is empty
2016-11-13 17:46:29 +01:00
nath@home
d53b677e0f
convert: initial cleanup of convert_func
...
Get cli options and configuration in a more readable, uniform way
2016-11-13 00:20:01 +01:00
michaelbub
0a88338f8b
obey style guide
2016-11-11 16:23:32 +01:00
michaelbub
0bdc621d99
sanitizing playlist name AFTER values have been filled in and updated test accordingly
2016-11-11 15:21:34 +01:00
michaelbub
5942adba01
fixed/updated test to consider sanitized playlist names
2016-11-11 10:07:25 +01:00
michaelbub
3e53d4caff
sanitize playlist names
...
Make e. g.
- name: $albumartist/$year-$album.m3u'
work when album data includes non fs-friendly characters
2016-11-10 13:05:18 +01:00
root
f37df2dbd4
Whitespace for flake8.
2016-11-08 16:56:13 -08:00
root
acd5c6404f
missing plugin, modify "missing" attribute by modifying album_types,
...
making it of type INTEGER. also changelog for above.
2016-11-08 16:23:57 -08:00
nathdwek@laptop
a0877dc092
images: Make sure all jpegs work everywhere
...
Apply #1545 to a public function used everywhere
2016-11-08 18:48:44 +01:00
Max Ammann
7242c5ed03
Revert "Expose the relative path to the library instead of omitting the 'path' variable"
...
This reverts commit 5e8ac9e4a5 , because of
a slowdown. Resolves #2182 .
2016-10-26 23:08:44 +02:00
kooimens
373cf19f8b
Fix discogs disc field is set to zero
...
Fixes #587 . The disc field is only zero when there is only one medium, so I think this will do the trick. I wasn't able to reproduce the real problem within the code. This is just a small workaround.
2016-10-17 19:51:03 +02:00
Diego Moreda
1f4bef9e61
discogs: docstring style fix
2016-10-10 20:30:21 +02:00
Diego Moreda
f4907ca5d0
discogs: handle nested subtracks, add try block
...
Modify coalesce_tracks() in order to handle the case where subtracks
are defined inside an index track (as `sub_tracks` attribute),
reorganizing the if logic to avoid duplicated code.
Add a try..catch block enclosing the call to clean_tracklist, as a
measure for avoiding side effects (and reverting to just parsing the
raw_list if there are any problems).
2016-10-10 19:59:42 +02:00
Diego Moreda
fb398c5f2c
discogs: add medium_total to tracks ( #415 )
2016-10-10 17:46:41 +02:00
Diego Moreda
1148acaaf1
discogs: revise position regexp, add tests, tox
...
Revise the regular expression used for extracting information from a
discogs position, making the subtrack_index only be matched if one of
the other groups is matched as well. Split the definition into several
lines in order to try to document it a bit more clearly.
Add unit tests for position parsing and non standard positions.
Fix the underscore on tox dependency.
2016-10-10 17:42:27 +02:00
Diego Moreda
e7f2a111e4
discogs: add test dependencies, fix spelling
2016-10-09 17:57:36 +02:00
Diego Moreda
be223d966e
discogs: coalesce subtracks ( #1543 )
...
Detect subtracks and merge them into a single track, taking into account
the index tracks if present. This includes a revision of the regular
expression used for converting a discogs "position" into medium, medium
index and subtrack index pieces, following the standard discogs
positions (12.2.9).
2016-10-07 19:09:09 +02:00
Diego Moreda
c55885c9e8
discogs: take into account two-sided media ( #1762 )
...
Revise the discogs plugin so two-sided mediums are taking into account
and each pair of consecutive *sides* is treated as single *medium*.
2016-10-07 19:01:50 +02:00
Diego Moreda
911117ef49
discogs: set media on tracks ( #1921 )
...
Set the media for all the tracks when fetching a release using discogs,
as autotag.apply_metadata requires it in order to work properly.
2016-10-06 19:49:43 +02:00
Adrian Sampson
4ae02e0d27
Merge pull request #2211 from heylookltsme/better-genre
...
Proposal: Add specificity option to lastgenre plugin
2016-09-27 09:07:39 -04:00
Corinne Hoener
a7e3bf2d0b
third time's a charm
2016-09-27 06:21:51 -04:00
Corinne Hoener
1c9202cc86
moar indents!
2016-09-26 21:21:15 -04:00
Corinne Hoener
c10fe1e126
change option name to prefer_specific
2016-09-26 19:06:34 -04:00
Corinne Hoener
be5ce3194f
better syntax; better comments
2016-09-26 19:02:10 -04:00
Corinne Hoener
288ff6ba19
Add specificity option to lastgenre in order to prefer the most specific genres
2016-09-26 16:13:04 -04:00
Fabrice Laporte
0140f2f287
Merge pull request #2206 from Kraymer/issue2205
...
Issue2205: search for lyrics using part of song title preceding ':'
2016-09-25 21:24:56 +02:00
Fabrice Laporte
7226624405
replace strip_part() by generate_alternatives()
...
Delegate the update of titles and artists lists to the helper
generate_alternatives() function.
2016-09-25 19:37:14 +02:00
Fabrice Laporte
e2703b9a7c
always yield item artist and title first
...
Rather than using an unordered set for storing pairs, append to a list
and build an OrderedDict from it to filter duplicated strings while
keeping order.
2016-09-25 15:46:22 +02:00
Johnny Robeson
3db656a685
use py3_path on gstreamer location prop setters
...
Location properties require strings, so we give them to them!
2016-09-24 01:16:56 -04:00
Fabrice Laporte
8b4f39da42
lyrics: search for song title part preceding colon. fix #2205
2016-09-23 22:23:32 +02:00
Fabrice Laporte
4b702b338e
lyrics: reduce code duplication in search_pairs()
2016-09-23 22:21:00 +02:00
Johnny Robeson
6b73aa25d2
Use b'' in discogs medium query regex
...
Since the first arg to `re.sub()` is bytes, thus must be the
replacement string.
2016-09-20 17:38:39 -04:00
Johnny Robeson
db782a2404
wrap 2 results in a list in cue and random plugin
2016-09-14 00:40:53 -04:00
Cody W. Opel
d384b07914
fromfilename: fix dict view conversion for python3 ( fix #2195 )
...
dict.values() returns a view rather than a list in python3
2016-09-12 09:29:32 -04:00
Adrian Sampson
d00c0fb5cf
Replace varargs_callback in duplicates
...
Now you just use `-k KEY1 -k KEY2`, which seems more natural to me anyway.
2016-09-10 05:13:06 -04:00
Adrian Sampson
f8a8388e0c
Avoid using None when format is unspecified
2016-09-07 21:47:31 -04:00
Adrian Sampson
15a5512ea5
Require Unicode format strings
...
Fallout from #2188 . Following @jrobeson's suggestion, I just turned the check
in LibModel.__format__ into an assert. This turned up a few badly-behaved
clients, which are also fixed.
2016-09-07 21:42:59 -04:00
Adrian Sampson
ed8d04f594
Unicode templates in duplicates ( fix #2188 )
2016-09-07 21:04:05 -04:00
Johnny Robeson
7a2bdf502f
s/utf8/utf-8/ in all encoding/decoding contexts
...
This matches up with the python documentation.
2016-09-06 23:10:24 -04:00
nathdwek@laptop
3acd44260a
Apply #2175 to mpdstats to keep consistency
2016-08-26 18:17:37 +02:00
Thiago de Arruda
9963fd0432
mpdupdate: Support $MPD_HOST environment variable.
...
This environment variable is also used by mpc. See
http://linux.die.net/man/1/mpc for details.
2016-08-26 11:36:39 -03:00
Marvin Steadfast
5592499b31
embyupdate: backwards compatible hostname
...
`host` takes `localhost`, `http://localhost ` and `https://`.
2016-08-26 12:28:48 +02:00
Marvin Steadfast
a282d4abc5
embyupdate: Fix authentication header problem
...
There was a problem with the authentication header in the latest
versions. The header creation function changed to fix that. Username and
passwort authentication should work again.
The `host` config variable takes now a full hostname. For example
`http://localhost ` instead of just `localhost`. This makes it easier to
use https hosts.
2016-08-26 10:29:08 +02:00
Johnny Robeson
6bedbd84df
removebyte conversion/literals for command args
...
Paths are obviously untouched.
We definitely don't need these as they are entirely ascii.
2016-08-25 03:37:30 -04:00
Johnny Robeson
4c4d8cff60
s/get(list)/as_str_seq() for keys in duplicates plugin
...
stolen from @sampsyo in the click branch
2016-08-17 02:18:48 -04:00
Adrian Sampson
0833c82075
web: Fix a crash related to byte paths on Python 3
2016-08-12 19:59:07 +00:00
arogl
86d2129c52
Spelling update
2016-08-12 14:48:55 +10:00
Johnny Robeson
fb78830788
fix incorrect bytes() usages in replaygain
...
We encode the method and gain offset values to ascii.
2016-08-09 05:17:53 -04:00
Johnny Robeson
d41949d326
close files we open, but forgot to close
...
This fixes all the obvious `ResourceWarning`s seen in the tests
2016-08-09 01:15:28 -04:00
Johnny Robeson
fcbfce3984
replace deprecated log.warn() with log.warning()
2016-08-09 00:33:38 -04:00
Johnny Robeson
47bddb394c
decode yaml dumped data as utf-8 in edit plugin for PY2
...
Yaml doesn't return a true unicode string even with `allow_unicode`
passed to `safe_dump_all`.
2016-08-08 23:59:54 -04:00
Johnny Robeson
303627e44f
Read and write edit plugin yaml as utf-8
2016-08-07 06:12:48 -04:00
Johnny Robeson
5b3cd44608
add coding: utf-8 magic comment to every .py file
2016-08-07 04:09:17 -04:00
Johnny Robeson
304df82361
rename/move ui._arg_encoding to util.arg_encoding
...
We use this for more than ui concerns, so it should be in util.
It is also no longer marked as a "private" method.
2016-08-04 17:16:11 -04:00
Adrian Sampson
e2981dec4a
Merge pull request #2143 from Jell-E/patch-1
...
Add BPM data with acousticbrainz
2016-07-27 14:58:10 -04:00
Adrian Sampson
c241f09bce
Tiny text tweaks for #2144
2016-07-27 14:56:55 -04:00
Adrian Sampson
6f99c4ccd9
Merge pull request #2144 from tweitzel/master
...
fix bug where $args would be included in the command output
2016-07-27 14:55:20 -04:00
xarph
be7c9d3b67
Remove unneeded if clause since .format will silently pass if the needle
...
is not found.
Add changelog note.
2016-07-27 11:23:37 -07:00
Adrian Sampson
5e3bbf2aeb
Remove remaining links to Google Code ( fix #2145 )
2016-07-27 13:32:41 -04:00
Johnny Robeson
01483f9600
change most googlecode refs to their new locations
2016-07-27 02:57:04 -04:00
xarph
349a3260f8
Apparently py34-flake8 wants whitespace around operators.
2016-07-26 16:08:52 -07:00
xarph
9fb763e151
fix bug where $args would be included in the command output if $args was
...
set in config but -A or --args was left off the beet play command.
2016-07-26 15:41:45 -07:00
Jelle Besseling
b4caa0e475
Add BPM data with acousticbrainz
...
The bpm plugin is a very slow way to add bpm data to songs, using the acousticbrainz plugin is much faster and can doesn't need a new plugin.
2016-07-26 15:42:35 +02:00
Adrian Sampson
58afaf07a5
Switch to new noqa syntax for flake8 3.0
...
Apparently, `# noqa ignore=X` worked before, but now the syntax is more terse,
like this: `# noqa: X`.
See the changelog here:
http://flake8.pycqa.org/en/latest/release-notes/3.0.0.html
2016-07-25 15:02:10 -04:00
Johnny Robeson
1b103b087b
reencode convert args on py3 for util.command_output
...
command_output requires bytestrings, so we put em back that way.
2016-07-25 04:57:02 -04:00
Johnny Robeson
e5497c7494
use stringed template vars on PY3 in convert plugin
...
We decode them with `surrogateescape`, so we avoid decoding errors
2016-07-25 03:28:02 -04:00
Adrian Sampson
039825e0e0
Only use CodingFormatter on Python 2
2016-07-24 15:01:06 -07:00
Adrian Sampson
c67fbefc4c
A little more spcificity in CodingFormatter
2016-07-24 14:59:31 -07:00
Rob McGhee
84b8cf0ab5
Merge remote-tracking branch 'refs/remotes/beetbox/master'
2016-07-20 21:13:32 +01:00
Johnny Robeson
1da919bc40
open lastgenre genres file with codecs.open()
...
This should fix an error when decoding the file on Windows. It defaults
to using the code page there and not utf-8 as intended for yaml.
2016-07-17 06:57:38 -04:00
Johnny Robeson
a1edf1928d
treat bpd command and args as strings, not bytes
2016-07-10 19:21:52 -04:00
Johnny Robeson
f82f5f51a4
use !r for command exec logging in play plugin
...
This is a bit simpler and is compatible with py2 and 3.
2016-07-10 06:00:53 -04:00
Johnny Robeson
5107f2e6d2
add missing py3_path to tempdir in convert plugin
2016-07-10 04:59:58 -04:00
Johnny Robeson
17883bc501
replace os.symlink() with util.link() in importfeeds
2016-07-09 22:44:26 -04:00
Johnny Robeson
3db81a3345
bytestringify tmpdir in convert plugin
...
This works fine in py 3.5, but not 3.4
2016-07-09 03:50:16 -04:00
Johnny Robeson
cb6efc4c22
Reorganize Gst import and version req in bpd
...
This avoids
```sh
PyGIWarning: Gst was imported without specifying a version first. Use
gi.require_version('Gst', '1.0') before import to ensure that the right
version gets loaded.
```
by silencing E401 import ordering warning
2016-07-08 05:48:26 -04:00
Rob McGhee
2dad86291e
Emby API Key
...
Corrected the use of spaces rather than tabs. Add the option to use an
Emby API key to authenticate rather than a password
2016-07-07 22:46:33 +01:00
Johnny Robeson
c9c37a8f79
adding missing b' to command name checks in replaygain
2016-07-07 03:44:19 -04:00
Johnny Robeson
1119e219b3
adjust bytestring treatment of ext in convert plugin
2016-07-07 03:44:19 -04:00
Rob McGhee
3710c139fb
Emby API Key
...
Add the option to read an API Key from the config file and submit that
instead of needing a password. Doesn't remove the use of password so is
backwards compatible with users current config file
2016-07-06 19:42:57 +01:00
Johnny Robeson
a15ae96616
add a missing text_string in play plugin
...
I don't think wanna send the cli args as bytes to the logger
2016-07-04 02:48:54 -04:00
Johnny Robeson
b9cd889ef4
decode ipfs item paths to satisy python -bb
2016-07-03 23:52:05 -04:00
Johnny Robeson
527b51147e
add py3_path to NamedTemporaryFile suffixes
2016-07-02 04:53:57 -04:00
Johnny Robeson
be08d4b129
replace unichr with six.unichr in lyrics plugin
2016-07-02 02:36:05 -04:00
Johnny Robeson
9020dc1f45
use text_string() in a few places for io output
2016-07-02 00:03:46 -04:00
Johannes Baiter
4c324fae2a
beatport: Use track numbers from API ( #2091 )
...
* beatport: Use trackNumber from API instead of enumerating the tracks
* beatport: Set medium_index to track number
* Update changelog with fixes to beatport plugin
2016-06-29 20:34:05 +02:00
Adrian Sampson
a6098928f5
Merge branch 'master' of github.com:sampsyo/beets
2016-06-29 10:33:00 -07:00
wordofglass
e2c6547635
fetchart: Clarify the deprecation of remote_priority in docs and
...
warning, closes #2092
2016-06-29 19:18:06 +02:00
Johnny Robeson
6b3cc6ff37
adapt print_() callers to send unicode strings
2016-06-29 03:17:02 -04:00
Adrian Sampson
192dd321f1
permissions: Add debug logging
2016-06-28 10:53:23 -07:00
Adrian Sampson
890b9e81e3
Fix #2089 : correct permissions configuration
...
This reverts the change in 44380db6e8 , where we
lost the ability to "reinterpret" decimals in the YAML configuration file as
octal permissions values.
2016-06-28 10:51:13 -07:00
Adrian Sampson
84bfbe95b9
permissions: More helpful logging ( #2089 )
2016-06-28 10:39:35 -07:00
Adrian Sampson
b099503a6c
permissions: Use correct path conversions
...
It looks like the original author mistook `bytestring_path` for `syspath`.
2016-06-28 10:31:57 -07:00
Adrian Sampson
e33c19a3e9
permissions: Use proper logging ( #2089 )
...
Refactored so we can use the proper logging infrastructure instead of `print`.
2016-06-28 10:29:26 -07:00
Christoph Reiter
629241efd3
mediafile: Cleanup mutagen error handling
...
Instead of the individial mutagen format exceptions use the
mutagen.MutagenError exception introduced in 1.25.
Since 1.33 mutagen will only raise MutagenError for load/save/delete
and no longer raise IOError. Translate both errors to UnreadableFileError
to support older and newer mutagen versions. Unify error handling
in __init__(), save() and delete().
Since it's no longer possible to get an IOError from MediaFile, adjust
all callers and tests accordingly.
This was tested with mutagen 1.27 and current mutagen master.
2016-06-28 16:43:34 +02:00
Max Ammann
5e8ac9e4a5
Expose the relative path to the library instead of omitting the 'path' variable
2016-06-26 19:53:57 +02:00
Max Ammann
2ae26548fc
Modified and simplified is_expand(...) method
2016-06-26 19:53:57 +02:00
Max Ammann
619344c813
Added documentation for the expand parameter
2016-06-26 19:53:57 +02:00
Max Ammann
041adf47ac
Fixed lines which are mor than 79 characters
2016-06-26 19:53:57 +02:00
Max Ammann
5831b99b9f
Adding 'expand' flag for json requests
...
This allows you to query the individual items of an album
2016-06-26 19:53:57 +02:00
Adrian Sampson
a8b039da78
Remove a spurious six use
...
I'm not sure what that `encode` was doing anyway.
2016-06-25 19:24:59 -07:00
Adrian Sampson
5efd5b21c5
Use new as_str method
...
Instead of `get(six.text_type)`, which was a surprisingly large portion of our
uses of six.
2016-06-25 19:16:14 -07:00
Adrian Sampson
de62a59d35
Remove an unnecessary six.range use
...
Ordinary `range` works fine here.
2016-06-25 18:39:29 -07:00
Adrian Sampson
e16cc58cb9
Walk back some six.iter* uses
...
In places where it doesn't much matter whether we use an iterator or the old
Python 2 list way, using the six name just hurts legibility.
2016-06-25 18:29:55 -07:00
Adrian Sampson
349a6e6c1d
Fix an erroneous six usage in fuzzy
2016-06-25 18:11:15 -07:00
Adrian Sampson
736ad66518
Merge pull request #2066 from beetbox/use-six
...
Use the six package to handle py2/p3 compatibility
2016-06-25 18:09:56 -07:00
wordofglass
5d00ca8bda
fetchart: do not unnecessarily reset Candidate.path on download failure
2016-06-25 14:10:55 +02:00
wordofglass
697291b04e
fetchart: improve error resilience of the Content-Type detection by file magic
2016-06-25 14:10:50 +02:00
wordofglass
9968288358
fetchart: update comments
2016-06-25 13:49:15 +02:00
Johnny Robeson
b6678019ea
use @six.python_2_unicode_compatible
2016-06-24 05:53:56 -04:00
Johnny Robeson
78334876c3
treat HTMLParseError as a noop when missing
...
Strict mode no longer exists in html.parser on python >= 3.5, and no longer means anything on python >= 3.3
2016-06-24 05:53:56 -04:00
Johnny Robeson
edb1cbc5fc
replace iter{items|values} with six.iter{items|values}
2016-06-24 05:53:55 -04:00
Johnny Robeson
83f6ba3ce4
handle metaclasses with six
2016-06-24 05:53:55 -04:00
Johnny Robeson
e57b7faf69
replace basestring with six.text_types
2016-06-24 05:53:55 -04:00
Johnny Robeson
e8afcbe7ec
replace unicode with six.text_type
2016-06-24 05:53:49 -04:00
wordofglass
34cdf0f3f3
fetchart: complain about unsupported images only after validating the Content-Type
2016-06-23 17:38:01 +02:00
wordofglass
d47182a3e5
fetchart: do not rely on the server-provided Content-Type, but determine the image format from the file magic
2016-06-23 17:37:55 +02:00
Johnny Robeson
8e682f14a1
replace xrange with range from six.moves
2016-06-23 04:40:18 -04:00
Johnny Robeson
31cca684f2
replace itertools.izip with zip from six.moves
2016-06-23 04:40:18 -04:00
Johnny Robeson
1f8e08d168
replace raw_input with input from six.moves
2016-06-23 04:40:18 -04:00
Johnny Robeson
4649226b9b
use urllib from six.moves
2016-06-23 04:40:18 -04:00
Johnny Robeson
1f8fe0f9a6
use _thread from six.moves
2016-06-23 04:40:18 -04:00
Johnny Robeson
129e140015
use html_parser (really html.parser) from six.moves
2016-06-23 04:40:18 -04:00
Johnny Robeson
7713be4c0f
use http_client (really http.client) from six.moves
2016-06-23 04:40:18 -04:00
Johannes Baiter
ed2580d5b1
Fix bugs in beatport plugin ( #2076 )
...
* Fix naming bug
* Fix another minor bug
* Remove debugger statement
* Another fix for developer clumsiness in beatport plugin
* Fix typo in error description
2016-06-23 08:51:26 +02:00
Johnny Robeson
ea02269dee
remove ext encode from fetchart (py3 fix for #2068 )
2016-06-23 02:29:53 -04:00
Adrian Sampson
d3928008e1
Merge pull request #2068 from beetbox/fetchart_mime_extension
...
Fix fetchart hardcoding the image extension
2016-06-22 10:19:12 -07:00
Adrian Sampson
5e7ba73f5e
Merge pull request #2067 from jbaiter/beatport
...
Revive Beatport plugin with support for OAuth API (#1989 )
2016-06-21 14:33:34 -07:00
Adrian Sampson
351b6f8c9d
Remove raw Unicode literals ( fix #2069 )
...
PEP 414 didn't add `ur"..."` literals to Python 3. So for hybrid 2/3
compatibility, these had to be replaced with ordinary Unicode string literals.
This was only painful for one string; the others were only raw strings by
convention. (All were regexes.)
2016-06-21 14:29:14 -07:00
Johannes Baiter
ae0269372c
Docstrings for beatport.BeatportClient
2016-06-21 21:39:25 +02:00
Johannes Baiter
c4835336a5
Fix PEP8 checks
2016-06-21 11:20:16 +02:00
Johannes Baiter
85d6ef4a80
Revive Beatport plugin with support for OAuth API ( #1989 )
2016-06-21 11:02:16 +02:00
wordofglass
c4617c2c1f
fetchart: do not hardcode the downloaded extension to jpg, fixes #2053
2016-06-21 10:57:45 +02:00
Philipp Beckmann
f9ed53a096
Multiple corrections as advised in the codereview
2016-06-20 18:44:37 +02:00
Philipp Beckmann
7b154cedd7
Added double line spacings between definitions
2016-06-20 18:29:46 +02:00
Philipp Beckmann
9fd227c8cc
Fixed flake8 errors
2016-06-20 18:22:07 +02:00
Philipp Beckmann
0a3d18c5c4
Merge remote-tracking branch 'upstream/master' into bpd_gst10
2016-06-20 18:11:11 +02:00
Philipp Beckmann
5613d9d4ea
bpd: Added correct error check for query_position/query_duration
2016-06-20 18:09:37 +02:00
Johnny Robeson
09322530ca
replace 2 map() calls with a list comprehension
2016-06-19 22:30:58 -04:00
Philipp Beckmann
0917e675d7
bpg: Converted gstplayer.py to GStreamer 1.0
2016-06-19 22:06:55 +02:00
Johnny Robeson
1c761c60fb
bytstringify extra cover_names in fetchart
2016-06-17 03:37:28 -04:00
Johnny Robeson
cf5ab2617a
reorient bytestring_path code in convert replace_ext
2016-06-17 01:20:42 -04:00
Johnny Robeson
fff0439b06
add missing blank line in mpdstats
2016-06-17 00:09:22 -04:00
Johnny Robeson
12136e1d32
adapt is_url checking for bytestring paths
2016-06-17 00:00:08 -04:00
Johnny Robeson
411e4957b0
bytestringify replace_ext in convert plugin
2016-06-16 23:40:59 -04:00
Johnny Robeson
b602faabb8
more bytestringification in thumbnails plugin
2016-06-16 23:11:16 -04:00
Johnny Robeson
15c07613bf
decode the filename written to .desktop file
2016-06-16 23:04:52 -04:00
Johnny Robeson
52f2ab2547
encode uri passed to hashlib in thumbnails plugin
2016-06-16 23:00:45 -04:00
Johnny Robeson
a903b57dae
encode the passwords passed to hashlib in embyupdate
2016-06-16 21:47:10 -04:00
Johnny Robeson
d3d52da012
bytestringify paths in filefilter plugin
2016-06-16 04:08:49 -04:00
Johnny Robeson
cb54955485
more bytecasting in smartplaylist plugin
2016-06-15 23:55:17 -04:00
Johnny Robeson
a02a1f0201
cast year ints to str, not bytes in bucket plugin
...
This seems to work equally well in py2/3
2016-06-15 03:34:03 -04:00
Johnny Robeson
4fbad7dd67
bytestringify path in file_filter
2016-06-14 23:17:08 -04:00
Johnny Robeson
44380db6e8
If the permission is an int, then simply return it
...
It doesn't seem necessary to convert it, and if it does, then
we're missing a test
2016-06-14 03:50:29 -04:00
Johnny Robeson
8e1bc16228
set default perms as strings in perms plugin itself
...
I originally changed them to octal in my py3 branch,
but they are gonna end up as strings anyways, so I figured we should
just use them that way by default.
2016-06-14 03:47:59 -04:00
Johnny Robeson
0a5c6ce4c0
open tempfile in edit plugin in text mode
2016-06-14 03:38:21 -04:00
Johnny Robeson
3112a18463
treat ctypes .value as bytes in thumbnails plugin
2016-06-14 00:51:12 -04:00
Johnny Robeson
8fa71f78fe
decode bytes from .encode() in lyrics plugin
2016-06-14 00:44:43 -04:00
Johnny Robeson
0f4b907ff5
wrap filter()s in a list() in replaygain plugin
2016-06-14 00:28:46 -04:00
Johnny Robeson
6745759ea5
open even more files in binary mode
...
* play plugin
* smartplaylist plugin
2016-06-13 05:18:33 -04:00
Johnny Robeson
4dd43f1081
write to the m3u file in binary mode in importfeeds
2016-06-12 20:27:01 -04:00
Johnny Robeson
a76de95183
return a bytestring path from RemoteArtSource
2016-06-12 01:19:39 -04:00
Johnny Robeson
69c9fb8b07
check dirname result against b'' in fetchart
2016-06-10 02:52:58 -04:00
Johnny Robeson
5e62b39f75
replace TEMPORARY with FIXME in discogs plugin
...
We're more likely to search for this later by FIXME.
NOTE: the bug is fixed, but the versions with the fix may not be widely
distributed yet
2016-06-10 02:30:00 -04:00
Johnny Robeson
5485bdb706
add missing b' in discogs query regex
2016-06-10 02:23:14 -04:00
Johnny Robeson
ab67727283
wrap the cover_names map with a list in fetchart
...
most `cover_names` users expect to operate on a list
2016-06-10 00:09:15 -04:00
Johnny Robeson
02165fc3a9
open lastgenre whitelist in binary mode
2016-06-09 23:53:40 -04:00
Adrian Sampson
f400a2431e
fetchart: Fix path types on Windows
2016-06-08 10:20:25 -07:00
Johnny Robeson
790b1b5153
replace some filter/map calls with list comps
...
These are places where the surrounding/calling code needs a list, not an iter.
2016-06-08 00:17:18 -04:00
Adrian Sampson
b752a58ed6
Improve a couple of docstrings
2016-06-05 12:16:41 -07:00
Adrian Sampson
0051bdb506
lyrics: Avoid a spurious warning
2016-06-02 21:33:33 -07:00
Adrian Sampson
ae7990322a
Merge pull request #2032 from pszxzsd/bs1770
...
make bs1770gain calculate sample peak instead of true peak
2016-06-02 16:17:04 -07:00
Adrian Sampson
581fba6288
lyrics: Avoid crash when enabling google
...
If you *both* haven't set an API key *and* BeautifulSoup wasn't
installed, the list.remove() call would crash. (This came up when
running the tests on a fresh machine without many dependencies.)
2016-06-02 11:58:14 -07:00
pszxzsd
8dcd50b18f
make bs1770gain calculate sample peak instead of true peak
2016-06-01 20:00:08 +02:00
Adrian Sampson
33a4767eaf
Portable mock command for testing convert plugin
2016-05-31 11:48:29 -07:00
Adrian Sampson
395877d903
Remove the Echo Nest plugin 😢 ( #1920 )
2016-05-30 22:25:58 -07:00
Johnny Robeson
81484529c9
remove b' from a few more stdlib calls
2016-05-31 00:13:09 -04:00
Johnny Robeson
330306bbe2
remove bytes casts from object/method resolution code
2016-05-30 23:21:24 -04:00
Johnny Robeson
e6ab231f72
Revert "Remove bytes casting for non-path command args/opts"
...
This reverts commit 2a6e74bc27 .
2016-05-30 22:00:42 -04:00
Johnny Robeson
2a6e74bc27
Remove bytes casting for non-path command args/opts
2016-05-30 21:42:44 -04:00
Johnny Robeson
94bab42f97
use strings (not bytes) for flask responder names
2016-05-30 21:19:15 -04:00
Adrian Sampson
71b9fd785c
Revert "Do __name__ comparison with bytes and not unicode"
...
This reverts commit 9c41c39913 .
That commit used byte strings for the `if __name__ == '__main__'` pattern,
which was necessary when we were doing unicode_literals. But it is wrong on
Python 3, and now that we're liberated from unicode_literals, we need to go
back to native strings for this comparison.
2016-05-29 19:19:59 -07:00
Adrian Sampson
59435792e9
Merge pull request #2010 from sumpfralle/web-api-unique-results
...
web: add API functions for retrieving unique values of specific keys
2016-05-27 00:15:34 -07:00
Johnny Robeson
a405a072f7
use reduce() from functools
2016-05-26 23:52:35 -04:00
Lars Kruse
d50923553d
web: add API functions for retrieving unique values of specific keys
...
the following API paths are added:
* /item/values/FIELD
* /album/values/FIELD
Both paths will deliver a json dictionary with the key 'values' containing a
list of unique values belonging to the requested table and field.
Sorting is possible by supplying the query argument "sort_key".
This feature is useful for remote clients, e.g. Mopidy-Beets:
* track genres: /item/unique/genre
* track languages: /album/unique/language
* album artists: /album/unique/albumartist?sort_key=albumartist_sort
* album years: /album/unique/year
2016-05-27 04:12:09 +02:00
Lars Kruse
be4dc227fc
web: handle missing art gracefully
2016-05-24 03:05:51 +02:00
Frederik “Freso” S. Olesen
37b9360706
acousticbrainz plugin: Access acousticbrainz.org over HTTPS.
2016-05-20 01:08:15 +02:00
Adrian Sampson
ef7cca4c12
Fix #2005 : list AIFF as a lossless format
2016-05-18 11:24:34 -07:00
Jack Wilsdon
5f3c27990d
Merge pull request #1974 from jackwilsdon/make-convert-extension-optional
...
Make convert extension optional
2016-05-08 16:30:30 +01:00
Jack Wilsdon
fcce9c02ac
Revert removal of trailing comma
2016-05-06 17:51:21 +01:00
Jack Wilsdon
2d5c68cec9
Remove write option from bpm and use import.write
2016-05-06 17:50:27 +01:00
Jack Wilsdon
2038a40fa2
Add write option to bpm plugin
...
Add write option to bpm plugin and tidy up command function.
2016-05-05 11:27:28 +01:00
Jack Wilsdon
982272deb3
Merge pull request #1981 from jackwilsdon/fix-hook-unicode
...
Fix command formatting for hook plugin
2016-05-03 17:45:38 +01:00
Profpatsch
2d36626d25
convert plugin: Change the default ogg quality
...
According to the `oggenc(1)` man page (in vorbis-tools), the default quality is 3, not 2. So we should use that.
2016-05-02 01:53:20 +02:00
Jack Wilsdon
92af723682
Format individual command pieces instead of whole command
2016-05-01 23:04:22 +01:00
Jack Wilsdon
9f0db13675
Remove unnecessary variable
2016-05-01 21:44:40 +01:00
Jack Wilsdon
63caf1fceb
Add documentation for coding formatter
2016-05-01 21:44:05 +01:00
Jack Wilsdon
ba7004de6e
Remove unneeded AutoFieldCountFormatter
2016-05-01 21:33:06 +01:00
Jack Wilsdon
e66981c4d8
Use beets shlex_split instead of shlex.split
2016-05-01 21:31:53 +01:00
Jack Wilsdon
b4715d61e1
Fix over-indentation of wrapped code
2016-05-01 21:30:20 +01:00
Jack Wilsdon
576ec92992
Fix encoding for hook plugin
...
- Add a AutoFieldCountFormatter formatter for auto field
incrementation.
- Add a CodingFormatter for formatting encoded strings.
- Fix encoding for hook plugin using CodingFormatter.
2016-05-01 21:21:40 +01:00
Adrian Sampson
04bbdede38
hook: Typed configuration accessors
2016-05-01 13:04:35 -07:00
Jack Wilsdon
b9464d1ea4
Use unicode for command formatting
2016-05-01 18:26:06 +01:00
Patrik
2f608fce0a
convert.py: Fix error message
2016-05-01 01:53:03 +02:00
Patrik
4f596725ae
convert.py: Fix error message
2016-05-01 01:27:02 +02:00
Adrian Sampson
950e1b5e85
Merge pull request #1603 from jackwilsdon/add-hook-plugin
...
Add hook plugin (fixes #1561 )
2016-04-30 15:03:42 -07:00
wordofglass
1dd6739218
lyrics: fix a bug where the lyricswiki fetcher would try to unescape an empty (None) response and crash
2016-04-30 01:25:02 +02:00
Jack Wilsdon
ae9ece1e62
Make format extension optional
...
The format extension defaults to the name of the format if it is not
provided.
2016-04-29 14:51:13 +01:00
wordofglass
c3c7da8061
lyrics: simplify source handling a little
2016-04-28 18:31:22 +02:00
wordofglass
2928a16bd5
lyrics: actually disable translation when there's no langdetect
2016-04-28 17:22:55 +02:00
wordofglass
c4b11f889f
lyrics: clean up import handling and source removal
2016-04-28 17:15:25 +02:00
Jack Wilsdon
7c9440cf13
Merge master back in to fork
2016-04-28 04:15:02 +01:00
Jack Wilsdon
48fff93e78
Merge pull request #1961 from jackwilsdon/pep8-naming
...
Add flake8 check for pep8 naming
2016-04-28 04:07:17 +01:00
Jack Wilsdon
79d602b2a0
Use correct methods for ImageMagick and PIL info
2016-04-27 20:41:09 +01:00
Jack Wilsdon
8317a20bcd
Use correct methods from art resizer
2016-04-27 20:34:28 +01:00
Jack Wilsdon
b1c58e99ec
Update code to match pep8 naming standards
2016-04-27 20:15:10 +01:00
Adrian Sampson
09bc250413
Fix #1960 : Unicode in fetchart Wikipedia source
...
The SparQL query needed to use a Unicode literal.
2016-04-26 16:59:23 -07:00
Jack Wilsdon
c5e2334fb5
Remove useless unescape
...
Remove useless unescape as _scrape_script_cruft does it for us.
2016-04-25 19:24:26 +01:00
Jack Wilsdon
1be9c3003e
Use different method to remove junk from LyricsWiki
...
Use `_scrape_strip_cruft` instead of `scrape_lyrics_from_html` so that
LyricsWiki does not depend on Beautiful Soup.
2016-04-25 19:14:30 +01:00
wordofglass
607f41be43
Fix the previous fix...
2016-04-24 00:42:31 +02:00
wordofglass
4a5b886944
Fix two non-guarded import statements in the lyrics plugin
...
These could make the import process crash with a traceback.
2016-04-24 00:35:15 +02:00
Guilherme Danno
bf1b06f0c7
don't print entire lyrics during import
2016-04-22 17:30:06 -03:00
wordofglass
ac2f7fe712
Fix the fanarttv source failing when there were images found, but no cover art
2016-04-20 12:59:18 +02:00
wordofglass
5fbca32ea4
reuse the 'sources' names from the configuration for art_source
2016-04-19 11:25:03 +02:00
wordofglass
740efc0a0e
small fixes; consistently use 'source' instead of 'origin'
2016-04-19 11:23:57 +02:00
wordofglass
c27907b043
enable fetchart to store the artworks origin in a flexible field; as of now untested
2016-04-19 11:23:42 +02:00
Jack Wilsdon
85fd60852f
Remove unused dependencies
2016-04-18 19:21:31 +01:00
Jack Wilsdon
ffa2fdd278
Merge master back in to fork
2016-04-18 19:19:08 +01:00
Jack Wilsdon
dea091ee53
Improve error handling for invalid commands
2016-04-18 19:16:31 +01:00
wordofglass
9e774fdccd
Merge branch 'master' into fetchart_almost_square
2016-04-18 19:00:45 +02:00
wordofglass
11c6ca5271
Merge remote-tracking branch 'beetbox/master'
2016-04-18 18:53:46 +02:00
wordofglass
c3be244109
remove the personal key warning altogether; it's also in the docs and rather obtrusive
2016-04-18 18:52:18 +02:00
Guilherme Danno
019d7cd2e6
fix some typos
2016-04-18 12:36:42 -03:00
Guilherme Danno
09073630e3
Merge pull request #1945 from beetbox/export-plugin
...
Export plugin: Export data from queries to a json
2016-04-18 12:24:27 -03:00
Jack Wilsdon
070469e259
Remove unicode_literals from __future__ imports
2016-04-18 16:00:13 +01:00
Jack Wilsdon
3e35660ff3
Remove unnecessary escaping on double quotes
2016-04-18 15:36:08 +01:00
Jack Wilsdon
686e069bc4
Replace double quotes with single quotes
2016-04-18 15:35:15 +01:00
Jack Wilsdon
8b4f349e27
Improve hook plugin design and configuration
...
- Remove `shell` option and split all commands using `shlex.split`
before passing them to `subprocess.Popen`.
- General refactor of hook plugin code - move hook creation function
inside `HookPlugin`.
- Add improved error handling for invalid (i.e. empty) commands or
commands that do not exist.
2016-04-18 15:04:57 +01:00
wordofglass
20235264a4
rewire logic a bit; reasonable debug messages
2016-04-18 15:23:38 +02:00
Jack Wilsdon
dd949a9488
Merge master back in to fork
2016-04-18 14:06:45 +01:00
wordofglass
30bca5c8af
fix unconditionally printing the personal key warning for in fanart.tv in fetchart
2016-04-18 11:39:09 +02:00
Guilherme Danno
228ffc91be
use sort_keys to make the data more "predictable"
2016-04-17 23:47:12 -03:00
Guilherme Danno
5e3c65d32e
change option letter
2016-04-17 23:37:51 -03:00
Guilherme Danno
10acea4efd
Remove json monkey-patching and use encoder subclassing
2016-04-17 23:35:23 -03:00
Guilherme Danno
1e3704a27e
fix NotImplementedError()
2016-04-17 21:52:09 -03:00
Guilherme Danno
c211aabd72
simplify json printing
2016-04-17 21:39:53 -03:00
wordofglass
6cbbba7dae
initial work on allowing slightly non-square images in fetchart
2016-04-18 01:47:39 +02:00
Guilherme Danno
f58d4e838a
Query data from items and export the json
...
Based on the ``info`` plugin
2016-04-17 18:26:17 -03:00
wordofglass
8169983074
fix translation of the old remote_priority option for fetchart, add a test
2016-04-17 21:18:31 +02:00
Adrian Sampson
3fb2185925
Merge pull request #1898 from beetbox/flake8-future-import
...
Add __future__ import style checker
2016-04-16 15:24:46 -07:00
wordofglass
0f89f17227
add missing division future imports
2016-04-16 18:33:54 +02:00
wordofglass
36e91fc78b
fix fanart.tv merge
2016-04-16 14:17:46 +02:00
wordofglass
9ce10c2fda
Merge branch 'master' into fetchart_unify_sources,
...
i.e. adapt the fanart.tv source
2016-04-16 13:34:46 +02:00
wordofglass
0cfddfaa8a
add missing absolute_import future imports
2016-04-16 02:28:54 +02:00
wordofglass
6b43e1204f
add missing print_function future imports
2016-04-16 01:53:39 +02:00
Adrian Sampson
4691deb5a5
Merge pull request #1941 from wordofglass/fetchart_fanarttv
...
Fetchart: add fanart.tv source
2016-04-15 11:45:00 -07:00
wordofglass
4763fec35b
fanart.tv: remove overly verbose logging left over from debugging
2016-04-15 19:42:06 +02:00
wordofglass
3a2eb03e0e
Add fanart.tv API key
2016-04-15 19:32:17 +02:00
wordofglass
87aa5dab13
fixes according to feedback by @Kraymer
2016-04-15 14:15:25 +02:00
wordofglass
d46b45861b
typo, rename project key config option
2016-04-15 02:40:52 +02:00
wordofglass
ecc6e1c3d6
fanart.tv albumart fetching, missing a project API key
2016-04-15 02:28:04 +02:00
Fabrice Laporte
05970e8a93
re-query token when it has expired
2016-04-14 22:57:41 +02:00
Fabrice Laporte
56d7e5dfa0
send as little text as possible to bing api
...
Bing API has a limit of 2M chars/month. It’s common to have repeating
sentences in lyrics so to reduce number of chars sent per song, store
sentences in a set and send it, instead of sending the whole lyrics.
2016-04-14 22:57:17 +02:00
wordofglass
7322e212a4
fetchart: adapt test to earlier config read
2016-04-14 16:49:06 +02:00
wordofglass
aaf614c869
fetchart: move config reads to __init__
2016-04-14 16:00:24 +02:00
wordofglass
6bc3fb8f67
fetchart: make Candidate a new-style class
2016-04-14 15:27:47 +02:00
Fabrice Laporte
6cfc106b8a
better docs and debug msg
2016-04-14 08:31:55 +02:00
Fabrice Laporte
58df77e2cb
langdetect conditional import
2016-04-14 08:31:14 +02:00
Fabrice Laporte
e03c3af91f
don't translate lyrics already in the target language
2016-04-14 01:11:14 +02:00
Fabrice Laporte
66a627fed8
restore module docstring
2016-04-14 00:58:42 +02:00
Fabrice Laporte
3c2479ab49
translate lyrics using Bing API
...
By subscribing to Microsoft Translator API, one can now activate the
translation of lyrics from one set of source langages to a target
langage.
Translations are appended to each original sentence using ‘/‘ as
separator.
2016-04-14 00:53:58 +02:00
Fabrice Laporte
d67950cdcc
pep8
2016-04-14 00:45:55 +02:00
wordofglass
1cc4d11baf
Fetchart: fix tests and fetachart logic
2016-04-13 22:56:18 +02:00
wordofglass
a4994d2bf8
fetchart: fix more tests
2016-04-06 01:36:32 +02:00
wordofglass
bc877a6d7f
fetchart: fix tests (mostly pep8, syntax)
2016-04-06 01:19:44 +02:00
wordofglass
bbc06e9de9
fetchart: Adapt ArtForAlbumTest
2016-04-05 23:24:30 +02:00
wordofglass
a2141c6f3a
fetchart: fix refactoring
2016-04-05 22:44:13 +02:00
Adrian Sampson
fa2aa82a0d
Fix #1927 : useful error message for failed edit
2016-04-03 17:42:25 -04:00
Adrian Sampson
3f4f077272
edit: Log the invoked command
2016-04-03 17:38:40 -04:00
wordofglass
50bf28edd4
move constants into Candidate
2016-03-23 16:46:39 +01:00
wordofglass
8356e7d33d
fix syntax
2016-03-23 00:47:11 +01:00
wordofglass
b37cc02f1a
fetchart: Introduce the Candidate class, some fixes to the previous commit.
2016-03-22 20:52:25 +01:00
wordofglass
c0a041b87e
fetchart: Unify handling of local and remote sources.
2016-03-22 19:42:16 +01:00
Cédric Tissières
e5be804802
importadded: adapt doc for new option preserve_write_mtimes
2016-03-22 06:24:09 +01:00
Cédric Tissières
8ef36198fb
importadded: preserve mtime after any write
2016-03-21 20:47:05 +01:00
Adrian Sampson
d1753b341e
lyrics: Some comments and better naming
2016-03-21 10:28:30 -07:00
Adrian Sampson
f684f29a25
lyrics: Tolerate pages without text ( fix #1914 )
2016-03-21 10:24:13 -07:00
Adrian Sampson
c9be5bc7d1
Merge pull request #1911 from jackwilsdon/fix-musixmatch-url
...
Fix MusixMatch issues
2016-03-18 11:51:27 -04:00
Jack Wilsdon
60148918d9
Fix LyricsWiki scraping code
...
LyricsWiki now escapes song lyrics using HTML entities (presumably to
prevent scraping), so we now unescape these before parsing.
LyricsWiki has also added a script tag inside the div we are scraping,
so we have to remove this using `scrape_lyrics_from_html`.
2016-03-17 17:49:41 +00:00
Jack Wilsdon
c417003184
Add missing newline
2016-03-16 21:07:28 +00:00
Jack Wilsdon
1ec06e14c5
Fix lyrics extraction from MusiXmatch
...
Remove "lyrics_" prefix from extract_text_between arguments to reflect
changes made to the MusiXmatch website.
2016-03-16 20:48:57 +00:00
Jack Wilsdon
44c799320f
Improve URL generation in lyrics plugin
...
Allow custom replacements to be defined in subclasses of
SymbolsReplaced.
Replace spaces with a hyphens when the source is MusiXmatch, instead of
(incorrectly) using underscores. This fixes #1880 .
2016-03-16 20:46:36 +00:00
Adrian Sampson
8a0b18c960
Fix #1903 : scrub sometimes ignored id3v23
2016-03-15 23:06:10 -04:00
Adrian Sampson
c18b5dbadd
Fix #1907 : redact MusicBrainz password
2016-03-11 16:50:32 -05:00
Ivan Shapovalov
4d40b058d3
treewide: add u to instances of 'singleton:true'
...
Fixes #1901 .
2016-03-06 02:12:43 +03:00
Adrian Sampson
eac7d64545
Merge branch 'master' into no_unicode_literals
2016-02-28 15:21:43 -08:00
Adrian Sampson
e54c7eec3d
Standardize __future__ imports without parentheses
...
Since the list is short enough now, we don't need parentheses for the line
wrap. This is a little less ugly.
2016-02-28 15:03:51 -08:00
Adrian Sampson
d53019f9db
Further whitespace fiddling
...
Most commonly, this sticks with:
log.debug(
'some long message here'
)
instead of placing the closing ) at the end of the string literal.
2016-02-28 14:48:10 -08:00
Adrian Sampson
031d50abbf
Human-readable message in non-pretend mode ( #1894 )
2016-02-27 09:58:05 -08:00
Ali Graham
a98bc481cd
tweaks for style, option name
2016-02-27 19:05:56 +10:30
Ali Graham
a1f80275c4
revert a chunk of the work to be the way it was
2016-02-25 21:35:14 +10:30
Ali Graham
bc21afab42
better text for artwork resize/copy logs
2016-02-25 18:51:00 +10:30
Ali Graham
1fc6efe3b4
fix indentation
2016-02-25 18:45:53 +10:30
Ali Graham
04c12a50ac
add copy_album_art_maxwidth config option to convert plugin
2016-02-25 12:44:56 +10:30
Ali Graham
e58e04f0ab
move and split fetchart valid_image
2016-02-25 12:44:09 +10:30
Peter Kessen
c2e7d59db7
Removed import of unicode_literals from plugin web
2016-02-20 14:36:56 +01:00
Peter Kessen
7155999d00
Removed import of unicode_literals from plugins
...
* thumbnails
* types
2016-02-20 14:34:49 +01:00
Peter Kessen
30cf407074
Removed import of unicode_literals from plugins
...
* rewrite
* scrub
* smartplaylist
* spotify
* the
2016-02-20 14:31:27 +01:00
Peter Kessen
456565b6f2
Removed import of unicode_literals from plugins
...
* play
* plexpudate
* random
* replaygain
2016-02-20 14:22:45 +01:00
Peter Kessen
feab3df910
Removed import of unicode_literals from plugins
...
* mpdstats
* mpdupdate
* permissions
* zero
2016-02-20 14:12:37 +01:00
Peter Kessen
48098c3741
Removed import of unicode_literals from plugins
...
* lastgenere
* mbcollection
* mbsubmit
* mbsync
* missing
2016-02-20 14:08:05 +01:00
Peter Kessen
f2fc1a78bf
Removed import of unicode_literals from plugins
...
* keyfinder
* lastimport
* lyrics
2016-02-20 13:59:58 +01:00
Peter Kessen
fc3d10d248
Removed unicode_literals from plugins
...
* fuzzy
* ihate
* importadded
* importfeeds
* info
* inline
2016-02-20 13:53:10 +01:00
Peter Kessen
7d00ab3b50
Removed unicode_literals from plugins
...
* fetchart
* freedesktop
* fromfilename
* ftintitle
2016-02-20 13:44:45 +01:00
Peter Kessen
53d2c8d9db
Removed unicode_literals from plugins
...
* echonest
* edit
* embedart
* embyupdate
2016-02-20 13:35:54 +01:00
Peter Kessen
5547a82848
Removed unicode_literals from plugin duplicates
2016-02-20 13:26:27 +01:00
Peter Kessen
40900aa1cb
Removed unicode_literals from plugins
...
* bucket
* chroma
* convert
* discogs
2016-02-20 12:10:01 +01:00
Peter Kessen
5db57bdc01
Removed unicode_literals from plugin bpd
2016-02-20 11:57:36 +01:00
Peter Kessen
6852ab5472
Removed unicode_literals from plugins
...
* acousticbrainz
* badfiles
* bpm
2016-02-20 11:49:10 +01:00
Adrian Sampson
6e3d72afa6
Merge pull request #1846 from diego-plan9/interactiveedit
...
edit: allow interactive editing during the importer
2016-02-07 14:34:54 -08:00
Adrian Sampson
314521b6ae
replaygain: Fix obvious typo ( fix #1873 , I hope)
2016-02-07 14:28:33 -08:00
Josh Brown
ea36c5a825
Allow default lastfm key to be overridden in config
2016-02-06 00:41:59 -06:00
Josh Brown
0f155ce3b9
Use beets API key for lastimport plugin.
2016-02-05 23:50:24 -06:00
Diego Moreda
8d3f9a573c
edit: revert album-field changes, use temporary id
...
* Revert the changes related to allowing the album- and item-level
fields to be edited at the same time, as the increase in complexity
was deemed excesive during review.
* Modify the interactive execution so temporary Item.id's are used,
removing the extra functionality needed for dealing with both id and
path as reference fields.
* Docstrings and comments cleanup.
2016-02-05 12:35:11 +01:00
Diego Moreda
0ba8f83929
edit: allow edit album+item fields in single yaml
...
* Add support for editing both the item fields and the album fields in
a single YAML file, by appending an Album-like object as the front of
the objects to be edited.
* The FakeAlbum class provides that object, mimicking the original
Album behaviour and including an _apply_changes() method that propagates
the changes read from the yaml onto the Items.
* Modify edit_objects() so the flattening of the objects takes into
account the type of object, using different fields for Albums and for
Items.
* Renamed apply() to apply_() to prevent an IDE warning about reusing a
reserved built-in symbol.
2016-02-03 17:34:39 +01:00
Adrian Sampson
60888274c4
lyrics: Re-disable Genius backend
...
As #1854 pointed out, the Genius API service is down *again*.
2016-02-02 08:14:22 -08:00
Adrian Sampson
0aea7e398b
replaygain: Handle missing GStreamer data ( #1855 )
2016-02-02 08:08:58 -08:00
Diego Moreda
b8ec22ca34
edit: use action.RETAG, cleanup
...
* Make the edit plugin return action.RETAG when invoked during an
interactive import session, making the importer handle the writing of
the tags to the files (if needed) properly.
* Move the logic relative to the "reference field" to
_set_reference_field(), simplifying a bit the functions that depend on
this field.
* Hide the "edit Candidates" choice if no candidates are found.
2016-02-01 18:57:03 +01:00
Diego Moreda
30927a901f
Fix flake8 error
2016-01-29 19:54:23 +01:00
Diego Moreda
98abe69520
edit: invoke editor during importer, on Items
...
* Initial draft for invoking the edit plugin during an importer session.
* Add prompt choices for editing the original file tags ("eDit") and
apply a candidate and then edit ("edit Candidates").
* Modify plugin (_get_fields, apply_data, edit_objects) so "path" can be
used as a reference field instead of "id", as the Items are not still on
the database when the plugin is invoked via the importer.
* Modify ImportTask.manipulate_files() with a temporary flag for writing
the item tags even if ASIS was selected.
2016-01-29 17:09:12 +01:00
Diego Moreda
76d7c65c1b
replaygain: refine test by subclassing exception
...
* Subclass FatalReplayGainError into FatalGstreamerPluginReplayGainError
in order to handle gstreamer plugin errors more cleanly on
test_replaygain.
2016-01-26 22:20:42 +01:00
Diego Moreda
c12e974852
Merge remote-tracking branch 'upstream/master' into mbid
2016-01-19 21:58:10 +01:00
Diego Moreda
48c92fbf5a
Allow multiple MB ids to be passed to the importer
...
* Modify the "--musicbrainzid" argument to the importer so multiple IDs can be
specified by the user instead of a single one.
* Revise autotag.match.tag_album and autotag.match.tag_item signature to expect
a list of IDs (search_ids) instead of a single one (search_id), and add logic
for handling and returning multiple matches for those IDs.
* Update calls to those functions in other parts of the code.
2016-01-19 21:43:32 +01:00
Adrian Sampson
1866264732
Docsring for #1812
2016-01-15 10:10:56 -08:00
Guilherme Danno
20e4f5d209
Info plugin: add option to print only keys
2016-01-14 18:08:22 -02:00
Adrian Sampson
8cb545b779
Possibly fix #1805 : bytes headers for requests
2016-01-11 10:30:33 -08:00
Adrian Sampson
c7045daf90
sampsyo -> beetbox ( #1730 ) 🎉
2016-01-08 20:36:16 -08:00
Adrian Sampson
0301bb517d
Update links for our new domain
2016-01-08 16:26:13 -08:00
Adrian Sampson
635052e2ff
Fix #1804 : edit plugin moves files
2016-01-08 15:22:28 -08:00
Adrian Sampson
963a66a40c
Refactor try_sync to also include moving
...
This will remove a bunch of duplication we currently have for moving files
*inside the library directory* when their metadata changes.
2016-01-08 14:56:52 -08:00
Adrian Sampson
36ad0cf70d
lyrics: Re-enable genius backend ( #1770 )
2016-01-06 14:29:51 -08:00
nath@laptop
6e2b249c54
fix-typos: Write changelog
...
Also stealth-reformulate a recent comment of mine which contained
another (!) typo
2016-01-06 11:18:39 +01:00
nath@laptop
1e72ba75c7
play: Preserve backwards compat when fixing typos
2016-01-06 10:12:45 +01:00
nath@laptop
72056e8e07
play: Fix typo treshold > threshold:
...
We should warn users that the corresponding config key changed accordingly.
2016-01-06 09:21:37 +01:00
Ben Ockmore
c074ed37f1
Album is never present in user.getTopTracks, so this is now redundant
2016-01-04 17:36:30 +00:00
Ben Ockmore
e2a8bdb23d
Changed initial value of song variable to None, which is clearer
2016-01-04 17:33:03 +00:00
Ben Ockmore
0a6983b759
Replaced custom requests in fetch_tracks with pylast
...
Also changed from using the library.getTracks API method to user.getTopTracks, since Last.fm has broken the former.
2016-01-04 17:29:18 +00:00
Adrian Sampson
15fe43219e
Merge pull request #1793 from JesseWeinstein/fix_default_command
...
Fix default command in interactive_open
2016-01-03 14:25:27 -08:00
Adrian Sampson
04618f9aef
acousticbrainz ( #1787 ): Fix typos in keys
2016-01-03 14:17:39 -08:00
Adrian Sampson
4041c3ceb2
acousticbrainz ( #1787 ): Write tags
...
Now that we modify the built-in field, this is necessary.
2016-01-03 14:14:10 -08:00
Adrian Sampson
b44601176a
Merge pull request #1787 from opatel99/AcousticBrainzP2
...
AcousticBrainz: More features (autotag)
2016-01-03 14:12:07 -08:00
Jesse Weinstein
246afda9c4
Actually, push the job off on the caller
2016-01-03 13:07:27 -08:00
Ohm Patel
a1db349bf9
ABrainz: Variable parameters
2016-01-02 19:20:20 -06:00
Ohm Patel
b5f71a88e8
ABrainz: replace lambda with operator
2016-01-02 19:05:53 -06:00
Ohm Patel
e5c46cf6ac
PEP-8 Cleanup
2016-01-02 18:59:47 -06:00
Ohm Patel
39b565d8d8
Refactor JesseW's suggestions
2016-01-02 18:52:28 -06:00
Ohm Patel
1bb55c5c13
ABrainz: Used existing initial_key variable
2016-01-02 14:55:34 -06:00
Ohm Patel
4184f9dd13
ABrainz: Chords metadata from low_level
2016-01-02 12:03:07 -06:00
Ohm Patel
17dd7496a2
ABrainz: Added low-level data and updated docs
2016-01-02 11:33:19 -06:00
Diego Moreda
75636a2503
Merge branch 'master' of github.com:sampsyo/beets into prompthook
...
Conflicts:
docs/changelog.rst
2016-01-02 13:39:42 +01:00
Diego Moreda
9bba782e9c
mbsubmit: final style fixes ( closes #1779 )
2016-01-02 13:32:52 +01:00
Ohm Patel
c5f25429e9
ABrainz: Fixed docstrings and documentation
2016-01-01 18:29:36 -06:00
Ohm Patel
52de238076
ABrainz: Removed PEP8 Whitespace violation
2016-01-01 01:32:42 -06:00
Ohm Patel
82709f1c1b
ABrainz: Added more metadata for plugin to fetch and updated docs
2016-01-01 01:28:17 -06:00
Ohm Patel
26679f891e
ABrainz: Added acousticbrainz to autotagger and updated docs
2016-01-01 01:01:14 -06:00
Adrian Sampson
b0c94f4f47
Merge pull request #1785 from sampsyo/play-fix-cleanup
...
play: remove dead code, fix error catching
2015-12-31 14:38:04 -08:00
nath@laptop
775ac4ed83
play: Log exception from os call more accurately
...
Depending on raw or not, we do not necessarily play a 'playlist'. Use 'query' generically instead.
2015-12-31 21:49:03 +01:00
Adrian Sampson
aad2cf1feb
acousticbrainz: Log an error for missing data
2015-12-31 11:38:05 -08:00
Adrian Sampson
3a3dc8b3ae
acousticbrainz: Don't write tags
...
Since we aren't updating any on-disk tags anyway.
2015-12-31 11:35:14 -08:00
Adrian Sampson
5d89b7da67
acousticbrainz: Allow filtering on a query
...
Like other, similar commands.
2015-12-31 11:33:58 -08:00
Adrian Sampson
878161bb4f
acousticbrainz: Avoid re-parsing the JSON
2015-12-31 11:31:32 -08:00
Adrian Sampson
18e5b30d19
acousticbrainz: Handle requests errors
2015-12-31 11:29:57 -08:00
Adrian Sampson
eb2b081dfd
acousticbrainz: A bit more logging
...
This way, the command shows you that it's making progress.
2015-12-31 11:28:28 -08:00
Adrian Sampson
519f86fd3a
Merge pull request #1784 from opatel99/AcousticBrainzPlug
...
AcousticBrainz Plugin
2015-12-31 11:17:44 -08:00
Ohm Patel
ad57943819
Updated Copyright Year
2015-12-31 09:35:01 -06:00
Ohm Patel
6337b7ff08
Rename commands and files
2015-12-31 08:57:19 -06:00
Ohm Patel
5201e1cde7
Rename
2015-12-31 08:56:55 -06:00
nath@laptop
f685a59e71
play: remove dead code
...
This piece of code won't ever execute because interactive open terminates python execution
2015-12-31 13:51:18 +01:00
Ohm Patel
d15d7efbf4
ABrainz: Removed repeated portion of error message
2015-12-31 00:53:05 -06:00
Ohm Patel
ed6d9087a9
ABrainz: Added error catching and renamed to abrainz
2015-12-31 00:50:49 -06:00
Ohm Patel
59a1333732
ABrainz: Renamed danceable to dance to match five character attribute
2015-12-30 23:38:19 -06:00
Ohm Patel
9daa02b5b0
ABrainz: Added write for three attributes to metadata and easier
...
dictionary traversal format.
2015-12-30 23:34:56 -06:00
Ohm Patel
29e6cbedfe
ABrainz: Added copyright header, docstrings, and followed long line
...
standards.
2015-12-30 22:27:53 -06:00
Adrian Sampson
c0dde8da28
echonest: Fix capitalization in help text
2015-12-30 20:23:29 -08:00
Ohm Patel
ff81bbf8f5
ABrainz: Added first pass of plugin. Only prints MBID and response status code to console.
2015-12-30 22:03:50 -06:00
Diego Moreda
418ad58686
Merge remote-tracking branch 'upstream/master' into prompthook
2015-12-30 20:23:44 +01:00
Diego Moreda
798dd72bb6
mbsubmit: style fixes
2015-12-30 20:19:03 +01:00
Jack Wilsdon
12cd5306b7
Update copyright dates to 2016
2015-12-30 15:42:06 +00:00
Lachlan Charlick
0d16f764f2
fetchart: Tidier google backend configuration keys
2015-12-30 13:34:58 +10:30
Diego Moreda
8746869f7c
mbsubmit: cleanup, revise logic, config options
...
* Cleanup the "mbsubmit" plugin to remove a choice ("print tracks and skip")
and make the logic depend on the strength of the Recommendation.
* Add configuration options for the Recommendation threshold that triggers
the addition of the "Print tracks" choice and for the formatting string to
be used for printing the items.
* Include link to the official-ish MusicBrainz format page on the docstring.
2015-12-29 17:26:42 +01:00
Lachlan Charlick
7b273b4310
fetchart: PEP8 fixes
2015-12-29 17:29:17 +10:30
Lachlan Charlick
b017a750d8
Merge remote-tracking branch 'upstream/master' into fetchart-google
2015-12-29 16:00:19 +10:30
Adrian Sampson
a976c371f6
lyrics: Disable Genius backend by default ( #1770 )
2015-12-28 16:35:39 -08:00
Adrian Sampson
1a2ffd0426
lyrics: Catch errors in Genius backend ( fix #1770 )
...
The HTTP requests had no error handling. Now they have lots.
2015-12-28 16:32:28 -08:00
Lachlan Charlick
be64df6409
fetchart: Handle errors when parsing malformed JSON from google
2015-12-29 01:48:33 +10:30
Lachlan Charlick
2e10b8c284
fetchart: Pass config object to backends when initialized
2015-12-29 01:37:53 +10:30
Lachlan Charlick
03a41e82da
fetchart: minor google backend refactor
2015-12-29 00:02:41 +10:30
Lachlan Charlick
99fb656f52
fetchart: Remove some debug logging from google backend
2015-12-28 23:57:38 +10:30
Lachlan Charlick
deadc4d049
fetchart: Automatically disable google backend if no API key is set
2015-12-28 23:57:03 +10:30
Lachlan Charlick
b73cfb9f8d
fetchart: Fix typo in google API config key
2015-12-28 23:53:56 +10:30
Lachlan Charlick
ff15f4af9b
fetchart: Use config singleton rather than passing object to each backend
2015-12-28 23:42:11 +10:30
Lachlan Charlick
c14abe56a5
fetchart: Add new google backend using google custom search
...
Requires an API key from google similar to lyrics plugin.
Limited to 100 queries/day.
2015-12-28 23:16:12 +10:30
Adrian Sampson
b25b4db9e1
replaygain: Dodge possible encoding issues
...
In error reporting. May avoid the error in #1774 , but it's hard to find out
exactly what the Python types of these arguments are from the GStreamer
documentation.
2015-12-26 22:40:13 -08:00
Diego Moreda
6f8a1aa40a
Prompt event documentation and mbsubmit fixes
...
* Fixes for documentation of the prompt event (missing reserved letter, typos).
* Update sample mbsubmit plugin to conform to the new PromptChoice structure.
2015-12-16 19:26:39 +01:00
Diego Moreda
f5241f7c28
mbsubmit: update to style changes, remove comments
...
* Update mbsubmit plugin in order to use PromptChoice instead of the previous
ExtraChoice.
* Remove comments as they are now present on the pull request and documentation.
2015-12-15 20:15:42 +01:00
Diego Moreda
03dea7459e
Merge remote-tracking branch 'upstream/master' into prompthook
2015-12-15 16:30:51 +01:00
Adrian Sampson
7749cba00e
scrub: Demote a log message to debug
...
This seems unnecessary in the `beet scrub` output.
2015-12-12 18:29:49 -08:00
Adrian Sampson
d5c51dd816
scrub: Restore tags & art in auto mode ( #1657 )
2015-12-12 18:28:58 -08:00
Adrian Sampson
f5448d1531
scrub: Run on import in auto mode ( #1657 )
2015-12-12 18:20:05 -08:00
Adrian Sampson
5a285cc11f
Fix #1673 : Escape regex terms in lyrics
2015-12-12 18:09:24 -08:00
Adrian Sampson
d11fe020ce
snake_case variable names
2015-12-12 18:03:12 -08:00
Adrian Sampson
6f6794f560
Merge pull request #1706 from sampsyo/editor
...
Edit plugin
2015-12-12 18:00:25 -08:00
Adrian Sampson
5597313ea0
fetchart: Remove Google backend ( fix #1760 )
2015-12-12 16:47:00 -08:00
Adrian Sampson
3314db2f77
fetchart: Better logging for iTunes ( #1760 )
2015-12-12 16:44:55 -08:00
Diego Moreda
11f4add687
mbsubmit: add example mbsubmit plugin
...
* Add example "mbsubmit" plugin, which allows the user to print the tracklist
of an unmatched album during the import process in a format understood by
MusicBrainz track parser.
* The plugin listens for the before_choose_candidate event and appends the
track printing options depending on the task status (candidates and
recommendation).
2015-12-11 16:04:13 +01:00
Peter Kessen
f1f1288b30
Merge branch 'master' into editor
2015-12-02 21:35:33 +01:00
Adrian Sampson
a333777946
Merge pull request #1737 from diego-plan9/mbtracks
...
info plugin: Allow custom formatting and human-readable lengths
2015-11-26 10:31:12 -08:00
Diego Moreda
3cdcaa45a8
info: modify emitter output, clearer path handling
...
* Make emitters produce a pair (dict, Item), in order to preserve the output
at print_data (dict is used if no custom format is specified, Item otherwise).
* Simplify the handling of the paths, printed at the top of print_data. The
path key is removed from the dict entirely and fetched from the Item.
2015-11-26 15:55:00 +01:00
Diego Moreda
ca63311101
info: revert human_length changes 2
...
* Remove human_length parameter from print_data()
2015-11-25 17:36:51 +01:00
Diego Moreda
83279ebe5b
info: revert human_length changes
...
* Remove human length changes from the plugin and the tests, as they will
eventually be handled at a higher level.
2015-11-25 16:06:19 +01:00
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
c90ca1096c
fetchart: Log reasons for rejecting art
2015-11-23 17:30:09 -08:00
Adrian Sampson
1d0984a294
Slight log rewording
2015-11-21 12:54:50 -08:00
Adrian Sampson
eb68177fee
Fix #1735 : convert --pretend encoding error
2015-11-21 12:40:45 -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
69ffb83453
Eliminate some copypasta
2015-11-19 16:26:27 -08:00
Adrian Sampson
f995ab38db
Fix a test and a bug revealed by a test
2015-11-19 16:11:45 -08:00
Adrian Sampson
437959018c
Pass through certain "safe" types to YAML
...
This avoids some round-tripping problems with types (such as ScaledInt) that
are not represented in strings with 100% fidelity. It also makes the syntax
nicer when editing numbers and booleans: they no longer appear to be
needlessly surrounded by quotes in the YAML.
2015-11-19 16:07:20 -08:00
Adrian Sampson
0e20770cc3
Convert YAML keys and values back to strings
...
I hadn't quite realized before that the user could also change the *keys* to
be non-strings too! This also prevents against that by just reinterpreting
everything as strings.
2015-11-19 15:38:20 -08:00
Adrian Sampson
0873d31419
Catch unexpected YAML type
...
We need a sequence of dictionaries back; validate this assumption.
2015-11-19 15:34:49 -08:00
Adrian Sampson
3176b83cd7
Use type-based formatting and parsing
...
All editable values are now strings and are parsed from strings. This closely
matches the behavior of the `modify` command, for example.
2015-11-19 15:25:49 -08: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
Adrian Sampson
775a48eb28
--extra/-e is now --field/-f
2015-11-17 14:40:52 -08:00
Adrian Sampson
b33d25a0ad
--extra option can use any field
...
Not just the built-in fields.
2015-11-17 14:39:40 -08:00
Adrian Sampson
f68dc4652a
Fix a typo
2015-11-17 13:14:15 -08:00
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
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
Peter Kessen
ecbd337c47
Added file encoding definition to badfiles.py
2015-11-15 14:51:12 +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
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
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
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
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
9165b7cf45
Trailing comma ( #1708 )
2015-11-08 13:02:07 -08:00
Diego Moreda
1c09eeb714
edit: delete temporary files, minor style fixes
...
* Delete NamedTemporaryFiles once they are not needed on several functions
(change_objs(), vimdiff(), html()).
* Fix use of reserved word "id" on same_format().
* Colorize "really modify" prompt with action_default.
2015-11-08 19:37:10 +01:00
Manfred Urban
57faf015d9
Adapted va_name in other files
2015-11-08 17:28:55 +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
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
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
331ced3cca
Use existing query mechanism
2015-11-07 12:51:22 -08:00
Adrian Sampson
417eb5e588
Remove use of nonexistent option
2015-11-07 12:46:35 -08:00
Adrian Sampson
519df6da04
Use standard output format for confirmation
2015-11-07 12:45:39 -08:00
Adrian Sampson
7de33c83c4
Remove an unused parameter
2015-11-07 12:39:31 -08:00
Adrian Sampson
fefb2e9914
A little cleanup for legibility and style
2015-11-07 12:36:22 -08:00
Adrian Sampson
7413e17782
Merge pull request #1692 from kooimens/patch-2
...
Discogs: change album artist to musicbrainz naming
2015-11-06 13:01:23 -08:00
kooimens
414ae131a5
Fix style error
2015-11-06 19:27:36 +01:00
jmwatte
f95611dde4
fixed albumid needs to be int
2015-11-05 16:51:33 +01:00
jmwatte
17a32e33c5
added grouping of fields and "$BROWSER" and "$EDITOR"
2015-11-05 15:41:33 +01:00
jmwatte
51658a7ea6
Merge branch 'editor' of https://github.com/jmwatte/beets into editor
2015-11-05 15:18:46 +01:00
jmwatte
ab3bc356b2
updateMerge branch 'master' of https://github.com/sampsyo/beets into editor
2015-11-05 15:13:07 +01:00
kooimens
da0360bd90
Update discogs.py
2015-11-05 14:50:40 +01:00
Adrian Sampson
7d52fa72ae
Fix #1699 : Outdated API call
...
get_fields() was removed in 5420599839 .
2015-11-04 20:25:17 -08:00
Adrian Sampson
19cf37263d
Fix #1700 : Tolerate missing Location in iTunes
2015-11-04 20:11:58 -08:00
Adrian Sampson
be49955884
metasync: More precise exception catching ( #1700 )
2015-11-04 20:07:49 -08:00
reiv
81a72f74c9
Merge branch 'master' into 314-reimport-art
2015-11-04 18:37:06 +01:00
reiv
0ebc4c799d
fetchart: in auto, ignore albums with art
...
When re-importing an album, we don't want fetchart to interfere
with any existing album art.
2015-11-04 15:08:42 +01:00
Adrian Sampson
a735a6b4a2
discogs: Better exception logging
...
Might have helped diagnose #1669 more easily.
2015-11-03 22:38:31 -08:00
Adrian Sampson
023a33ca31
Revert "Fix #1656 , maybe: encode Discogs token strings"
...
This reverts commit f784cd1a22 .
2015-11-03 22:29:33 -08:00
kooimens
2293e1e09d
Discogs: option to change 'various' album artist to 'Various Artists' (Musicbrainz naming)
...
Just a simple config option to change 'various' album artist to the one that MusicBrainz uses: Various Artists.
2015-11-03 20:03:24 +01:00
jmwatte
1f3a42faf0
Update edit.py
2015-11-03 14:57:07 +01:00
jmwatte
5a8a534a3f
Delete yamleditor.py
2015-11-03 14:05:06 +01:00
jmwatte
00b21dfa51
Merge branch 'editor' of https://github.com/jmwatte/beets into editor
2015-11-03 13:59:38 +01:00
jmwatte
2d77861e4d
renamed and updated editplugin
2015-11-03 13:55:08 +01:00
Adrian Sampson
38edb18a74
Merge pull request #1683 from sampsyo/1264-unnecessary-resize
...
Fix #1264 : Avoid unnecessary art resizes
2015-11-02 22:39:06 -08:00
reiv
1625dfc17e
Merge branch 'master' into 1264-unnecessary-resize
2015-11-03 02:46:33 +01:00
reiv
19dcc25a93
fetchart: Improve validation of image dimensions
...
This avoids images being resized unnecessarily if the dimensions
are correct.
2015-11-03 02:19:47 +01:00
Adrian Sampson
d79d11fb15
Docstring and rewrap for #1675
2015-11-02 16:45:45 -08:00
Adrian Sampson
e84414c822
Fix syntax (and unused variable) in #1675
2015-11-02 16:44:02 -08:00
Adrian Sampson
efcea9a57f
Merge pull request #1675 from kooimens/patch-1
...
Embedart: remove_art_file on import
2015-11-02 16:42:59 -08:00
kooimens
bcef3a7123
Create function remove_artfile
...
Damn it, that was really hard for me:D. First time seriously using python. Please review it carefuly.
2015-11-02 23:56:38 +01:00
jmwatte
fdbf9e59e7
Update yamleditor.py
...
polishing
2015-11-02 23:11:42 +01:00
jmwatte
fe012eae77
new plugin yamleditor
2015-11-02 21:13:58 +01:00
Adrian Sampson
a18506f471
Fix #1686 : thumbnails using unicode paths
2015-11-02 11:03:43 -08:00
reiv
db08896d8c
fetchart: add docstring to helper function
...
_is_valid_image_candidate() now has three different return values.
These are documented here.
2015-11-02 03:04:45 +01:00
reiv
9182fd8f04
PEP8 amendments
2015-11-01 16:20:48 -08:00
reiv
3250fa80ae
fetchart: Only resize when necessary
...
Fixes #1264 : When a re-import triggers fetchart, the existing album art is no
longer resized if it already has the correct dimensions. This avoids creating
new album art files with unique filenames ("cover.n.jpg").
2015-11-01 16:20:18 -08:00
reiv
269d0e5403
fetchart: Check if album art file actually exists
...
Fixes #1126 .
2015-11-01 16:14:51 -08:00
Adrian Sampson
c617033476
convert: Add some comments
2015-11-01 11:01:40 -08:00
Adrian Sampson
5f5a8946c3
convert: Debug log when embedding images
...
To help diagnose #1671 .
2015-10-30 15:25:01 -04:00
kooimens
0257b1077f
Simplify some code
2015-10-30 17:49:57 +01:00
kooimens
0ed98515ad
Embedart: remove_art_file on import
...
Should fix #1662 .
I think the fix is easy. Don't know if it's clean though. Did some tests (+/- 10 albums), all successful. This is the first time I'm using python so please let me know what I should improve:)
2015-10-30 17:04:11 +01:00
Adrian Sampson
16ad174d29
A debug message for ReplayGain
2015-10-29 17:43:31 -04:00
Frederik “Freso” S. Olesen
5f5365021d
lastgenre: Clean up Spanish reggae in the genre list.
...
* Add missing subgenres to whitelist and tree.
* Use proper terminology.
* Add English term as child of Spanish one.
Source: https://en.wikipedia.org/wiki/Reggae_en_Espa%C3%B1ol
2015-10-29 05:00:33 +01:00
Frederik “Freso” S. Olesen
1aa808f37b
lastgenre: Add raggamuffin.
...
Already recognised by the genres.txt whitelist, and is a more proper
term for `ragga`.
https://en.wikipedia.org/wiki/Ragga
2015-10-29 04:58:44 +01:00
Frederik “Freso” S. Olesen
1678c1d847
lastgenre: Replace top-level genre ska with reggae…
...
… and move relevant genres from the tree to be children of the `reggae`
top-level genre as well as add `roots reggae` to the list.
See discussion at https://github.com/sampsyo/beets/issues/1661
2015-10-29 04:55:57 +01:00
Frederik “Freso” S. Olesen
b187251a7e
lastgenre: Remove dance hall and polish reggae.
...
Neither of the two are recognised in the genres.txt whitelist.
2015-10-29 04:53:14 +01:00
Frederik “Freso” S. Olesen
004fb7d1c8
lastgenre: Fix up ragga jungle.
...
* Move `ragga jungle` to beneath `oldschool jungle`.
* Remove `ragga-jungle` which isn't recognised by the genre whitelist.
https://en.wikipedia.org/wiki/Ragga_jungle
2015-10-29 04:44:15 +01:00
Adrian Sampson
f784cd1a22
Fix #1656 , maybe: encode Discogs token strings
2015-10-24 12:07:40 -07:00
Alex Nerten
a4ae7fa891
Update plexupdate.py
...
Fix #1649
2015-10-19 15:24:59 +03:00
Adrian Sampson
000487c757
Merge pull request #1639 from sadatay/genius_lyrics
...
Add Genius as a lyric source
2015-10-17 14:51:01 -07:00
Adrian Sampson
8c35a24073
zero: Check for conflicts only once ( #1641 )
...
The old version would trigger the warning twice.
2015-10-17 14:39:53 -07:00
Joe LaSala
3ab9932059
Add Genius as a lyric source
...
Makes use of the Genius API and genius-api.com, a separate resource that
provides readable lyrics.
2015-10-13 19:14:08 -05:00
Adrian Kowalski
d180d42ddb
Fix flake8 complaint about line length
2015-10-12 09:50:12 +02:00
Adrian Kowalski
da655534ae
Change function name and correct documentation style
2015-10-12 09:39:20 +02:00
Adrian Kowalski
158486319f
Improve code quality, separate shared logic into functions
2015-10-09 21:23:59 +02:00
Adrian Kowalski
9f51e46bae
Add whitelist feature to zero plugin
2015-10-09 18:41:42 +02:00
Aaron Cruz
5fd836b173
Remove yaml keys without sublists
2015-10-07 12:15:09 +02:00
Adrian Sampson
3475b91c00
Remove unused import
...
Oops. I was trying to use shlex.quote, but that's Python 3.3+.
2015-09-30 10:32:37 -07:00
Adrian Sampson
2607bee997
Tiny fixes for play
2015-09-30 10:11:17 -07:00
Peter Kessen
6993449602
removed deprecated checko for mtime!=None
2015-09-30 16:40:30 +02:00
Jack Wilsdon
55bd513278
Remove completed TODO comments
2015-09-12 02:17:06 +01:00
Jack Wilsdon
417a724e42
Remove unused sys import and use correct platform encoding
2015-09-12 02:15:11 +01:00
Jack Wilsdon
0dff24eb96
Move Popen call to a single line
2015-09-12 02:14:33 +01:00
Jack Wilsdon
ae2ff6185f
Use default stdout and stderr streams for hook processes
2015-09-12 02:09:19 +01:00
Jack Wilsdon
8b7af7fe23
Fix indentation for wrapped method call
2015-09-11 18:38:30 +01:00
Jack Wilsdon
8fea1e65c5
Add logging for hook plugin
2015-09-11 18:11:24 +01:00
Jack Wilsdon
2d0c217252
Improve the way substitute_args is iterated
...
Iterate substitute_args instead of kwargs, as we
ignore anything that is not in substitute_args
already.
Fix an issue where a hook argument containing
non-ascii characters caused an exception.
2015-09-11 15:19:51 +01:00
Jack Wilsdon
88ece413f3
Add Hook plugin to run commands on events
...
This plugin allows users to execute scripts on
different events, as well as forward any
arguments from the events to the script.
2015-09-11 04:49:50 +01:00
Adrian Sampson
c7603fcbd5
Merge pull request #1595 from jackwilsdon/add-plex-library-config
...
Add `library_name` configuration property to PlexUpdate plugin (fixes #1572 )
2015-09-09 19:41:34 -07:00
Adrian Sampson
225ba282cd
Fix #1592 again: wrap title_gain in handler
2015-09-08 12:07:03 -07:00
Jack Wilsdon
764fcc6b4c
Add library_name configuration property
2015-09-08 12:48:24 +01:00
Adrian Sampson
b41259623d
Merge pull request #1577 from nathdwek/play-warn-tresh
...
play: make the many files warning configurable
2015-09-07 14:39:05 -07:00
Adrian Sampson
2140bb27a3
Fix #1592 : unhandled exception in PyAudioTools
2015-09-07 14:15:46 -07:00
Jack Wilsdon
64e33b2d9a
Remove unused import
2015-09-07 01:55:44 +01:00
Jack Wilsdon
38926caebe
Reset album art to None when removed
2015-09-07 01:52:03 +01:00
Jack Wilsdon
9eb4fc530b
Wrap line to ensure it is less than 80 characters
2015-09-06 21:53:34 +01:00
Jack Wilsdon
420b0724a0
Add remove_art_file configuration property
2015-09-06 21:45:15 +01:00
nath@home
ff4fda1bb5
play: make the many files warning configurable
...
The warning_treshold key in the play configuration defines the
minimum number of file before a warning is issued (default 100).
A zero value means no warning is ever issued.
This is the first commit for this feature, and this should fully
implement it.
2015-09-03 22:19:51 +02:00
Adrian Sampson
854a4539cb
Fix #1588 : fetchart gets PNGs, not GIFs
2015-09-02 12:45:35 -07:00
nath@home
b9bc06d9d8
play-raw: Rename the command target:
...
passed_to_command -> open_args
2015-09-01 23:42:43 +02:00
nath@home
9c663432bd
Refactor util/interactive_open: multiple targets
...
interactive_open should now be invoked with at least the list of
targets and optionally the command to open the targets with.
This allows beets-play to pass multiple file paths directly to
the configured command.
The changes to the existing invocations are pretty trivial in
order to comply to this refactor.
2015-09-01 23:42:42 +02:00
nath@home
4eb563a08c
pep8: Correct camelCase to snake_case
2015-09-01 23:42:42 +02:00
nath@home
a23c5d4f67
play-raw: Call vlc with one file par arg
2015-09-01 23:42:42 +02:00
nath@home
18d5c3b0a0
play-raw: Add the option to play the raw queried pathes
...
I slightly rewrote the play plugin in order to improve
the readability and to introduce the "raw" play config
option which makes beet simply pass a list of pathes
to the play command rather than a playlist.
2015-09-01 23:42:42 +02:00
Adrian Sampson
e32744a66a
Fix extra parameter introduced for #1581
2015-08-30 11:55:06 -07:00
Adrian Sampson
9ce49b7ef0
fetchart: Do not emable Wikipedia by default
...
Because DBpedia seems to be down (it's responding very slowly with errors),
this seems like a good defensive action. It narrows the default sources to
those that resolve quickly, with only a couple of HTTP requests. We can
re-enable this again in the future if things seem to stabilize over at
DBpedia.
2015-08-29 12:52:57 -07:00
Adrian Sampson
e249fcb06f
fetchart: Fix #1581 , splitting in Wikipedia source
2015-08-29 12:45:10 -07:00
Adrian Sampson
b5cb4e4cc4
Slightly more efficient image streaming
2015-08-29 12:41:54 -07:00
Adrian Sampson
3d20f25f06
fetchart: Fix bungled Requests API
2015-08-29 12:27:37 -07:00
Adrian Sampson
75e810409b
fetchart: Use a mixin for even more logging
2015-08-29 12:13:28 -07:00
Adrian Sampson
608e4ffbef
fetchart: Lots more logging
2015-08-29 11:59:46 -07:00
Adrian Sampson
2b1d7fc3aa
fetchart: Logging, naming, remove unused option
2015-08-29 11:31:59 -07:00
Adrian Sampson
f899ed93ac
lastimport: Log error responses
...
For debugging #1574 .
2015-08-24 11:09:45 -07:00
Adrian Sampson
cde509a638
Merge pull request #1570 from fxthomas/badfiles
...
Badfiles: Easier default configuration, docs update and color output
2015-08-16 09:27:08 -07:00
Adrian Sampson
759c79c426
play: Insert arguments anywhere ( #1532 )
2015-08-16 09:23:09 -07:00
François-Xavier Thomas
c54105d272
badfiles: Fix unicode error on some queries
2015-08-15 15:37:47 +02:00
François-Xavier Thomas
ded73354a9
badfiles: Added color output
2015-08-15 15:19:04 +02:00
François-Xavier Thomas
e8cb1241f5
badfiles: If not configured, use default checkers
2015-08-15 14:39:37 +02:00
François-Xavier Thomas
27075ea037
badfiles: Fixed weird use of sum
2015-08-15 14:39:35 +02:00
Adrian Sampson
ecf677ae41
Reorganize up some badfiles documentation
2015-08-14 20:50:29 -07:00
Adrian Sampson
c756b3eedb
badfiles: Clean up for beets style
...
Use {} formatting, 80 character wrap, ___future__ imports.
2015-08-14 20:37:36 -07:00
Adrian Sampson
82484be232
Add badfiles plugin as-is
2015-08-14 20:32:19 -07:00
Adrian Sampson
ab7e9d4db2
Simplify #1532 : CLI only, append to end
2015-08-14 19:52:49 -07:00
Adrian Sampson
7b6c773a3f
Cleanup for #1532
2015-08-14 19:44:11 -07:00
Adrian Sampson
217a8126bc
Merge pull request #1532 from pheerai/play_opt_arg
...
Added optional argument for play-plugin
2015-08-14 19:23:34 -07:00
Adrian Sampson
4038f191da
Fix #1564 (regression from #1559 )
2015-08-08 11:23:55 -07:00
Oliver Rümpelein
94258110a7
Forgot to remove an if-statement.
2015-08-03 17:01:56 +02:00
Oliver Rümpelein
69377291ff
Try to fix TravisCI-errors.
2015-08-02 21:08:44 +02:00
Oliver Rümpelein
d05e251a14
Merge branch 'master' into play_opt_arg,
...
to make AppVeyor-builds possible.
2015-08-02 20:51:26 +02:00
Oliver Rümpelein
90bb4081fe
Implemented --args-feature
...
* as discussed in #1532 , with args-parameter, and optionally
inserted config-key
* updated changelog/docs
2015-08-02 20:44:56 +02:00
Adrian Sampson
96c5121f65
Documentation for #1555/#1556
2015-08-01 15:00:13 -07:00
Ben Ockmore
4818264a36
Added TypeError to the list of caught exceptions in fetachart._fetch_image
...
requests/urllib3 is throwing an exception due to an internal problem triggered
by some sort of timeout. This change catches the TypeError so that beets
reports "error fetching art" instead of crashing when this happens.
2015-08-01 16:50:59 +01:00
Oliver Rümpelein
5f9068cb50
Implemented Idea 2 from #1532
...
* New argument `--optargs` reads string from option
* If "{}" is present in the given string, the `optargs`
from config-file get inserted at that point.
2015-08-01 13:55:17 +02:00
Sven Oos
74f58e7b3c
Bugfix:
...
Items had not been filtered. Converting the tags' weight into an integer solves it.
2015-08-03 23:46:50 +02:00
Adrian Sampson
7d55126070
Merge pull request #1397 from multikatt/ipfs
...
Ipfs plugin
2015-08-02 18:39:55 -07:00
Adrian Sampson
f6ecbf659f
Silly oversight in fix for #1551
2015-07-28 22:39:53 -07:00
Adrian Sampson
ebf98d7bf0
duplicates: Avoid Unicode-to-bytes comparison
...
Fix #1551 .
2015-07-28 22:36:27 -07:00
Adrian Sampson
5420599839
New all_keys() method on dbcore.Model
...
Rather than the ad-hoc one on library classes. This also avoids some confusing
duplication in the `beet fields` output, at the cost of turning off the plugin
distinction.
2015-07-28 22:27:43 -07:00
David Logie
71d3be238b
zero: optionally update tags in the database.
2015-07-21 16:54:23 +01:00
Adrian Sampson
493fbab1a5
replaygain: Fix #1518 , GStreamer missing plugins
2015-07-06 16:23:04 -07:00
Oliver Rümpelein
3b6373541a
Fixed Errors indicated by travis-ci
...
See https://travis-ci.org/sampsyo/beets/jobs/69335554
2015-07-05 15:00:46 +02:00
Oliver Rümpelein
3b2c3a5b31
Renamed options, corrected small typos.
2015-07-02 20:46:10 +02:00
Oliver Rümpelein
0a995c218a
Added optional argument for play-plugin
...
* New config key "play -> optargs"
* New Subcommand argument "-o", "--optargs"
* Set position using "{}" within "play -> command"-string
2015-07-02 20:25:54 +02:00
Kylie McClain
c7cdadfd49
fetchart: Use text_highlight_minor for color rather than text_success
2015-06-22 02:15:49 -04:00
Kylie McClain
b8d6c37fec
fetchart: Use success coloring if album art is found
2015-06-19 20:36:50 -04:00
multikatt
cdef5fd473
Speed up import
2015-06-11 01:19:09 -04:00
multikatt
4d0d1ebc7a
Dont refetch already existing libs
2015-06-11 00:08:01 -04:00
multikatt
10bf15da1d
Adding logs
2015-06-11 00:06:48 -04:00
multikatt
2105fb9e1f
Rename argument lib to album in ipfs_add()
2015-06-10 11:32:55 -04:00
multikatt
8ad22749ea
Unset item.id to avoid double add items to albums
...
This hugely improves publishing times
2015-06-10 11:09:56 -04:00
Adrian Sampson
ce91a0c929
keyfinder: Fix #1502 (unicode paths)
2015-06-09 16:34:02 -07:00
multikatt
15f17116c5
Dont readd albums to ipfs
2015-06-07 17:38:31 -04:00
multikatt
0fa02519a7
Adding auto add support
2015-06-07 16:55:36 -04:00
David Logie
85ffe444dc
mpdupdate: Improve error message
...
When beets can't connect to mpd, display the underlying error instead of
dying with an ugly exception.
2015-06-05 11:45:38 +01:00
Ed Carroll
865fb0a25f
Updated docs and changelog
...
Updated the append function to be a bit safer when adding the token
parameter. Updated docs and changelog
2015-06-04 10:48:38 +01:00
Ed Carroll
1db1edfb42
Fixed line lengths
2015-06-04 01:33:17 +01:00
Ed Carroll
b7d75e1d18
PlexUpdate plugin updated for Plex Home
...
PlexUpdate plugin updated to allow Plex Tokens to be provided with the
server details so that beets can update a Plex library that requires
authentication.
2015-06-04 00:49:17 +01:00
multikatt
f64df80974
Catch failed folder creation
2015-06-03 08:08:02 -04:00
multikatt
163b049f41
Tidying up
2015-06-02 23:02:00 -04:00
multikatt
5c3459e2a6
Make create_new_album a new function
2015-06-02 22:23:38 -04:00
Fabrice Laporte
72075dde5d
fix #1490 don't overwrite basename argument
2015-06-02 22:12:00 +02:00
multikatt
fe29397fcc
typo
2015-06-01 22:54:25 -04:00
multikatt
0f0329abb9
Add --play flag
2015-06-01 22:47:04 -04:00
multikatt
46202a3cf0
Properly add albums to published library
2015-06-01 22:45:49 -04:00
multikatt
0fcea289f7
Log notification
2015-05-31 20:46:07 -04:00
multikatt
4f3a228a23
Use beets.util.command_output instead of subprocess
2015-05-31 20:45:39 -04:00
multikatt
9771d899db
remove dulicate ui.decargs
2015-05-31 20:17:05 -04:00
multikatt
4dc3299dc8
Fix E226
2015-05-31 01:47:09 -04:00
multikatt
5bb976d8f4
Better error handling when theres nothing imported
...
yet
2015-05-31 00:46:43 -04:00
multikatt
a80b402f2f
-l actually queries the libraries
2015-05-31 00:46:06 -04:00
multikatt
d0dc2014f6
typo
2015-05-31 00:35:56 -04:00
multikatt
d3ec311721
Dont fail if theres no imported albums
2015-05-31 00:32:03 -04:00
Adrian Sampson
90178ab380
Always log a template literal ( fix #1481 )
...
Otherwise, we risk the user-provided string looking like a format string! If
it contains curly braces, it can behave unexpectedly.
2015-05-28 23:44:41 -04:00
Adrian Sampson
3b43b78b67
Merge pull request #1479 from glogiotatidis/flagsfix
...
[convert] Fix dest and format flags help text.
2015-05-25 11:34:51 -07:00
Pedro Silva
3be593693d
add merging functionality to duplicates plugin
...
This patch depends on %aunique not being present in config.paths
for behavior as intended.
The logic surrounding moving/copying a track from a duplicated album to
the original one could probably be extracted out and put into
library.Album.
This is based on the ordering imposed by the tiebreaking facility
introduced in 6be98b0a36 . Once a natural
duplicate ordering is in place, then the strategies for merging are:
Items:
Iterate through each available field:
Iterate through each duplicate:
If current duplicate has a field not set in the original, set it there
Break
Albums:
Iterate through each duplicate:
Iterate through each item in duplicate:
If current item is not present in original, copy it there
Continue
2015-05-25 18:12:06 +02:00
Giorgos Logiotatidis
4a8f978f4c
[convert] Fix dest and format flags help text.
2015-05-25 14:37:38 +03:00
Old T. Man
acd0a902bb
Fix search term encoding.
2015-05-23 13:19:28 -06:00
Adrian Sampson
07242f65e2
Convert always uses bytestring args ( #1461 )
2015-05-19 16:38:08 -07:00
Tom Jaspers
a7eace81d4
fetchart: improve Wikipedia art source
...
Artists with non-typical casing (e.g., alt-J, dEUS) would not get matched on
DBPedia, as the RDFS:label uses arbitrary casing, and SPARQL provides only exact
matches. The FOAF:name attribute is always title-cased (e.g., Alt-J, Deus).
Due to a bug in DBPedia, the cover filename is truncated when it contains
parentheses, (e.g., 'Foo bar (band).jpg' gets truncated to 'Foo bar .jpg').
To work around this, an additional Wikipedia call gets made for all its
images, in which we try to match our truncated image.
The Wikipedia art source now catches the correct exceptions, instead of
a broad catch-all.
Wikipedia album images can be gifs, so these are now added to the list of
accepted content types.
2015-05-19 09:57:54 +02:00
Tom Jaspers
a82dee35cb
fetchart complains if no imaging backend available
...
The `enforce_ratio` and `minwidth` options depend on PIL or ImageMagick.
Previously it silently fails. Now it will log a warning, and accept the
image.
Tests concerning these options are skipped when no imaging backend is available.
Fix #1460
2015-05-18 19:44:40 +02:00
Pedro Silva
0377510522
handle albums during default attribute set completeness sorting
2015-05-17 23:56:10 +02:00
Pedro Silva
684f4deadc
fix typo during tagging: option -t now actually works
2015-05-17 15:01:48 +02:00
Pedro Silva
6be98b0a36
add tiebreaking facility
2015-05-16 19:25:47 +02:00
multikatt
b336e5f195
Get remote albums from query
2015-05-15 15:48:07 -04:00
multikatt
b123e8259d
Remove implemented TODO comment
2015-05-15 14:14:29 -04:00
multikatt
0c596fd163
Break out query into its own function
2015-05-15 14:13:01 -04:00
multikatt
a091f9e71a
Add support for naming remote libraries
2015-05-15 13:25:50 -04:00
multikatt
4109d825d1
Clearing local paths from published libs
2015-05-15 11:51:18 -04:00
Pedro Silva
834418de6d
fix #1457 : enforce correct config typing
2015-05-15 11:48:27 +02:00
multikatt
3990ac185e
adding list command, listing remote albums
2015-05-15 00:34:52 -04:00
multikatt
8cb262cbd1
Join all remote libraries albums into a single lib
2015-05-15 00:20:58 -04:00
multikatt
538a99599e
Put all remote libs in a directory
2015-05-14 22:54:55 -04:00
multikatt
17e81b6d6c
strip newlines from lines
2015-05-14 20:18:28 -04:00
multikatt
7927cb5f47
remove unused variable
2015-05-14 19:34:15 -04:00
multikatt
b3011fed6e
Only publish albums/items added to ipfs
2015-05-14 19:05:22 -04:00
multikatt
835e58fa16
Add right files when adding folders with[...]
...
non music files.
2015-05-14 18:34:23 -04:00
Adrian Sampson
71d7c0b004
Merge pull request #1450 from tomjaspers/metasync-itunes
...
MetaSync: more OO structure + iTunes support
2015-05-13 15:04:36 -07:00
Tom Jaspers
94edc7a2a4
MetaSync: minor improvements for iTunes source
...
- Use path as an key to find items (over artist/title/album tuples)
- Sensible default library location
2015-05-13 20:02:34 +02:00
Tom Jaspers
02bec1bdd7
MetaSync: Remove auto-discovery of sources
...
In favor of simpler, hard-coded, list of sources, to avoid unneccesary magic.
Also: check to see if query has results before instantiating the meta sources
2015-05-13 11:01:52 +02:00
multikatt
56d671745c
Add support for importing remote libraries
2015-05-11 16:51:00 -04:00
multikatt
7be8765ee3
pep8
2015-05-11 15:59:23 -04:00
multikatt
da344c84fd
Support for publishing library
2015-05-11 15:58:50 -04:00
multikatt
db641dccf2
Change print to self._log
2015-05-11 15:56:12 -04:00
multikatt
a3990e0b62
remove non empty directories
2015-05-11 15:33:45 -04:00
multikatt
b08ccb5d37
saving ipfs hashes in database
2015-05-11 15:27:03 -04:00
David
36bf49aa8d
typo: thumnails -> thumbnails
2015-05-11 14:26:49 -04:00
Tom Jaspers
abd02052b9
MetaSync: small refactoring + enhancements
...
- `sync_data` -> `sync_from_source`
- properly catch ConfigValueError
- avoiding iterating through library if we couldn't instantiate any meta sources
- fix create_temporary_copy to actually make a tempdir
2015-05-10 14:44:37 +02:00
Tom Jaspers
bba8647bac
MetaSync: rename 'cls' variable to '_cls'
2015-05-09 12:22:51 +02:00
Tom Jaspers
cb13d21ad6
MetaSync: automatic load of sources and item_types
...
- MetaSources get loaded from the modules automatically
- The MetaSources can define their own item_types, that get loaded for the plugin
- __init__ doesn't need any changes to accept new metasources
- Fix the --sources option to actually accept sources
(it was being interpreted as boolean flag before, crashing the plugin)
- More safety w.r.t. external dependencies
2015-05-09 11:31:39 +02:00
Tom Jaspers
de5db7068b
MetaSync: sources need to subclass MetaSource
...
- allows for the logging to integrate better
- renamed `get_data` to `sync_data`, to better reflect that its not returning anything,
but that the item's data is being set by the function
2015-05-08 16:48:38 +02:00
Adrian Sampson
c856326865
Fix #1449 : Unicode paths in permissions
2015-05-06 22:23:18 -07:00
Tom Jaspers
3dc2beda41
MetaSync: add iTunes synchronization
...
Uses plistlib to read a temp copy of `iTunes Library.xml`
2015-05-06 22:01:00 +02:00
Cody Reichert
b776a71a8c
handle mpdstats update_rating when item is None / add appropriate tests
2015-04-28 23:23:27 -05:00
D Andrew Reynhout
c9380abc3b
Test config opt import/write before embedding art ( fixes #1427 )
2015-04-23 15:43:56 -04:00
Heinz Wiesinger
c50d59f7e7
Rename metadata sync plugin.
2015-04-18 14:02:51 +02:00
Heinz Wiesinger
73fcbd07c3
Load metadata sync plugins dynamically.
2015-04-18 14:02:51 +02:00
Heinz Wiesinger
65307b410c
Fix issues with unicode and unplayed tracks when syncing data with amarok.
2015-04-18 14:02:51 +02:00
Heinz Wiesinger
5e43b07128
Initial version of a plugin that syncs metadata from other applications.
2015-04-18 14:02:51 +02:00
Bruno Cauet
d134ad922d
Discogs: add API errors to CONNECTION_ERRORS
...
This avoids potential crashes when DiscogsAPIError is not explicitely
caught.
Relates to #1417 .
2015-04-17 17:32:42 +02:00
Adrian Sampson
b313c8b46a
fuzzy: Fix #1422 , regression crasher
2015-04-15 19:46:31 -07:00
Adrian Sampson
46f382fd9b
importadded: Fix in-place singleton imports
...
Fixes #1416 .
2015-04-14 11:45:20 -07:00
Adrian Sampson
0507f80fcd
discogs: Handle errors on auth setup ( fix #1417 )
2015-04-14 10:26:39 -07:00
jmwatte
c834599b42
fix regex
2015-04-13 10:46:47 +02:00
Adrian Sampson
7372ad4831
replaygain: Log bs1770gain invocations
...
For clearer debugging in #1398 .
2015-04-12 23:01:44 -07:00
Adrian Sampson
ab78eed02e
replaygain: Avoid suppressing debug output ( #1398 )
...
This was suppressing debug output even with `beet -vv import`. This also avoid
registering an import hook when auto is disabled.
2015-04-12 22:59:48 -07:00
Adrian Sampson
9c7b8d22ca
Catch empty output list in bs1770gain ( fix #1398 )
...
This should catch the original crash that brought this all up.
2015-04-10 09:01:13 -07:00
Adrian Sampson
6fcd88bc31
More precise comment for #1398
2015-04-10 08:53:54 -07:00
jmwatte
7128340385
fix no-PREFIX for long window-paths
2015-04-10 09:26:56 +02:00
Adrian Sampson
821c5bf3df
Documentation pass for #1398
2015-04-09 17:06:35 -07:00
Adrian Sampson
ecb65a5a4a
Idiomatic configuration defaults ( #1398 )
...
Paging @jmwatte: `config.add` is the standard way to specify defaults for
configuration options.
2015-04-09 16:55:18 -07:00
jmwatte
1f08470fb3
Merge branch 'master' of https://github.com/sampsyo/beets
2015-04-09 18:53:39 +02:00
jmwatte
51cfde4e9d
fix bs1770gain for windows and exceptionally big albums
2015-04-09 18:48:37 +02:00
Bruno Cauet
882844bc77
Echonest conversion command: only use byte strings
...
Temp file name was unicode, so if other parts of the command were
utf8-encoded non-ascii strings the command would fail (in
beets.util.command_output()). Requesting a temp file with a byte string
path fixes the issue.
Fix #1407 .
2015-04-09 18:05:41 +02:00
jmwatte
7ac6ba53ff
fix bs1770gain for windows and exceptionally big albums
2015-04-09 18:02:32 +02:00
jmwatte
f1f7094938
fix bs1770gain for windows and exceptionally big albums
2015-04-09 17:18:26 +02:00
multikatt
58a8a3d386
Check for failed ipfs get:s
2015-04-07 15:01:12 -04:00
multikatt
4e4fa0580a
Renaming hash to not collide with built in funct
2015-04-07 14:31:12 -04:00
Frederik “Freso” S. Olesen
0d21e816d4
Fetchart: Remove hard 500px size limit for CAA cover art.
...
Using -500 URLs for coverartarchive.org will only ever return images
where the biggest dimension is (width or height) is 500 pixels,
regardless of what fetchart settings are otherwise set.
This commit removes the -500 from the URL entirely rather than using it
conditionally, since a maxwidth of 500 will allow for a 600 high and 500
wide image, but CAA.org/...-500 would return a 500x417 image instead, so
not enforcing a size is the only way to ensure the user's {max,min}width
settings are properly respected.
2015-04-07 15:24:01 +02:00
multikatt
00f2e58fe8
Remove unused import
2015-04-06 18:47:17 -04:00
multikatt
f2d298d17c
More linting
2015-04-06 18:11:38 -04:00
multikatt
540a267f9d
Using self._log instead of ui.print_
2015-04-06 17:48:25 -04:00
multikatt
247b4739ae
Adding docstring
2015-04-06 17:21:51 -04:00
multikatt
85544199a7
Cleanup after download
2015-04-06 17:05:46 -04:00
multikatt
d3aff50dbe
Linting
2015-04-06 16:20:37 -04:00
multikatt
0ab65fa566
adding get command
2015-04-06 15:34:17 -04:00
Tom Jaspers
7bdcb08ef5
Merge pull request #1394 from tomjaspers/fetchart-minwidth-ratio
...
Fetchart: minwidth and enforce_ratio options
2015-04-06 11:20:33 +02:00
multikatt
23d16d7b94
Very rough first version
...
The plugin can add items existing in the library to ipfs
2015-04-06 00:28:22 -04:00
Adrian Sampson
0af2cdaa3a
New beets.art image utilities
...
This makes it cleaner to share the high-level image-embedding logic between
the `embedart` and `convert` plugins. This resolves a regression, introduced
in f504c786 , that inadvertently activated the former plugin when the latter
was enabled. I also like avoiding cross-plugin imports.
2015-04-05 12:15:38 -07:00
Adrian Sampson
cf39977fbb
Fix #1393 : rewrite broken for album-level fields
...
We now create a computed field for albums as well as items. (This plugin is
very old!)
2015-04-04 16:03:12 -07:00
Tom Jaspers
b5ec26c949
Fetchart: minwidth & enforce_ratio options
...
- Minimum image width can be specified via minwidth (default `0`)
- The image ratio can be enforced to 1:1 using `enforce_ratio` (default `no`)
See #1058
2015-04-04 20:52:08 +02:00
Adrian Sampson
8ae0317014
bpd: Process commands as bytes ( fix #1388 )
2015-03-31 07:13:13 -05:00
Tom Jaspers
c95b89ebc1
Thumbnails: add None check on lib_name
...
`find_library` could return None, which would not cause an OSError
from `loadLibrary`, making the plugin (falsely) think the library is available
Also fixed wrong method call to skip test in that case
See #1277
2015-03-30 19:56:22 +02:00
Adrian Sampson
e953e6bdcb
Merge branch 'master' of github.com:sampsyo/beets
2015-03-29 14:28:22 -07:00
Adrian Sampson
e7bba32a44
Redact some API keys
2015-03-29 14:22:49 -07:00
Bruno Cauet
9705c09035
Merge branch 'thumbnails'
2015-03-29 21:44:42 +02:00
Adrian Sampson
eeca2105f9
Merge pull request #1377 from amishb/custom_ft_title
...
ftintitle plugin now allows a custom format to be defined (Correct Branch)
2015-03-29 12:05:53 -07:00
Pedro Silva
13d65f9c37
fix default format from config
...
The (automated?) change to add_format_option had broken the existing
formating logic
2015-03-28 17:23:11 +01:00
Amish Bhadeshia
9a38b07ed4
Housekeeping and styling changes
2015-03-28 11:20:28 +00:00
Pedro Silva
82ce6f054d
make helper functions methods in plugin
...
This helps use the _log attribute that is now available
2015-03-28 10:08:07 +01:00
Adrian Sampson
ef5052e111
Merge pull request #1383 from autochthe/convert/tmpdir
...
convert: Add 'tmpdir' option
2015-03-27 23:05:18 -04:00
Adrian Sampson
07516b2bca
Redact some passwords in plugins
2015-03-27 22:42:28 -04:00
Adrian Sampson
b477f4a53f
Merge pull request #1376 from tomjaspers/config-redacted-fields
...
Config: new option -r redacts sensitive fields
Conflicts:
beets/util/confit.py
2015-03-27 22:11:24 -04:00
Amish Bhadeshia
6365a9b538
Added indice into curly brackets, for py26 compatabiity
2015-03-27 20:54:42 +00:00
Amish Bhadeshia
232ff05766
Added tests and simplified implementation method
2015-03-27 17:59:35 +00:00
Bruno Cauet
e707342bf9
Add call to g_type_init() for glib < 2.36
2015-03-27 16:33:51 +01:00
Bruno Cauet
2e5803cfad
Thumbnails: unicode → bytes filename
2015-03-27 14:00:22 +01:00
Bruno Cauet
f41ec9bbf6
ctpyes: set argtypes & restype
2015-03-27 14:00:13 +01:00
Pedro Silva
9999460cb4
hash attribute values as tuples instead of stringifying on SOH char
2015-03-27 11:48:51 +01:00
Pedro Silva
fb0e03dd6b
remove redundant plugin name from logging
2015-03-27 11:47:40 +01:00
Pedro Silva
66e06baca7
fix #1000 : provide --strict option (don't match on null attributes)
2015-03-27 11:34:45 +01:00
Mara Kim
ddca1b2e13
Add 'tmpdir' option to convert plugin
...
Closes sampsyo/beets#1382
Add tmpdir setting
document tmpdir setting
2015-03-27 02:11:33 -05:00
Bruno Cauet
07ee934352
Thumbnails: improve log readability
2015-03-25 20:14:23 +01:00
Bruno Cauet
4b349771ff
thumbnails plugin setup: log tools chosen
2015-03-25 20:14:19 +01:00
Bruno Cauet
11a4777219
URI: use gio/gio.h's g_file_get_uri if available
2015-03-25 20:14:16 +01:00
Bruno Cauet
265fa962eb
Merge branch 'master' into thumbnails
2015-03-25 18:17:12 +01:00
Tom Jaspers
944d38064d
Config: implement redacted fields more idiomatic
...
- `add_redacted_fields(self, *field_names)` to use argument unpacking
- foo =| bar instead of foo = foo | bar
2015-03-25 14:55:29 +01:00
Bruno Cauet
8f5bae26fd
Smartplaylists: improve tests & code modularization
2015-03-25 10:44:33 +01:00
Tom Jaspers
f4ed3e16b1
Config: Add redacted fields from included plugins
2015-03-24 17:01:33 +01:00
Amish Bhadeshia
d2a95158f2
Updated ftintitle plugin to follow a format
2015-03-21 15:36:39 +00:00
Adrian Sampson
a70f8bb91f
Fix #1365 : lastimport config
2015-03-20 19:52:36 -04:00
Bruno Cauet
bcd57bd2b5
Test queries building sort management in smartplaylist
...
Slighly modify Sort parsing: avoid building MultiplSort() instances
comptised of a single sort, but return that sort instead, since it wraps
things with any gain.
2015-03-18 18:53:41 +01:00
Bruno Cauet
45c0c9b3cb
Deal with sorting
...
Try to follow any sort found & manage absence of sort. When there are
multiple sort directives given, concatenate them.
Tests not extended yet.
2015-03-18 18:09:42 +01:00
Bruno Cauet
65b52b9c48
python 2.6 compat: don't use set literals
...
In smartplaylist and test_smartplaylist.
2015-03-16 19:42:54 +01:00
Bruno Cauet
b79c025142
CLI tests for smartplaylist plugin
...
No import CLI test.
2015-03-16 18:36:08 +01:00
Bruno Cauet
40e793cdb1
Fix flake8 errors
2015-03-16 16:25:43 +01:00
Bruno Cauet
774decda7d
Smartplayist: parse_query_parts() → ...ry_string()
2015-03-16 16:21:49 +01:00
Bruno Cauet
2d9f665848
Smartplaylist: offer "splupdate <playlist names>"
...
splupdate command of the SmartPlaylistPlugin looks in "args" for matches
of playlist names.
2015-03-16 16:03:14 +01:00
Bruno Cauet
f06c33cb71
Smartplaylist: update only if item changed
2015-03-16 15:16:40 +01:00
Bruno Cauet
4bfa439ee1
database_change: send model that changed
2015-03-16 14:32:37 +01:00
Adrian Sampson
f6df14a798
Isolate bugs in pylast
...
Should fix crashes like this:
http://hastebin.com/nizusukuli.log
2015-03-14 15:13:07 -07:00
Adrian Sampson
736eab412c
Bytes arguments to bs1770gain command
2015-03-14 14:43:00 -07:00
Tom Jaspers
96a565a614
info: error msg instead of traceback on IOError
...
IOErrors were previously not caught, displaying full traceback to the user
2015-03-13 17:55:09 +01:00
David Logie
ee6fba1e82
Fix call to add_format_option() missing plugin.
2015-03-08 12:59:00 +00:00
Bruno
f6c6c35614
Merge pull request #1346 from brunal/subcommand-auto-format-path
...
Generalize --path, --format and --album options
2015-03-07 14:05:05 +01:00
Bruno Cauet
1722c26ffe
Fix DiscogsPlugin.setup() arguments
...
Session is optional. This fixes re-authorization.
Improve #1347 .
2015-03-07 14:00:47 +01:00
Adrian Sampson
bcc591bf97
Generalize exception handler for #1347
2015-03-06 12:01:09 -08:00
Bruno Cauet
d1f6bbaf01
Discogs plugin: catch client lib ValueErrors
...
When search fails, log the query which caused it and return an empty
result.
Kind of fixes #1347 .
2015-03-06 11:16:20 +01:00
Bruno Cauet
58b39f1000
Merge branch 'master' into subcommand-auto-format-path
2015-03-05 17:53:31 +01:00
Bruno Cauet
7798a521b5
Fix convert plugin
2015-03-05 17:40:32 +01:00
Bruno Cauet
ea1dc1eb19
Plugins conversion cont.
2015-03-05 17:40:32 +01:00
Bruno Cauet
650305c9a1
All suitable plugins use CommonOptionsParser features
2015-03-05 17:03:02 +01:00
Bruno Cauet
6234fee67d
Option parser: add common options with a method
...
Add a new OptionParser subclass: CommonOptionsOptionParser, which
provides facilities for adding --album, --path and --format options. The
last one is quite versatile.
Update base commands (from beets.ui.commands) to use those.
2015-03-05 15:01:20 +01:00
Bruno Cauet
9750351a1b
beets.util.command_output() & related receives bytes
...
- May fail with unicode, esp. will non-ascii system path entry.
- Only send it bytes.
- Also applies to subprocess.Popen() & co.
2015-03-04 15:15:46 +01:00
Adrian Sampson
8113c7ba85
Roll back whitespace changes from #1343
2015-03-03 10:41:30 -08:00
jmwatte
5d7d402adb
correct typing error
2015-03-03 13:11:25 +01:00
jean-marie winters
a3e32fd410
added fatalreplaygainerror
2015-03-03 11:23:45 +01:00
jean-marie winters
80c49ab360
removed line 288
2015-03-03 11:04:03 +01:00
jean-marie winters
0d49c830d8
just an updateMerge remote-tracking branch 'upstream/master'
2015-03-03 10:49:35 +01:00
jean-marie winters
5bc8ef7009
fix some formating
2015-03-02 22:11:33 +01:00
Adrian Sampson
8bd0633496
replaygain: Fix super call in AudioTools
...
Fix #1342 .
2015-03-02 11:30:14 -08:00
jean-marie winters
1416846283
Merge branch 'bs1770gainsupport'
...
Conflicts:
beetsplug/replaygain.py
2015-03-02 16:34:46 +01:00
jean-marie winters
72c5db8876
add doc, clean-up code
2015-03-02 15:38:33 +01:00
jean-marie winters
1385ce11ca
Added support for bs1770gain, a loudness-scanner
2015-02-28 15:35:48 +01:00
Bruno Cauet
65a88e2bf4
Fix StrubPlugin.write_item() expected arguments
...
Fix #1338 .
2015-02-24 19:30:51 +01:00
mried
c91e8cb782
Sometimes the extract art test failed because the file type of the extracted image might be PNG or JPG. Belongs to #1328 .
2015-02-19 19:43:07 +01:00
Adrian Sampson
ccd8a7e1d4
Merge pull request #1328 from mried/extractart-unicode
...
Fix a crash when extracting album art
2015-02-18 10:33:33 -08:00
mried
53cefa328e
Changed the path format from unicode to bytes.
2015-02-18 19:06:58 +01:00
Bruno Cauet
457afdc55d
Auto re-auth for discogs plugin upon error 401
...
This goes in the direction of #1299 and #1305 .
2015-02-18 15:11:52 +01:00
Adrian Sampson
ca0e9a8c03
Merge pull request #1329 from brunal/play-interactive
...
play command is now interactive
Conflicts:
docs/changelog.rst
2015-02-17 17:22:03 -05:00
Adrian Sampson
171ded17b6
Merge pull request #1320 from brunal/multiple-logging-levels
...
Multiple logging levels
2015-02-17 17:10:31 -05:00
Adrian Sampson
31500a741e
Merge pull request #1318 from jaquer/no-apply-replaygain
...
Stop applying mp3gain directly to files. Fixes #1316
2015-02-17 17:03:57 -05:00
Marvin Steadfast
b9174d176f
The permissions plugin now uses startswith for finding ancestors in the library path.
2015-02-17 11:45:21 +01:00
Marvin Steadfast
dd0de2f04b
Made the permissions plugin simpler. Got rid of some non-needed code and use the ancestors function instead of writing something new.
2015-02-17 11:41:15 +01:00
Marvin Steadfast
8b08ec568c
permissions plugin now uses a set instead of a OrderedDict to find duplicates in a list
2015-02-17 11:41:15 +01:00
Marvin Steadfast
21aedeb51a
Updated permissions plugin to change directory permissions too.
2015-02-17 11:41:15 +01:00
Tom Jaspers
12ecb2ce35
Fix formatting to new PEP8 version (1.6.2)
...
PEP8 1.6.2 (2015-02-15):
- added check for breaking around a binary operator
This caused Travis to fail on "W503 line break before binary operator"
2015-02-16 18:21:56 +01:00
Bruno Cauet
39a6145d2d
Plugin play uses default item sort in album mode
...
Offer library.get_default_{item,album}_sort for that purpose.
2015-02-16 12:26:23 +01:00
Bruno Cauet
c47221555f
Add beets.util.interactive_open() find cmd + execute
...
interactive_open() takes a target and an optional command, if it does not
receive a command then it uses open_anything().
It parses command and lexes it with shlex.split(), revieling the client
from that task.
"config -e" command uses it, and gives a better error message in case of
problem. "play" plugin uses it as well, as side-effect being that the
command is now interactive, as requested in issue #1321 .
Fix issue #1321 .
2015-02-16 12:26:17 +01:00
Bruno Cauet
5d9128aff3
util.interactive_open() return open/xdg-open/start
...
Depending on the platform return the correct automatic execution
command.
2015-02-16 11:35:13 +01:00
Bruno Cauet
1d8160f9ff
Play plugin: use OO, don't pass log around
2015-02-16 10:50:41 +01:00
Malte Ried
eafdd9e379
Extraction of cover art of albums with non ascii characters lead to a crash.
2015-02-15 19:39:39 +01:00
Bruno Cauet
13e47472ac
Play plugin: byte newlines in files written
...
Avoid unicode errors when writing '\n' around file paths.
2015-02-15 15:49:46 +01:00
Bruno Cauet
d267741ff3
Delete 'format' variables that shadow the built-in
...
Also cleanup the 'the' plugin a bit: delete unused variables.
Relates to #1300 .
2015-02-11 16:26:16 +01:00
Bruno Cauet
5a1f499c64
Discogs plugin: fix event listener params
...
Also delete related deprecated comment.
2015-02-11 09:11:20 +01:00
Bruno Cauet
327b62b610
Improve logging management for plugins: fixes
...
Delete the remaining usages of BeetsPlugin.listen().
Since BeetsPlugin.listeners are wrapped by a loglevel-setting function,
we cannot easily check their unicity anymore.
BeetsPlugin._raw_listeners set holds the raw listeners.
Legacy plugins that did not handle enough arguments in their listenings
functions may break: dedicated code is now deleted for it would not work
with the decorated listeners.
Tests got fixed. Some modifications were done empirically: if it passes
then it's okay.
2015-02-10 16:55:06 +01:00
Arturo R
60b1819db0
Stop applying mp3gain directly to files. Fixes #1316
...
Update docs to remove non-existent `apply` option.
2015-02-09 12:51:27 -08:00
Bruno Cauet
c6455c269f
Merge branch 'master' into thumbnails
...
Conflicts:
docs/changelog.rst
2015-02-09 16:08:29 +01:00
Tom Jaspers
6572e1bf5a
Fetchart: add empty album check to iTunes art
...
Was causing some tests to fail in test_art.py:CombinedTest
2015-02-09 14:59:56 +01:00
Adrian Sampson
66b7e4cd39
Merge branch 'master' of github.com:sampsyo/beets
2015-02-07 12:52:20 -08:00
Adrian Sampson
e7f8a627e9
Style fixes for pep8 1.6
2015-02-07 12:51:54 -08:00
David Logie
9b9c033df6
importfeeds: Fix Unicode error when writing files.
2015-02-07 15:13:01 +00:00
Adrian Sampson
0247785440
discogs: Catch JSON decode errors
...
Fix #1305 *again*.
2015-02-03 23:42:47 -08:00
Adrian Sampson
cc01d87209
discogs: Catch *another* exception ( fix #1305 )
...
Everything but requests is a travesty.
2015-02-03 23:04:14 -08:00
Adrian Sampson
a7878b0eba
A couple of explanatory comments for #1292
2015-02-03 09:50:36 -08:00
Adrian Sampson
82e89b8960
Merge pull request #1292 from mried/import-autosingleton
...
Allow plugins to change the created import tasks
2015-02-03 09:49:13 -08:00
Tom Jaspers
50dbd18493
Duplicates: fix error caused by formatting
...
Function arguement `format` was shadowing the built-in format function
Fix #1300
2015-02-03 13:31:54 +01:00
Adrian Sampson
77833f6c05
Oops 😳 #1299
2015-02-02 22:34:22 -08:00
Adrian Sampson
8151a40f1f
discogs: Catch socket errors ( #1299 )
...
See also:
https://github.com/discogs/discogs_client/issues/44
2015-02-02 22:27:14 -08:00
Adrian Sampson
313c3807aa
scrub: Use syspath in beet scrub ( #1297 )
2015-02-02 10:42:31 -08:00
Adrian Sampson
465719a208
scrub: Catch IOErrors in command ( fix #1297 )
2015-02-02 10:13:48 -08:00
geigerzaehler
46ba99ce79
Merge pull request #1295 from sampsyo/more-info
...
Info plugin can filter properties in output
2015-02-01 21:19:24 +00:00
Thomas Scholtes
482008bf1d
Info plugin can filter properties in output
...
Resolves #1287
2015-02-01 21:51:26 +01:00
Malte Ried
e681449785
Added documentation
...
FileFilterPlugin uses the new return value feature
Some tweaks to get the code more readable
2015-02-01 17:01:06 +01:00
Thomas Scholtes
51ab099145
Extend item.write() to embed images without changing item
...
Fixes #1241 and geigerzaehler/beets-check#14
Before, `embed_item` would add the images to the item and then call
`item.write()` to write the item data, including the image, to the
file. This would trigger `item.store()` in the `after_write` hook of
the check plugin. This would in turn try to persist the temporary
`images` attribute of the item, resulting in an SQL error.
2015-02-01 15:35:24 +01:00
Adrian Sampson
336bb9255c
chroma: Fix refactored beet submit
...
Fix #1293 .
2015-01-31 13:04:11 -08:00
Adrian Sampson
14ce6a557e
Merge pull request #1183 from marcaddeo/refactor-ftintitle
...
Refactor ftintitle
Conflicts:
beetsplug/ftintitle.py
2015-01-31 12:51:15 -08:00
Bruno Cauet
a72ae5991f
Add send_art event for embedart and thumbnails
...
Album.set_art() sends a 'art_sent' event, with the album as a
parameter. embedart and thumbnails listen to that event, instead of
listening to 'album imported'. Consequences:
- 'embedart' and 'thumbnails' don't have to be after 'fetchart' on the
plugins config line.
- embedart and thumbnails work event when a "beets fetchart" command is
issued.
- if another plugin ever set art then embedart and thumbnails will "just
work" with it.
2015-01-31 21:06:01 +01:00
Tom Jaspers
927a53d59b
Merge pull request #1281 from tomjaspers/configurable-colors
...
Colors are now user configurable.
Conflicts:
beets/ui/__init__.py
beets/ui/commands.py
2015-01-30 13:48:19 +01:00
Bruno Cauet
d299f40a72
Fix PNG metadata type: string only
...
instead of int
2015-01-29 16:00:05 +01:00
Tom Jaspers
f483012183
Colorize is now to be called with the abstract color_name instead of the color.
...
E.g., `colorize('text_success', 'hello world')`
To ensure compatibility with 3rd party plugins, a valid color ('red') can still be passed,
but it will be logged.
2015-01-29 14:33:57 +01:00
Bruno Cauet
9bdeb01689
Improve thumbnails logging
...
No info message printed twice per cover art (once for the normal
thumbnail and once for the big one)
2015-01-29 13:11:14 +01:00
Bruno Cauet
a78cc65826
Merge freedesktop plugin into thumbnails
...
Add test for that new code, update docs, update the changelog.
2015-01-29 13:08:02 +01:00
Bruno Cauet
bea5ad3f97
thumbnails: fix --force option management
2015-01-29 12:19:19 +01:00
Bruno Cauet
946aa8e4b3
Fix detection of thumbails to generate
2015-01-29 12:19:19 +01:00
Bruno Cauet
a39ab5163f
thumbnails: add "auto" config option
...
default: True
2015-01-29 11:24:15 +01:00
Bruno Cauet
e8370044c9
thumbnails: add --force (-f) to force regeneration
...
It compares thumb mtime vs cover mtime when it should compare
Thumb::mtime thumb metadata vs cover mtime.
2015-01-29 11:24:15 +01:00
Bruno Cauet
540cae0de4
thumbnails: fix detection of local resizing capabilities
2015-01-29 11:24:14 +01:00
Bruno Cauet
180a3ece3b
Improve thumbnails docstrings
2015-01-29 11:24:02 +01:00
Bruno Cauet
143e749426
thumbnails plugin writes standard metadata to the thumbnail
...
Write Thumb::URI and Thumb::MTime as requred by the spec:
http://standards.freedesktop.org/thumbnail-spec/latest/x142.html
2015-01-29 11:23:00 +01:00
Malte Ried
67ecf32671
Fixed typos.
2015-01-28 15:46:16 +01:00
Malte Ried
e2a7f7c153
Merge branch 'master' into extractart-for-albums
2015-01-28 15:44:36 +01:00
Bruno Cauet
17d6d6529e
thumbails: improve logging, update dependencies
2015-01-28 11:12:55 +01:00
Adrian Sampson
ac3ea16656
Fix for unicode_literals in scrub
...
Here's an example where unicode_literals may not be a great idea: these should
probably be "native" strings, i.e., bytes on 2.x and unicode on 3.x.
2015-01-27 13:48:13 -08:00
Malte Ried
2c75d0567f
Made the new functionality the default behaviour.
2015-01-27 19:59:49 +01:00
Malte Ried
07cea16492
Changed the interface of extractart to make it easier to understand what it does.
2015-01-27 19:41:25 +01:00
Malte Ried
2631d88b39
Merge branch 'master' into extractart-for-albums
...
Conflicts:
docs/changelog.rst
2015-01-27 19:18:51 +01:00
Bruno Cauet
5453cf96c8
thumbnails plugin handles 128² and 256² thumbnails
...
If the source is good enough both will be produced, otherwise the former
only will be created.
This is warranted by the spec: http://standards.freedesktop.org/thumbnail-spec/latest/x122.html
2015-01-27 17:16:26 +01:00
Bruno Cauet
55fd2d2886
thumbnails: create thumbnail dirs if needed
2015-01-27 17:16:25 +01:00
Bruno Cauet
5b8a846d1f
Add a new plugin: thumbnails
...
Generate thumbnails for albums, based on freedesktop specification. This
plugin is POSIX-only.
Require Python Imaging Library or Image Magick
2015-01-27 17:16:25 +01:00
Bruno Cauet
dbef31776f
Replace ur'' strings by r'' strings
...
Since we use unicode_literals they are equivalent, but ur'' strings are
a syntax error in python 3.0+
2015-01-27 09:02:44 +01:00
Adrian Sampson
b8dab9cf9f
Merge pull request #1247 from brunal/future
...
Use all __future__ imports in beets core
Conflicts:
beetsplug/web/__init__.py
test/test_embedart.py
2015-01-26 17:02:07 -08:00
Bruno Cauet
4e904c78af
Simplify LibModel format management
...
Delete `ui.format_` and then `ui.print_obj`. Simply ensure that when
there is no format it defaults to '' = default format = config option.
2015-01-26 23:09:56 +01:00
Tom Jaspers
d3fce35481
Colors are user configurable
...
- Colors are mapped on to a dictionary using abstract names (e.g., text_success)
- Add `colors` option under `ui` to allow users to choose their own color scheme
- Move configuration option `color` from top-level to `ui`
- Show deprecation warning if top-level `color` configuration is used (but respect it)
Fix #1238
2015-01-26 17:24:32 +01:00
Bruno Cauet
060c275fd3
Merge branch 'master' into libmodels-formatting
...
Conflicts:
beetsplug/embedart.py
2015-01-26 10:17:15 +01:00
Adrian Sampson
a10d9750a6
Merge pull request #1233 from pprkut/tracktotal
...
Make tracktotal an item-level field.
2015-01-25 13:02:31 -08:00
Adrian Sampson
ec2e9891c3
Merge pull request #1194 from tomjaspers/master
...
Fetchart: add fetching artwork from Wikipedia
2015-01-25 12:59:13 -08:00
Adrian Sampson
9fe0eab26f
Merge pull request #1262 from brunal/embedart-logging
...
Improve embedart logging management
2015-01-25 12:55:19 -08:00
Bruno Cauet
8165dec985
Delete manual formattings of album & item
2015-01-25 21:32:22 +01:00
Bruno Cauet
62cd6e37aa
Update ui.print_obj_(), add ui.format_()
...
Code now relies on `format()` for items and albums displaying/logging.
`ui.print_()` calls `unicode()` or `str()` on the strings so for most
usages calling `ui.print_(obj)` replaces `ui.print_(obj, lib, None)`.
Where there is a special format `ui.print_(format(obj, fmt))` is fine,
but when `fmt` can be None then one has to call
`ui.print_(ui.format_(obj, fmt))` -- which is what `ui.print_obj` now
does.
2015-01-25 21:07:03 +01:00
Bruno Cauet
77d46bb2df
Embedart logging: higher level for img comparisons
2015-01-25 18:33:20 +01:00
Malte Ried
c43173263c
Bugfixes and code rearrange for the extract art for albums feature. Closes #1261
2015-01-25 11:50:05 +01:00
mried
6ac132edf7
Added an option to extract the art file of all matched albums. Closes #1261
2015-01-25 11:50:04 +01:00
David Logie
29de697a8d
Fix bug where playlists were not created in subdirs.
...
Playlist names containing path separators would cause beets to crash if
the parent directories for the playlist didn't already exist.
2015-01-24 13:00:25 +00:00
Bruno Cauet
23dcdebe9a
Merge branch 'master' into embedart-logging
...
Conflicts:
beetsplug/embedart.py
2015-01-24 11:31:31 +01:00
Adrian Sampson
07065b27b3
Merge pull request #1263 from brunal/embedart-better-extract
...
embedart: try extracting from items until success
Conflicts:
beetsplug/embedart.py
2015-01-23 11:00:49 -08:00
Bruno Cauet
b30c6975a1
Embedart extraction: 'cover' is already the default
...
'cover' is already the default filename (in the absence of a custom
config) so there is no need to re-write that value in the embertart
plugin.
Improve #1258
2015-01-23 18:12:17 +01:00
Bruno Cauet
4a27f83223
embedart: try extracting from items until success
...
Don't stop at the first item but try them all.
Fix #1261
2015-01-23 17:48:37 +01:00
Bruno Cauet
b001a973a3
Improve embedart logging management
...
- better logging levels
- always use the preferred user formatting for items & albums
- improved some messages wording
Fix #1244
2015-01-23 17:39:38 +01:00
Malte Ried
b3803d3472
Extractart uses the configured art_filename. Closes #1258
2015-01-23 17:14:14 +01:00
Adrian Sampson
be7ffd9758
Merge pull request #1254 from andremiller/master
...
Replace print with _log.info() in CORS support
2015-01-21 09:38:37 -08:00
Andre Miller
96e3d8b451
Replaced print with log.info
2015-01-21 19:31:02 +02:00
Adrian Sampson
433d6b7485
embedart: Error on non-existent -f file
...
Fixes #1252 .
2015-01-21 09:07:59 -08:00
Bruno Cauet
1e0185188a
Smartplaylist: fix song path writing (str → bytes)
2015-01-21 10:36:45 +01:00
Bruno Cauet
545ba22f94
CORS init in web plugin: print → log
2015-01-21 10:18:13 +01:00
Bruno Cauet
c2f8cb9983
Merge branch 'master' into future
...
Conflicts:
test/test_plugins.py
2015-01-21 10:04:33 +01:00
David Logie
99e89a29e2
mbsync: Don't overwrite the format built-in.
2015-01-21 08:05:27 +00:00
David Logie
7db3e1d80c
mbsync: Fix bug where singletons always used the album format.
2015-01-21 08:05:27 +00:00
David Logie
2fae94a93a
Make the Template object an attribute.
2015-01-21 08:05:26 +00:00
David Logie
3317580296
mbsync: Support custom output format.
2015-01-21 08:05:26 +00:00
Adrian Sampson
f617d162cf
keyfinder: Better output parsing ( #1248 )
...
We were being sloppy about bytes output from the process. Also, it seems like
the tools outputs the path also, so it's necessary to break on whitespace to
actually get the key name.
2015-01-20 15:17:21 -08:00
Adrian Sampson
dae1776165
Reasonable logging for keyfinder command
...
Previously the command was completely silent.
2015-01-20 15:12:26 -08:00
Adrian Sampson
5586fcee67
keyfinder: Only write on import when asked to
...
This should really be standard machinery.
2015-01-20 15:11:13 -08:00
Adrian Sampson
8e94419c2a
Fix filefilter ( #1186 ) tests for consistent colons
...
I added this to the pretend output a few commits ago.
2015-01-20 14:34:42 -08:00
Adrian Sampson
0a8dcadb75
Rename regexfilefilter to filefilter ( #1186 )
2015-01-20 14:32:22 -08:00
Adrian Sampson
ebc065ecec
Merge branch 'mried-import-filefilter'
...
Merge of PR #1186 .
2015-01-20 14:22:55 -08:00
Adrian Sampson
38eecb93c9
Merge pull request #1237 from andremiller/master
...
Support for CORS
2015-01-20 14:02:27 -08:00
Malte Ried
a62a152010
Moved the regular expression file filter into a separate plugin.
2015-01-20 19:50:00 +01:00
Andre Miller
f815138758
Combined cors and cors_origin config options into one
2015-01-20 19:53:04 +02:00
Bruno Cauet
132f5ba912
Fix bytes/str with unicodenazi
2015-01-20 16:41:18 +01:00
Bruno Cauet
a5026100a3
All plugins use unicode_literals
...
Given that part of them has no test I may have broke them
2015-01-20 16:22:27 +01:00
Bruno Cauet
438044c6ae
Fix bytes/str with unicode-nazi
...
Further cleaning will require setting unicode_literals on plugins
2015-01-20 15:25:12 +01:00
Andre Miller
47ea4b7d8b
flake8 formatting updates
2015-01-20 16:06:16 +02:00
Andre Miller
f47be23658
CORS support now uses flask-cor extension
2015-01-20 15:33:33 +02:00
Bruno Cauet
02d8e88ef1
Replace all mentions of 'str' with 'bytes'
2015-01-20 12:48:15 +01:00
Bruno Cauet
9c41c39913
Do __name__ comparison with bytes and not unicode
2015-01-20 12:03:57 +01:00
Andre Miller
c8880de52c
Fixes for flake8 validation
2015-01-20 00:38:26 +02:00
Andre Miller
bd63e1e386
Made CORS configurable and changed host default to 127.0.0.1
2015-01-20 00:20:26 +02:00
Heinz Wiesinger
c86a5f9d97
Make tracktotal an item-level field.
...
This fixes tracktotal being stored incorrectly for multi-disc releases
where the individual discs have a different number of tracks and
per_disc_numbering is enabled.
2015-01-19 13:02:21 +01:00
Bruno Cauet
90b388b775
Use __future__ imports but unicode_literals everywhere
...
Include import of __future__ features division, absolute_imports and
print_function everywhere. Don't add unicode_literals yet for it is
harder to convert.
Goal is smoothing the transition to python 3.
2015-01-19 12:25:16 +01:00
Bruno Cauet
b436e75a9e
embedart: fix behaviour on IM unparseable output, add tests
...
Test all EmbedCoverArtPlugin.check_art_similarity() code paths.
Improve #1241 .
2015-01-19 11:50:51 +01:00
Adrian Sampson
f346853710
embedart: Do not use shell for subprocess
...
This avoids bugs when the filename contains spaces, etc.
Pinging @Kraymer: I gave this a brief test, but can you check whether I messed
anything up more subtly?
Came up when looking at #1241 .
2015-01-18 16:25:23 -08:00
Adrian Sampson
909c96b060
embedart: Handle unparseable IM output ( #1241 )
2015-01-18 16:18:22 -08:00
Frederik “Freso” S. Olesen
6031cab891
lastgenre: Add "mass" to the classical genre tree.
2015-01-18 23:00:27 +01:00
Horla
587ff39f22
Update genres-tree.yaml
...
Removing "classic"
2015-01-18 22:46:40 +01:00
Horla
8ed9e50e18
Update genres-tree.yaml
...
Changing "classic" to "classical"
2015-01-18 22:27:34 +01:00
Horla
3fdc5c936e
Update genres.txt
...
Add classical subgenres
2015-01-18 22:13:36 +01:00
Horla
3a3150b740
Update genres-tree.yaml
...
Add classic genre with its subgenres
2015-01-18 22:11:01 +01:00
Malte Ried
0eb185a5e7
Merge branch 'master' into import-filefilter
2015-01-18 18:55:24 +01:00
Tom Jaspers
133c21a9c5
Fetchart: add fetching artwork from Wikipedia following the new class-based structure of the plugin
2015-01-18 15:09:36 +01:00
Andre Miller
9fe2bc1a38
Support for CORS
2015-01-18 10:23:49 +02:00
Adrian Sampson
bf02855ee1
Remove Beatport plugin (c.f. #1229 )
2015-01-16 12:15:54 -08:00
Bruno Cauet
7c2d5f0948
Import beets.ui in discogs plugin
...
The discogs plugin uses beets.ui but did not explicitely import it,
which might cause it to crash when used in standalone.
2015-01-16 17:59:35 +01:00
Bruno Cauet
d2726e1c25
Fix mpdstats plugin config management
...
Fix #1228 :
- remove erroneous calls to `self.config`
- always use `config['mpd']` and not `self.config` (which is
config['mpdstats']) to match the doc
2015-01-16 11:08:24 +01:00
Bruno Cauet
b49cd3b73b
Lyrics plugin: fix google backend
...
Give config on backends init so the Google backend can get the API key
and Engine Id.
Fix #1226
2015-01-15 11:28:04 +01:00
Adrian Sampson
c1ce71f35c
smartplaylist: Fix album_query ( fix #1225 )
...
This is far less elegant and functional, but at least it is correct.
2015-01-14 22:00:30 -08:00
Adrian Sampson
38c5bb3666
Fix a docstring
2015-01-14 21:53:13 -08:00
Bruno Cauet
0c3675ada0
Fix replaygain: add 'log' to __init__ parameters
2015-01-14 16:17:20 +01:00
Bruno Cauet
0d1fa80651
Smartplaylist: don't utf8-encode the name
...
A Template expression expects an unicode, not an utf8-encoded string.
Add a test for that.
2015-01-14 12:32:00 +01:00
Bruno Cauet
6408904a8c
Smartplaylit: fix log format string
...
{0.name} → {0[name]} since the argument is a dict.
2015-01-14 12:15:44 +01:00
Malte Ried
ad65242ebd
Merge branch 'master' into import-filefilter
...
Conflicts:
beets/importer.py
beets/plugins.py
beetsplug/ihate.py
2015-01-14 10:46:03 +01:00
Bruno Cauet
9a2a9b0144
smartplaylist: fix docstring
2015-01-13 18:53:47 +01:00
Bruno Cauet
ca91bc8920
mpdupdate: fix indent
2015-01-13 18:53:30 +01:00
Bruno Cauet
753388550e
Clean PlexUpdate plugin
...
- no global variable
- use logging instead of prints
2015-01-13 12:36:16 +01:00
Bruno Cauet
de86b9b570
Clean MPDupdate plugin
...
- no global variable
- use logging instead of prints
- unicode logging
2015-01-13 12:30:40 +01:00
Bruno Cauet
a7beaa6d6e
Clean & shorten smartplaylist code
...
- better log messages
- more idiomatic code: "X not in Y" instead of "not (X in Y)"
- shorten _items_for_query:
- pre-detect whether it's album_query or query, hiding conf. spec to
the function.
- Let library.{items,album} parse the query string, therefore
falling back to beets-level sort spec. if none is given in the
query
2015-01-13 12:11:52 +01:00
Bruno Cauet
7c4496c110
Smartplaylist: log messages instead of printing
...
ui.print_ → self._log.info
Also change config['smartplaylist'] into self.config
2015-01-13 11:42:23 +01:00
Bruno Cauet
fdb768c9db
Simplify smartplaylist flow
...
Suppress the global variable, register listeners if it's needed only.
2015-01-13 11:31:42 +01:00
Bruno Cauet
4babc40fd8
Delete useless "config['mypluginname']" mentions
...
Replace with self.config where this is painless.
More plugins would benefit from this update but that requires turning
functions into methods.
2015-01-12 10:55:59 +01:00
Adrian Sampson
f871ef9e21
Verbosity affects plugins ( #1208 )
...
This restores the -v flag affecting plugins. By default, plugin loggers use
the NOTSET level, which just reuses the base `beets` logger level. The level
is only auto-adjusted for the importer when not in verbose mode.
2015-01-11 15:00:20 -08:00
Adrian Sampson
24317fd4c7
Rename BeetsPlugin._import_stages to import_stages
...
For #1208 . Restores backwards-compatibility and matches the development docs.
2015-01-11 14:27:59 -08:00
Bruno Cauet
b27c5304d1
Merge branch 'master' into logging
...
Conflicts:
beetsplug/fetchart.py
beetsplug/mpdstats.py
2015-01-09 15:15:27 +01:00
Adrian Sampson
558d1f9639
Merge pull request #1212 from brunal/mpdstats-react-only-once
...
mpdstats: don't register a natural song change twice
2015-01-08 13:43:46 -08:00
Adrian Sampson
1654fc82ce
Merge pull request #1211 from brunal/fetchart-check-isfile
...
Fetchart: check that the art found is a file
2015-01-08 13:40:21 -08:00
Frederik “Freso” S. Olesen
4b1f0cbf48
Happy 2015. ;)
...
See 7a410f636b
Command used:
git grep -l 'Copyright 201'|xargs sed -i -E 's/Copyright 201./Copyright 2015/'`
2015-01-08 21:37:09 +01:00
Bruno Cauet
23e6760e19
Partial rollback of bpd logging
2015-01-08 17:55:40 +01:00
Bruno Cauet
b7735bd3bf
Don't register a natural song change twice
...
mpd responds twice to an 'idle' command upon a 'natural' song change
(i.e. not a skip). Checking the reason for mpd response avoids
registering twice the song change.
Fix issue #773
2015-01-08 12:39:28 +01:00
Bruno Cauet
2e1b0d589d
Fetchart: check that the art found is a file
...
Fixes issue #1177
2015-01-08 10:58:08 +01:00
Bruno Cauet
1ca33a8a52
Avoid using partial() for the listener callback
...
partial() is not a instance of types.FunctionType so
inspect.getargspec() (used in beets/plugins:422) fails on it.
2015-01-08 10:10:42 +01:00
Bruno Cauet
422a7f6063
replaygain: fix backend instanciation
2015-01-06 22:13:17 +01:00
Bruno Cauet
00d5473187
Merge branch master into logging
...
Conflicts:
beetsplug/lyrics.py
2015-01-06 21:46:04 +01:00
Bruno Cauet
b2582c5d62
MusicBrainz collection plugin: delete "print" uses
2015-01-06 21:42:34 +01:00
Bruno Cauet
f504c78681
Fix usage of embedart by convert plugin
...
Instanciation of EmbedCovertArtPlugin on the fly: there may be several
instances → problem with the listeners it registers?
2015-01-06 21:42:28 +01:00
Bruno Cauet
8097ff8c1d
Convert fetchart plugin, with OO rewrite of sources
...
Art sources are now classes
2015-01-06 21:42:10 +01:00
Bruno Cauet
5c1cc6e7fc
Convert the convert plugin to the new logging system
2015-01-06 21:42:10 +01:00
Bruno Cauet
11d5f93db1
Convert importadded plugin
...
Many listeners. Everything is now a method
2015-01-06 21:42:10 +01:00
Bruno Cauet
63041736e3
Convert lyrics plugin, with OO rewrite of backends
2015-01-06 21:42:10 +01:00
Bruno Cauet
860e7e1483
Update 3 plugins: func → methods, listeners
...
- functions turn into method in order to have the logger object
- registering the listener has to be updated too
2015-01-06 21:42:09 +01:00
Bruno Cauet
203b325ee7
Convert mbsync logging: big funcs → methods
2015-01-06 21:42:09 +01:00
Bruno Cauet
74e18afa94
Convert bdp: pass around with static setter on classes
2015-01-06 21:42:09 +01:00
Bruno Cauet
32673b87e7
Update multiple plugins: pass the logger around
2015-01-06 21:42:09 +01:00
Bruno Cauet
7d58a38428
Convert replaygain: pass logger to other classes
...
This time the logger is passed to the other classes of the module, not
to functions.
2015-01-06 21:42:02 +01:00
Bruno Cauet
38352f7058
Update chroma plugin logging: pas logger around
...
The logger is passed as an argument to multiple function. This showcases
the second possibility for using the new logging system. Several similar
conversions to be expected.
2015-01-06 21:42:02 +01:00
Bruno Cauet
1be3dade04
Convert freedesktop plugin logging: func → method
...
This serves as an introduction for many plugin updates to come.
Multiple functions have to turn into methods -- and this is one of the
shortest plugins.
2015-01-06 21:40:58 +01:00
Bruno Cauet
e14a54df05
Convert multiple plugins' logger usage (easy ones)
...
Those plugins only called methods and no function, which eases the
conversion.
2015-01-06 21:34:13 +01:00
Bruno Cauet
0617c0410f
Remove log declarations where it was unused
...
Easiest conversions!
2015-01-06 21:34:12 +01:00
Bruno Cauet
78ac338c28
Delete _log definition where it was already used
...
Easy switch to the new logger
2015-01-06 21:27:16 +01:00
Bruno Cauet
1afe82fb41
Make 2 plugins rely on auto log level mgmt
...
ftintitle and title don't do manual management anymore.
2015-01-06 21:27:15 +01:00
Bruno Cauet
427f7e7035
Automatic logger level changes on import
...
Breaking changes: plugins should set set _import_stages instead of
import_stages. From outside the latter is replaced by import_stages().
This is because it is now wrapped with log level-getting & -setting
statements.
2015-01-06 21:27:15 +01:00
Adrian Sampson
258fa10767
Merge pull request #1206 from Freso/patch-1
...
lastgenre: Add "comedy" to genre whitelist.
2015-01-06 11:22:07 -08:00
Adrian Sampson
daba9e770e
Fix #1204 : insecure request warning in lyrics
2015-01-06 11:01:11 -08:00
Frederik "Freso" S. Olesen
3940f3a1c2
lastgenre: Whitelist "humor" + "stand-up".
...
https://botbot.me/freenode/beets/msg/28878482/
2015-01-06 19:50:00 +01:00
Frederik "Freso" S. Olesen
6fb810289f
lastgenre: Add "comedy" to genre whitelist.
...
See discussion from https://botbot.me/freenode/beets/msg/28875043/
2015-01-06 15:44:39 +01:00
Bruno Cauet
b8211a3c4c
Every plugin uses its own logger
...
logging.getLogger(__name__) everywhere!
Several loggers prefixed every log message with [logername], which we
delete here.
2015-01-06 10:35:44 +01:00
Bruno Cauet
30f158a95e
Move "from beets import logging" statements
...
Move the import next to other beets-related imports
2015-01-05 10:05:21 +01:00
Bruno Cauet
45db930457
embedart: restore an apparent typo (which wasn't)
...
hashes → phashes
2015-01-05 07:59:53 +01:00
Bruno Cauet
f5c5666729
Attain pep8-cleanliness
...
No more E12 or E501
2015-01-04 17:29:31 +01:00
Bruno Cauet
7df8bef8b7
Update logging imports: logging → beets.logging
2015-01-04 17:02:27 +01:00
Bruno Cauet
6bdb02c721
Fix logging formatting string in duplicates plugin
...
{)} → {0}
2015-01-04 17:02:27 +01:00
Bruno Cauet
8cac47af2a
Convert beets plugins to lazy logging
2015-01-04 17:02:27 +01:00
Malte Ried
ab996a0de0
Merge branch 'master' into import-filefilter
...
Conflicts:
test/test_importer.py
2014-12-31 17:04:16 +01:00
Malte Ried
0e74c5dbaa
Rearranged regex config options to reduce hierarchies
2014-12-31 11:56:50 +01:00
Fabrice Laporte
d4d5c085fa
lyrics : remove empty divs before scraping
...
it may result in \n being inserted that we will strip in
_scrape_strip_cruft
2014-12-30 23:37:23 +01:00
Adrian Sampson
fd94094c1b
Changelog and name change for #1156
2014-12-30 15:27:17 -04:00
Adrian Sampson
e547426b8c
Merge pull request #1156 from djl/lastgenreunicode
...
lastgenre: Optionally replace unicode characters when performing lookups
2014-12-30 15:25:40 -04:00
Malte Ried
8addf3ef39
Simplified the configuration of the regular expressions for th ihate plugin
...
Added the docs
2014-12-30 14:11:45 +01:00
David Logie
08d5b9c138
Fix line length in docstring.
2014-12-29 19:45:33 +00:00
David Logie
f2704461cf
Go back to a single lookup with specific Unicode characters replaced.
2014-12-29 19:37:03 +00:00
Marc Addeo
8cd3d0059f
Remove ArtistNotFoundException in favor of returning None for simplicity
2014-12-29 11:10:43 -05:00
Malte Ried
7674399a45
Added the import_task_created event
...
Improved the IHatePlugin to filter files based on file names
2014-12-29 12:03:51 +01:00
Marc Addeo
e71c464c14
Initialize feat_part as None
2014-12-28 21:27:58 -05:00
Marc Addeo
8f41818434
Fix formatting to pass flake8 tests
2014-12-28 20:58:59 -05:00
Marc Addeo
a70820d8a1
Fix a bug in ftintitle with the order of album artist
...
There was a bug in the find_feat_part function that would cause it to
fail if the album artist was the second part of the featured string.
For example, if the Artist field was Alice & Bob, and the Album Artist
field was Bob it would return None due to the order.
This fixes that and adds test cases to ensure it doesn't return.
2014-12-28 20:23:17 -05:00
Marc Addeo
4d4113e3a4
Refactor ftintitle to extract the code to find the featured artist
...
This removes the code that extracts the featured artist from the
original artist field from the ft_in_title function and puts it into its
own.
It also adds a custom ArtistNotFoundException that find_feat_part will
throw if the album artist is not in the artist field.
This allows us to easily test the results of finding a featured artist
in the artist sting, and thus adds tests for the usual test cases that
the split_on_feat gets tested for.
2014-12-28 20:15:09 -05:00
Adrian Sampson
d0dcc74c7e
Merge pull request #1181 from marcaddeo/fix-ftintitle-duplicate-album-artist
...
Fix handling of duplicate album artists in ftintitle
2014-12-28 18:58:36 -04:00
Adrian Sampson
375f9259b9
Merge pull request #1176 from Freso/issue-1172-ftintitle-less-import-verbosity
...
ftintitle: use log.log() for outputting
2014-12-28 18:52:21 -04:00
Marc Addeo
8c484a273c
Fix handling of duplicate album artists in ftintitle
...
The code that determines the featured artist part of the artist only
handles two element lists. When the album artist is duplicated, it
splits into a three element list causing no featured artist to be found.
This ensures the albumartist_split can ever only have 2 elements.
Fixes #1179
2014-12-28 17:51:48 -05:00
Stig Inge Lea Bjørnsen
9227a51588
Add a missing space
2014-12-28 20:40:46 +01:00
Frederik "Freso" S. Olesen
0ec3396d3f
ftintitle: Use log.log() instead of ui.print_().
...
Fixes #1172 .
2014-12-28 20:33:56 +01:00
Frederik "Freso" S. Olesen
6182ef1b1e
ftintitle: Remove empty ui.print_() call.
2014-12-28 20:33:15 +01:00
David Logie
148d9048d5
Update _cached_lookup() docstring.
2014-12-28 18:38:42 +00:00
David Logie
433d68724a
Escape Unicode characters so we don't need the encoding headers.
2014-12-28 18:38:15 +00:00
David Logie
3015c22d40
Fix indent level.
2014-12-26 14:17:49 +00:00
David Logie
d9673ef9b5
lastgenre: Only replace a small set of unicode characters.
2014-12-26 14:08:22 +00:00
Stig Inge Lea Bjørnsen
a2188d475b
ImportAdded support for in-place and link imports
...
Fix for the `ImportAdded` plugin crashing during in-place imports (#1107 ).
Add support for the new link imports introduced in Beets 1.3.9.
Note that link-imports that preserve file modification times will follow
the links and preserve the mtimes on the link targets. The mtimes on the
links aren't modified.
2014-12-25 21:39:28 +01:00
Michael Ludwig
c76f8bee46
embedart: Added syspath call to art exists check
2014-12-21 13:08:02 -05:00
Adrian Sampson
016c901e6f
Fix 2.6 compatibility with subprocess
...
We can add this back once we go 2.7-only.
2014-12-21 10:09:43 -05:00
Adrian Sampson
e8158194d6
More robust templating ( #1157 )
...
Don't require $source and $dest to be bare tokens.
2014-12-21 09:42:58 -05:00
Adrian Sampson
8579412a76
No shell execution ( #1157 )
...
Now that we do the proper thing, we do not need shell parsing.
2014-12-21 09:31:41 -05:00
Adrian Sampson
4180f42194
Encoding and other fixes for #1157
...
Log as one statement. No need to hold the filesystem lock. New variable name.
2014-12-21 09:30:25 -05:00
Adrian Sampson
c4eba5c741
Apply #1157 by @mluds as patch ( fix #1158 , #1026 )
2014-12-21 09:22:56 -05:00
Adrian Sampson
f45d6c2364
Merge pull request #1161 from Kraymer/lyrics_hotfixes_musixmatch
...
Musixmatch hotfixes
2014-12-21 09:11:45 -05:00
Fabrice Laporte
802d1521ed
lyrics: don't throw when extraction fails
2014-12-21 14:38:19 +01:00
Fabrice Laporte
dfc1aa20b3
lyrics: musixmatch, disable https verification
2014-12-21 14:35:16 +01:00
David Logie
c7b6f75ca8
lastgenre: Automatically retry asciified lookups if the initial lookup fails.
2014-12-21 12:58:15 +00:00
Adrian Sampson
02e341cded
Fix #1152 : mbcollection: choose release collection
2014-12-20 22:21:58 -05:00
Adrian Sampson
021cdb7b4a
Fix log statement in inline
2014-12-20 20:06:17 -05:00
David Logie
c227501a5d
lastgenre: Optionally replace unicode characters when performing lookups.
2014-12-20 22:13:05 +00:00
Fabrice Laporte
39584a8b69
fix flake8
2014-12-19 00:19:59 +01:00
Fabrice Laporte
c3f82c65a4
fix lyrics.com extraction markers
2014-12-18 23:56:33 +01:00
Adrian Sampson
ba044f8e20
fetchart: Privatize global source list ( #1148 )
2014-12-18 11:14:22 +00:00
Adrian Sampson
b3bf70c11d
Privatize global SOURCES in lyrics
2014-12-18 11:13:02 +00:00
Adrian Sampson
ac3f0824b0
Merge pull request #1148 from Kraymer/lyrics_musixmatch
...
lyrics: add 'musixmatch' source
Conflicts:
beetsplug/lyrics.py
2014-12-18 10:36:16 +00:00
Adrian Sampson
20db9bb1a6
lyrics: Connect force option to CLI ( #1150 )
2014-12-18 04:03:15 +00:00
Fabrice Laporte
544d6dbe47
lyrics: add 'force' option
2014-12-17 22:40:44 +01:00
Fabrice Laporte
474adffe63
move helper functions from utils to plugins
2014-12-17 22:00:00 +01:00
Fabrice Laporte
9d0ca15ace
lyrics: preserve default order of sources
2014-12-17 01:05:58 +01:00
Fabrice Laporte
e7a4b92de5
lyrics: add 'sources' option
2014-12-17 00:42:11 +01:00
Fabrice Laporte
0f2f43ca9b
lyrics: add musixmatch source
2014-12-17 00:41:21 +01:00
Adrian Sampson
c2184be679
Merge branch '1060_ft_lang_support'
2014-12-16 11:53:59 +00:00
Adrian Sampson
a984c1aa44
Use a non-capturing group by default ( #1060 )
...
Now clients don't have to decide whether they need parentheses or not.
2014-12-16 11:37:40 +00:00
Fabrice Laporte
829b623665
remove capturing parentheses
2014-12-15 22:48:01 +01:00
Fabrice Laporte
b62f15d9d9
feat_tokens: change argument name, fix regex flag
2014-12-14 22:46:51 +01:00
Fabrice Laporte
91a998df3c
fix #1060
2014-12-13 23:34:50 +01:00
Adrian Sampson
9ce956d648
Accuracy in variable naming ( #1138 )
...
That's a Query object, not a string.
2014-12-12 15:41:49 -08:00
David Logie
c09745f75c
Remove unused dbcore import.
2014-12-12 23:06:15 +00:00
David Logie
11c60ce101
smartplaylist: Respect sort terms in queries.
2014-12-12 14:38:35 +00:00
Adrian Sampson
165ee80f81
lyrics: Handle requests exceptions ( #1136 )
2014-12-11 16:03:49 -08:00
Fabrice Laporte
d31a7c6b28
remove str decoding as input sources are unicode
2014-12-11 00:14:43 +01:00
Fabrice Laporte
321f862f23
fix #1135
2014-12-09 23:37:42 +01:00
Adrian Sampson
1448eab642
Parenetheses-less tuples
2014-12-02 18:12:21 -08:00
Thomas Scholtes
66b81ed081
echonest: test conversion failure
2014-12-02 11:54:36 +01:00
Thomas Scholtes
c248a71494
echonest: mock convert and truncate commands
2014-12-02 11:51:18 +01:00
Thomas Scholtes
f4fdd66b81
echonest: truncating a file converts it to OGG
...
Previously ffmpeg would throw an error because the file extension is
'.ogg' but the codec is 'copy'.
2014-12-02 11:15:46 +01:00
Thomas Scholtes
5633f50f27
echonest: extract logic into prepare_upload method
...
Also fixes a bug where both converting and truncating would leave a
temporary file.
2014-12-02 09:58:56 +01:00
Adrian Sampson
c41b8acf82
Merge pull request #1129 from geigerzaehler/zero-images
...
zero: Can delete embedded images
Conflicts:
docs/changelog.rst
2014-12-01 11:40:48 -08:00
Adrian Sampson
d97b90d363
Merge branch 'master' of github.com:sampsyo/beets
2014-12-01 11:28:57 -08:00
Thomas Scholtes
17117ed4ae
echonest: Remove temporary files
...
Fixes #979 .
2014-12-01 17:53:14 +01:00
Thomas Scholtes
e2b2a505fc
zero: Can delete embedded images
...
Fixes #1100 .
2014-12-01 17:33:45 +01:00
Thomas Scholtes
9d3729dc5e
mediafile: Test deleting images and implement it for MP3s
2014-12-01 17:20:16 +01:00
Adrian Sampson
5fb4003ebe
echonest: Fix #896 (handle missing duration)
2014-11-30 12:21:27 -08:00
Adrian Sampson
7c08830113
Remove Echo Nest fingerprinting ( fix #1121 )
2014-11-30 12:18:43 -08:00
Adrian Sampson
5d37f9a2f0
Remove echonest_tempo ( fix #1119 )
2014-11-30 12:03:28 -08:00
Adrian Sampson
fe655e4610
discogs: Only authenticate on import ( #1123 )
...
No need to authenticate for other commands.
2014-11-30 11:18:32 -08:00
Marvin Steadfast
77f8eff78c
Fixed python 2.6 compatibility in the plexupdate plugin. Added requests as dependency in the docs for plexupdate
2014-11-28 14:08:11 +01:00
Marvin Steadfast
b25393151d
Added plexupdate plugin for refreshing plex music library after importing music.
2014-11-28 11:19:17 +01:00
Marvin Steadfast
d3b76d83d2
Permissions plugins listens now for album_imported and item_imported
2014-11-24 18:41:50 +01:00
Adrian Sampson
d026e7742b
fetchart: Tolerate itunes bugs ( fix #1109 )
2014-11-22 15:32:52 -08:00
Marvin Steadfast
f8b3b96ff4
the plugin now listens also for item_moved
2014-11-21 14:58:33 +01:00
Marvin Steadfast
8784e8d8ca
plugin now listens for item_copied instead of after_write. now the test works
2014-11-20 11:40:02 +01:00
Marvin Steadfast
38c509b092
created a function to convert permissions to oct
2014-11-19 17:26:39 +01:00
Marvin Steadfast
5f03185bdd
did even more refactoring with the suggestions of sampsyo. added documentation page
2014-11-18 13:45:55 +01:00
Marvin Steadfast
df1136756a
a little refactoring
2014-11-17 16:29:54 +01:00
Marvin Steadfast
e1db3e9f0b
Added fix_permissions plugin
2014-11-17 13:42:53 +01:00
Alberto Leal
5883ee0b76
Default value for link title for page searches.
...
Google API may not return results with a title attribute.
2014-11-16 16:11:25 -05:00
Adrian Sampson
590b106ed0
echonest: Fix #1096 : log error on repeated error
2014-11-16 12:08:07 -08:00
Adrian Sampson
d8211f1d76
fetchart: Fix RG MBID field name ( fix #1080 )
2014-11-12 20:56:18 -08:00
Adrian Sampson
0d529bae16
Docs tweaks for #1078
2014-11-11 11:57:08 -08:00
Francesco Rubino
2a9064ee21
Fixed format of comments and docstrings.
2014-11-11 18:44:09 +00:00
Francesco Rubino
905d76efec
Merged from upstream
2014-11-11 18:41:24 +00:00
Francesco Rubino
df1503e2ca
Added comments/docstrings to the AudioToolsBackend in the replaygain plugin
2014-11-11 18:11:22 +00:00
Adrian Sampson
d3f0742276
Changelog, tweaks for fetchart sources ( #1075 )
2014-11-11 10:10:43 -08:00
Adrian Sampson
288fb0da4c
Merge pull request #1075 from Kraymer/1066-fetchart_sources
...
fetchart: add 'sources' option
2014-11-11 10:04:45 -08:00
Adrian Sampson
91ad0d9f58
Merge pull request #1069 from Kraymer/1035_no_copyright
...
Remove licensed lyrics from tests resources
2014-11-11 09:58:54 -08:00
Fabrice Laporte
ef6d3efe6d
fetchart: cover engines yield their results
2014-11-10 22:17:34 +01:00
Adrian Sampson
a2d763b745
Fix ftintitle auto permanence ( #485 )
...
Oops. Plugins need to store to the database.
2014-11-09 19:21:09 -08:00
Adrian Sampson
05d5edcd0e
Quiet down logging in #1070
...
This looks mostly helpful for debugging but redundant with the ordinary
logging.
2014-11-09 18:41:54 -08:00
Adrian Sampson
7a9a77b906
Merge pull request #1070 from frubino/master
...
Added backed audiotools to replaygain module and updated documentation
2014-11-09 18:38:38 -08:00
Adrian Sampson
7e4a0f6211
play: Log a message when no output is produced
2014-11-09 14:23:43 -08:00
Fabrice Laporte
09bea52a41
fetchart: fix flake8
2014-11-09 20:55:53 +01:00
Fabrice Laporte
6170c3a179
fetchart: make test_art.py tests pass
2014-11-09 20:41:21 +01:00
Fabrice Laporte
4d9ce94426
fetchart: import itunes only if necessary
2014-11-09 20:40:45 +01:00
Francesco Rubino
be43f629bf
Merge branch 'master' of https://github.com/sampsyo/beets
...
Conflicts:
docs/plugins/replaygain.rst
2014-11-09 14:48:32 +00:00
Francesco Rubino
4bf17486eb
Fixed line lengths, typo in documentation.
2014-11-09 10:29:46 +00:00
Fabrice Laporte
41d0f4d674
remove comment
2014-11-08 23:28:10 +01:00
Fabrice Laporte
1b694e569e
fetchart: add 'sources' option
...
Fasten cover search by enabling engines selection and prioritisation.
2014-11-08 23:20:44 +01:00
Adrian Sampson
701ed2dae9
Limit result set sizes ( fix #1068 )
2014-11-08 08:32:31 -08:00
Adrian Sampson
a9981c1dc7
Comment about workaround in #1073
2014-11-07 19:51:38 -08:00
David
5480ceeaf8
Encode to ascii,not utf8.Replace missing chars
2014-11-07 20:46:35 -05:00
Francesco Rubino
8af5b0e6c3
Added backed audiotools to replaygain module and updated documentation
2014-11-07 18:14:56 +00:00
Fabrice Laporte
b143ad7e3e
fix #1035 do scraping tests on mock data
...
don’t store scraped pages with licensed lyrics in repo
2014-11-06 22:10:15 +01:00
Adrian Sampson
fc6664455a
fetchart: Move iTunes priority
...
I like the CAA as a first-priority search because the images are generally
high-quality and there's no metadata ambiguity (we always find the right
release if it's in the catalog).
2014-11-06 10:37:58 -08:00
kerobaros
899eab334b
fetchart: add iTunes Store art source; depends on python-itunes
2014-11-05 13:38:39 -06:00
Adrian Sampson
0aeadebcea
freedesktop ( #1056 ): Make handler a method
...
This lets us use `self.config`. The previous version, which checked
`beets.config['auto']`, was looking in the wrong scope.
2014-11-02 21:01:31 -08:00
kerobaros
3516fb67eb
Added docstring, copyright and license to plugin.
2014-11-02 22:41:03 -06:00
kerobaros
8daeb7d79e
Fixed up config checking to make freedesktop plugin pass flake8.
2014-11-02 22:35:40 -06:00
kerobaros
6ca34632de
fd plugin now runs on album_imported hook. also logs when album has no art.
2014-11-02 22:05:37 -06:00
kerobaros
418e7c0d12
Merge remote-tracking branch 'upstream/master'
2014-11-02 21:23:31 -06:00
Angel Alonso
ad9786ce81
convert: update documentation and add a trailing comma.
2014-11-02 10:58:46 +01:00
kerobaros
2d82aa85b5
Starting on freedesktop plugin.
2014-11-01 21:47:55 -05:00
Angel Alonso
94c268d17e
convert: copy album art when copying or transcoding.
...
Only implemented to work when matching albums instead of tracks (-a option).
Disabled by default in the configuration of 'convert'.
fix indentation.
Fix Travis nagging over indentation (hopefully).
Finally pep8 conforming.
2014-11-01 19:09:33 +01:00
Adrian Sampson
683e1a278d
Merge branch 'lastimport'
2014-10-30 22:48:14 -07:00
Adrian Sampson
50c7cf0f56
discogs: Fix #1049 : intermittent trailing comma
2014-10-30 09:36:39 -07:00
Adrian Sampson
69b7d1f160
Changelog for #1036 ( fix #1028 )
2014-10-28 11:50:36 -07:00
Adrian Sampson
6d38d9faf4
Merge pull request #1036 from kerobaros/master
...
Re: issue #1028 : "embedart: Resize images only once per album
2014-10-28 11:49:19 -07:00
Adrian Sampson
4f3cd65943
Fix #1045 : whitespace-separated queries in web
2014-10-27 23:14:28 -07:00
kerobaros
3a56077b0c
Fixed logic error, added a .get(bool).
2014-10-27 21:20:26 -05:00
Adrian Sampson
72db4af7f8
Fix #1041 : play unicode logging crash
2014-10-27 09:24:59 -07:00
Thomas Scholtes
464f8cdc04
Types plugin: Field types for albums and documentation example
2014-10-27 10:54:21 +01:00
Adrian Sampson
eb35d7084a
Save Discogs token ( #1040 )
2014-10-26 15:45:34 -07:00
Adrian Sampson
a8a5191cf5
discogs #1040 : Standard API key, handle failure
2014-10-26 15:24:17 -07:00
Adrian Sampson
665b4ac50a
lastimport: Declare play_count type
...
Now you can get the fanciness of the numeric field without configuring the
`types` plugin.
2014-10-26 15:06:48 -07:00
David
d9c9e06674
Add authentication to discogs plugin
2014-10-26 16:26:59 -04:00
David
edbb97bd09
Dropping unused argument
2014-10-25 16:16:32 -04:00
kerobaros
81b513c720
Merge remote-tracking branch 'upstream/master'
2014-10-24 23:41:56 -05:00
Adrian Sampson
9137b5c2f3
Fix another lyrics scraper regression ( #1034 )
...
Along with a test.
2014-10-24 20:08:32 -07:00
kerobaros
f782dfd376
I'll get used to this git thing one day. Cleaning up.
2014-10-24 21:36:30 -05:00
kerobaros
d06da6381f
Updating to master to form a new PR.
2014-10-24 21:33:09 -05:00
Adrian Sampson
0325fe2225
lyrics: Remove script tags ( fix #1034 )
2014-10-24 17:33:11 -07:00
Adrian Sampson
0bf7cb8657
Merge pull request #1011 from Kraymer/ftintitle_auto
...
ftintitle: add 'auto' option
2014-10-24 17:16:42 -07:00
Adrian Sampson
a7b7e23436
Minor fixes for #1033
2014-10-24 16:46:55 -07:00
kerobaros
9a191baca4
Working on issue #1028 , resize images only once per album.
2014-10-24 15:01:52 -05:00
kerobaros
ca431b0bf8
Seperated some code out from extract() into get_art(item). Cleaner and quicker way to check for embedded art.
2014-10-23 22:37:19 -05:00
kerobaros
7f37514bb9
Whoops, trailing space. Take 2.
2014-10-23 21:17:42 -05:00
kerobaros
9be753736b
Slight style tweaks.
2014-10-23 21:13:30 -05:00
kerobaros
e06f492f91
Whoops, take two.
2014-10-23 15:31:38 -05:00
kerobaros
75b62b723f
Added "ifempty" config to embedart plugin, re: issue 1020
2014-10-23 15:27:15 -05:00
Fabrice Laporte
343972f5d0
move metadata management in command function
2014-10-18 11:04:10 +02:00
Fabrice Laporte
ac57ef0e67
restore write argument for ft_in_title
2014-10-14 20:58:36 +02:00
Adrian Sampson
7754fe5a40
embedart: Fix logging during import ( #1014 )
...
Regression introduced in 2813cd26c1 .
2014-10-14 09:42:11 -07:00
Fabrice Laporte
4884ae3c46
register import hook only if needed
2014-10-13 22:25:09 +02:00
Fabrice Laporte
740b510ed7
restoring ft_in_title implementation
2014-10-13 21:21:28 +02:00
Fabrice Laporte
cc6080fa21
ftintitle: add 'auto' option
2014-10-12 22:44:34 +02:00
Adrian Sampson
4a61ce7c6b
Use shared Last.fm API key
2014-10-12 13:27:04 -07:00
Adrian Sampson
06cfd4c549
Use MatchQuery for mb_trackid lookup
2014-10-12 13:21:26 -07:00
Adrian Sampson
490f84fc34
Style fixes
2014-10-12 13:19:03 -07:00
Adrian Sampson
a07e20eaf8
Safer GET parameter formulation for AS URL
2014-10-12 13:11:58 -07:00
Adrian Sampson
d6266c2542
Add lastimport plugin by @rafi
...
From rafi/beets-lastimport at 72c199d599ee76f2a5fa366a032ad33491f2c82c.
2014-10-12 13:00:27 -07:00
Heinz Wiesinger
ec56f2bbd4
Make 'media' an item level field.
...
Releases can consist of discs of various media types, most typically
CD/DVD combo releases. Having the media value an album level field
forces all discs to be of the same type. Making it an item level
field instead seems to be the proper thing to do here.
Fixes #161
2014-10-12 12:21:13 +02:00
Adrian Sampson
9e3a737b06
Merge pull request #1008 from otakucode/master
...
Added handler for requests.exceptions.ConnectionError to discogs plugin.
2014-10-11 22:11:01 -07:00
Adrian Sampson
434280f248
A couple of coverage tweaks
2014-10-11 22:05:22 -07:00
Dustin Rodriguez
020c96d99f
Added handler for requests.exceptions.ConnectionError to discogs plugin.
2014-10-11 20:50:31 -04:00
Adrian Sampson
b777bde0af
Fix #1006 : errant info-level log
...
Introduced in e99df7bc65 .
2014-10-11 15:05:01 -07:00
Adrian Sampson
0749d4716c
duplicates: Fix #999 (check "checksum" type)
2014-10-11 12:28:41 -07:00
Stig Inge Lea Bjørnsen
6f9abf4340
Merge pull request #925 from silb/bug-911-importadded-reimport
...
Fixes bug #911
2014-10-11 15:53:03 +02:00
Stig Inge Lea Bjørnsen
79a9593cb9
Add quoting and use displayable paths in log messages
2014-10-10 22:52:54 +02:00
Ben Lumley
10d05a32be
Trivial typo fix
2014-10-10 09:57:32 +01:00
Fabrice L.
e6bf8c21d8
Merge pull request #992 from KraYmer/lyrics-coverage
...
Improve lyrics coverage
2014-10-09 22:11:28 +02:00
Adrian Sampson
c5293df963
replaygain: More descriptive backend errors
...
This avoids a bare `except:` to catch specific errors and give better messages
when they fail. Should provide more insight to this trouble:
https://groups.google.com/d/msg/beets-users/6d-TOg0SuPY/iL39tmo3rqUJ
Also related to #874 .
Feedback from @yevgenybezman or others more familiar with the backend would be
welcome.
2014-10-09 12:26:53 -07:00
Adrian Sampson
983aac287b
Add a displayable_path call in embedart ( fix #995 )
2014-10-09 11:13:39 -07:00
Fabrice Laporte
a6f0649c40
return no lyrics when HtmlParseError occured
2014-10-09 08:22:51 +02:00
Fabrice Laporte
c0c474b20f
lyrics: strip title excerpt before matching
...
improve the extraction of lyrics title from url title and increase the
matching threshold as a consequence.
2014-10-08 14:49:09 +02:00
Stig Inge Lea Bjørnsen
3bd3a817de
Comply with PEP8.
2014-10-07 22:05:44 +02:00
Stig Inge Lea Bjørnsen
125f6422d7
Bug #911 reimport detection for the importadded plugin
...
Reimports are now detected by inspecting the fields for reimported items
and replaced albums in ImportTask.
Reimported albums and items are skipped.
2014-10-07 21:05:43 +02:00
Lucas Duailibe
17dbf2a22d
play: remove temporary m3u file
2014-10-03 12:49:06 -03:00
Ralf Sieger
ab5c5dcfd5
added option for initial volume setting
2014-09-30 09:34:04 +02:00
Fabrice L.
54c9761135
Merge pull request #981 from KraYmer/lyrics-enh
...
Lyrics scraping code refactored
2014-09-27 11:25:06 +02:00
Fabrice Laporte
3ef52e8ead
lyrics.py: remove unnecessary re compile step
2014-09-26 07:08:54 +02:00