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