Re: [Rhythmbox-devel] Merging very similar genera (in Jamendo)



I wrote:
(2) Do some clean up in the Jamendo plugin when parsing the catalogue
i.e. Strip any leading/trailing spaces, and perhaps apply "Title Case" (lower case everything, except the first letter of each word).

How about changing line 319 of JamendoSource.py (using the copy in rb 0.10.1) from:

self.__db.set(entry, rhythmdb.PROP_GENRE, artist['genre'])

to:

self.__db.set(entry, rhythmdb.PROP_GENRE, \
artist['genre'].strip().replace(' ,',',').replace('  ',' ').title())

This reduces the number of genres from almost 2000 to just over 1700.

Peter



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]