Commit graph

119 commits

Author SHA1 Message Date
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 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
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
Tom Jaspers
f4ed3e16b1 Config: Add redacted fields from included plugins 2015-03-24 17:01:33 +01:00
Adrian Sampson
e7f8a627e9 Style fixes for pep8 1.6 2015-02-07 12:51:54 -08: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
8165dec985 Delete manual formattings of album & item 2015-01-25 21:32:22 +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
Bruno Cauet
02d8e88ef1 Replace all mentions of 'str' with 'bytes' 2015-01-20 12:48:15 +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
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
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
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
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
00d5473187 Merge branch master into logging
Conflicts:
	beetsplug/lyrics.py
2015-01-06 21:46:04 +01:00
Bruno Cauet
63041736e3 Convert lyrics plugin, with OO rewrite of backends 2015-01-06 21:42:10 +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
daba9e770e Fix #1204: insecure request warning in lyrics 2015-01-06 11:01:11 -08: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
7df8bef8b7 Update logging imports: logging → beets.logging 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
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
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
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
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
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
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
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
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
9137b5c2f3 Fix another lyrics scraper regression (#1034)
Along with a test.
2014-10-24 20:08:32 -07:00
Adrian Sampson
0325fe2225 lyrics: Remove script tags (fix #1034) 2014-10-24 17:33:11 -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