Commit graph

2045 commits

Author SHA1 Message Date
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