A beets plugin to fetch genre information from rateyourmusic.com
Latest commit eebdb27 Nov 4, 2014 @jcazevedo Merge pull request #3 from ruippeixotog/some-code-style
Simplify some expressions because of defaultdict



beets-rymgenre is a beets plugin to fetch genre information from rateyourmusic.com and assigning it to your albums and items.


The plugin requires lxml and requests, which you can install using pip by typing:

$ pip install lxml requests

After having lxml and requests installed, edit your config file and add the path to the beetsplug folder of a clone of this repository to your pluginpath line. Also enable the plugin by adding the rymgenre value to your plugins line.


rateyourmusic.com attributes genres per album. Each album has a set of primary genres and a set of secondary genres. You can configure the plugin to set only the primary genres of an album or both the primary and secondary genres. There is also a tree of genres and you can set only the most specific genres for an album or the union of ancestor genres for each genre. The default configuration is setting all primary and secondary genres and their ancestors. You can override both settings by using the classes and depth configuration values. The classes configuration can be either primary or all, while depth can be either node or all:

    classes: all
    depth: all

It is also possible to configure the separator to use for multiple genres. The default value is ', ', but it is customizable through the separator configuration value:

    separator: ' / '


beets-rymgenre doesn't run automatically on import. Instead, one should use the command beet rymgenre [QUERY] to fetch genres for albums matching a certain query. The genre import requires user confirmation and can be overriden by selecting a different alternative or by specifying a rateyourmusic.com URL.


Thanks to Rui Gonçalves, who created the original genres-tree yaml, using his scala-scraper library.


Copyright (c) 2014 Joao Azevedo. See LICENSE for details.