Commit graph

169 commits

Author SHA1 Message Date
Bruno Cauet
8165dec985 Delete manual formattings of album & item 2015-01-25 21:32:22 +01: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
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
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
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
32673b87e7 Update multiple plugins: pass the logger around 2015-01-06 21:42:09 +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
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
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
Adrian Sampson
fd94094c1b Changelog and name change for #1156 2014-12-30 15:27:17 -04: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
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
David Logie
c7b6f75ca8 lastgenre: Automatically retry asciified lookups if the initial lookup fails. 2014-12-21 12:58:15 +00:00
David Logie
c227501a5d lastgenre: Optionally replace unicode characters when performing lookups. 2014-12-20 22:13:05 +00:00
Adrian Sampson
72436644a6 Merge pull request #909 from arogl/master
Clean up of logging messages as described here
2014-09-14 13:14:35 -07:00
Adrian Sampson
4d72643b15 Merge pull request #945 from gwern/master
lastbeats: explain that the whitelist has been modified
2014-09-11 12:21:38 -07:00
gwern
971bff95fa lastbeats: explain that the whitelist has been modified
current description sounds like the whitelist is regularly synced and should not be/has not been edited
2014-09-11 14:38:33 -04:00
gwern
35efa7283f genres.txt: rm fake genres
see issue #943; deleted all suggestions except 'early music' which some people may want/find meaningful
2014-09-11 14:37:01 -04:00
e5e4eaeacd39c5cfba4d7c852c48277ae50331e6
65de93941d flake8 cleanup
Cleanup after cleanup
2014-09-09 11:28:43 +10:00
e5e4eaeacd39c5cfba4d7c852c48277ae50331e6
66aee8094f Clean up of logging messages as described here
All logging now prefers the ' (single quote) over the " (double quote)

https://github.com/sampsyo/beets/wiki/Hacking
2014-09-09 11:28:43 +10:00
Thomas Gordon
f910ac6a63 Correct busted encoding hopefully 2014-09-06 14:14:15 -04:00
Thomas Gordon
4c622966e6 Update genres-tree.yaml 2014-09-05 11:13:29 -04:00
Thomas Gordon
0bc3836d52 Alphabetize! Thanks @KraYmer 2014-09-03 09:25:13 -04:00
Thomas Gordon
76c8ea4a37 Update genres-tree.yaml
Scraped https://en.wikipedia.org/wiki/List_of_popular_music_genres for the first time since @KraYmer did back in (apparently) October 2011. This should be much more useful now to those who have genre canonicalization enabled. Script is in public repo of mine :)
2014-09-02 16:19:49 -04:00
nrgetik
8cc4f96548 Update genres-tree.yaml
funkd is clearly a typo
2014-07-18 11:49:29 -04:00
Adrian Sampson
bc35015251 Changelog for #847 (fix #805) 2014-07-01 14:29:35 -07:00
Fabrice L.
eb2dbdc314 flake8ness 2014-06-28 10:35:54 +02:00
Fabrice Laporte
df47f19e86 lastgenre: remove duplicate genres 2014-06-28 10:31:12 +02:00
Adrian Sampson
362db8f22f Merge pull request #728 from sampsyo/lastgenre-tests-new
Tests for lastgenre (cleaned up)
2014-04-29 08:38:56 -07:00
Adrian Sampson
233f71a457 Use real booleans for whitelist/canonical options
As opposed to the strings "true" and "false".
2014-04-28 23:00:00 -07:00
Fabrice Laporte
ef3c1cd1ff use booleans for whitelist and c14n options
homogenise options setup using booleans, while keeping the empty string
(synonym of ‘true’) for backward compatibility.
2014-04-28 10:31:22 +02:00
Adrian Sampson
d5dbaeff7a lastgenre: Restore default whitelist 2014-04-27 13:54:32 -07:00
Fabrice Laporte
0b3c5ddbe0 Canonicalization only return most common genre 2014-04-27 22:27:20 +02:00
Fabrice Laporte
817b8cc96e Allowing the whitelist to be disabled
By default it is disabled, setting the value to the empty
string will use the built-in whitelist (same behaviour than
c14n).
2014-04-27 22:26:09 +02:00
Adrian Sampson
35b6602795 Use self.config instead of global config 2014-04-26 21:00:59 -07:00
Adrian Sampson
e7af3319f8 lastgenre: Restore min_weight option 2014-04-26 20:59:39 -07:00
Fabrice Laporte
d0d3c18da2 lastgenre: rewrite filtering logic to make tests pass
- remove filter_tags() as genres should not be removed this soon while
c14n has not been applied
- group all filtering logic in the function _resolve_genres (formerly
_strings_to_genre)
2014-04-26 20:51:13 -07:00
Fabrice Laporte
2e8e55736d get rid of module level options variable
Conflicts:
	beetsplug/lastgenre/__init__.py
