fix a bug in genre search, add a test for genre search, fix a wrong debug output, more consistent codestyle in genre.cpp