2014-04-26 20:51:00 -07:00
Fabrice Laporte
499a7b868e Move the filtering logic of '_tags_for' function into a dedicated 'filter_tags' function. 2014-04-26 20:50:04 -07:00
Thomas Scholtes
e96753f96a Plugins use import_task.album 2014-04-25 13:52:03 +02:00
Adrian Sampson
e5a9db1cac fix up some indentation warnings in plugins 2014-04-13 17:55:49 -07:00
Fabrice Laporte
3ead936fe5 flake8 cleaning beetsplug/*
Remaining warnings are related to visual indentation.
2014-04-13 23:24:57 +02:00
Thomas Scholtes
c3ea1ded30 Add item.try_write() to log errors
Many commands and plugins use `item.write()` to update tags. Since the success
of the call is not critical to the functionality of most consumers we want to
catch any exceptions, log an error and continue with our task. The new method
encapsulates this logic.

This fixes #675.
2014-04-10 15:26:05 +02:00
Bruno Tournay
81b74151ca Genre separator from config must be unicode string 2014-03-19 22:16:02 +01:00
Bruno Tournay
618708916b Separator in genre lists can now be configured 2014-03-18 22:03:11 +01:00
Adrian Sampson
3dd9e4622f lastgenre: tolerate el.weight is None 2014-02-11 09:49:15 -08:00
Adrian Sampson
1ad1f7634c py26 compatible format strings (fix #490) 2014-01-09 11:22:49 -08:00
Adrian Sampson
5fb7c424ad use canonical parent, not base tag (#478) 2013-12-18 12:01:55 -08:00
Adrian Sampson
3338ef2ff2 lastgenre: multiple + canonical genres (fix #478) 2013-12-17 17:29:37 -08:00
Adrian Sampson
2d2836825f #416: workaround comment, py26-ify 2013-10-17 12:10:17 -07:00
Peter Schnebel
b1570beba9 Merged the ``multiple` and `max_genres` option into one `count`` option.
Updated debug output to waste less lines.
2013-10-17 09:52:35 +02:00
Peter Schnebel
b2a23a58e2 fixed indentation 2013-10-17 09:30:26 +02:00
Peter Schnebel
0ff15c5c4d The way of the impatient is filled with useless commits :( 2013-10-16 11:35:26 +02:00
Peter Schnebel
fa10515799 Bugfix for Album.get_top_tracks workaround. 2013-10-16 11:31:18 +02:00
Peter Schnebel
d339e2f815 Workaround for pylast issue https://code.google.com/p/pylast/issues/detail?id=85 as suggested by @sampsyo 2013-10-16 08:45:13 +02:00
Peter Schnebel
c5896684f3 The following only applies when ``multiple`` is activated:
Return one valid genre even if its weight is lower then ```min_weight```.
Default for ```min_weight``` is now *10*.
Added new config option ```max_genres``` to limit the amount of genres returned.  Default is *3*.
2013-10-15 13:20:45 +02:00
Peter Schnebel
eafceaa0ed Added min_weight option to lastgenre, to provide for filtering out unpopulare genres. 2013-10-14 12:36:39 +02:00
Adrian Sampson
2aebec0928 #397: shorter option name, docs, changlog
I changed the option name from "multiple_genres" to "multiple".
2013-10-06 10:34:32 -07:00
Adrian Sampson
f35d7fec9c multiple genres (#397): simplify implementation
- don't use vestigial global object for config
- list comprehensions ftw
2013-10-06 10:29:47 -07:00
Ross Ashley
7a7d009671 Removed pdb stuff and cleeaned up description. 2013-10-03 15:15:18 -04:00
Ross Ashley
8525983791 For the comma delimited lastgenre addition, the old way is default.
There is a new option called multiple_genres which defaults to False
but when set to True, the comma delimited list of genres is returned
by lastgenre.

So, if you want a comma delimited list, it is

lastgenre:
    multiple_genres: True
2013-10-03 11:39:33 -04:00
Ross Ashley
7c0d828a2e Replaced unnecessary code with one line. 2013-09-27 10:08:09 -04:00
Ross Ashley
514fa6cf0c Removed some unused and commented out code. 2013-09-26 15:18:58 -04:00
Ross Ashley
4291932298 Added ability to store comma delimited lists of genres using lastfm
and the local genre.txt file in the usual way.

Using this, a song might now have a genre of 'House, IDM, Dance',
instead of just 'House'.
2013-09-26 10:39:32 -04:00
Adrian Sampson
bb21ec692e lastgenre: add album.save() 2013-09-25 08:45:18 -07:00
Adrian Sampson
c7fe017752 remove Library.{move,store} methods
These methods are now provided by LibModel, which makes dealing with items and
albums symmetric.
2013-08-21 15:34:45 -07:00
Adrian Sampson
aaafba4d28 changelog for #254 2013-04-21 20:41:01 -07:00
Fabrice Laporte
0fb877a059 lastgenre: invert 'force' option default value. 2013-04-21 23:34:20 +02:00
Fabrice Laporte
6fdfabe4b7 Revert "lastgenre: force real lookup during import only if no custom whitelist set."
This reverts commit 4be30fca2e.
2013-04-21 10:35:08 +02:00
Fabrice Laporte
4be30fca2e lastgenre: force real lookup during import only if no custom whitelist set. 2013-04-20 14:29:14 +02:00
Adrian Sampson
16e0648c81 lastgenre: fix crash with canonicalization 2013-04-10 10:34:06 -07:00
Adrian Sampson
f7f2454134 docs & style for #92
We already have a nice plurality() function in beets.util to calculate the most
popular value of something, so I reused that.
2013-02-06 10:55:48 -08:00
Peter Schnebel
7193f4e863 Do not write track-level genres if source is not 'track'. 2013-02-06 08:41:20 +01:00
Peter Schnebel
9f1e9031b6 Try to guess 'Various Artists' genre based on track genres if source is 'track'. 2013-02-06 08:15:29 +01:00
Peter Schnebel
d667fca02e Do not write track-level genres if source is not 'track'.
For 'Various Artist' compilations without a usefull 'album' genre, pick the most used track / track-artist genre.
2013-02-06 08:04:58 +01:00
Adrian Sampson
976bc20900 collapse separate album and item paths (#92)
Should reduce copypasta overhead significantly.
2013-02-05 12:16:53 -08:00
Adrian Sampson
3860a5ac27 lastgenre: "auto" config option 2013-02-05 12:02:51 -08:00
Adrian Sampson
e50e28dc38 canonicalize original genre (#92) 2013-02-05 11:58:24 -08:00
Adrian Sampson
d1e752fdeb simplify configuration handling (#92) 2013-02-05 11:51:32 -08:00
Adrian Sampson
f38bed787e remove verbose option (#92)
The lastgenre command should always log what it's doing so the user can see
the progress being made. If you really don't want any output, just pipe to
/dev/null.
2013-02-05 11:40:04 -08:00
Adrian Sampson
1fe36057b0 Python style and legibility cleanup for #92 2013-02-05 11:34:17 -08:00
root
f83e9fb8bb qbugfix 2013-02-05 08:13:36 +01:00
Peter Schnebel
30dff5afff cleaned up, removed debug 2013-02-04 21:47:35 +01:00
Peter Schnebel
4df9521007 experimental track / album / artist based genre stuff per item 2013-02-04 20:24:22 +01:00