Package: beets-autogenre
beets-autogenreAbeetsplugin to assign genres to all items within your music library.FeaturesGets genres from last.fm using thelastgenre plugin.Favours track as last.fm genre source when track is a remix.Fallback to estimating the genre using thextractor plugin/Essentia.Fixes the genre of (re)mixes by matching the genre tree against the track and album title.Allows to specify the genre per item manually.DependenciesThe following beets plugins and their dependencies must be installed:lastgenre plugin.xtractor pluginwhich relies onEssentia.Installationpython3-mpipinstallbeets-autogenreConfigurationEnable the plugin and add aautogenresection to your beetsconfig.yamlas follows:plugins:-autogenre-lastgenre-xtractorautogenre:pretend:falseall:falseforce:falselastgenre:truextractor:truefrom_title:truegenre_rosamerica_strong:0.8genre_electronic_strong:0.8genre_electronic_prepend:0.5genre_electronic_append:0.45lastgenre:auto:falseprefer_specific:truesource:albumcount:4min_weight:15canonical:/etc/beets/genre-tree.yamlwhitelist:/etc/beets/genres.txtxtractor:auto:nodry-run:nowrite:yesthreads:4force:noquiet:nokeep_output:nokeep_profiles:nooutput_path:/tmp/xtractoressentia_extractor:/usr/local/bin/essentia_streaming_extractor_musichigh_level_targets:genre_rosamerica_probability:# 0..1path:"highlevel.genre_rosamerica.probability"type:floatgenre_electronic:path:"highlevel.genre_electronic.value"type:stringgenre_electronic_probability:# 0..1path:"highlevel.genre_electronic.probability"type:floattimbre:# "dark" or "bright"path:"highlevel.timbre.value"type:stringtonal_atonal:# "tonal" or "atonal"path:"highlevel.tonal_atonal.value"type:stringkey_edma:# e.g. "C#"path:"tonal.key_edma.key"type:stringkey_edma_scale:# e.g. "minor"path:"tonal.key_edma.scale"type:stringextractor_profile:highlevel:svm_models:-/var/lib/essentia/svm-models/beta5/danceability.history-/var/lib/essentia/svm-models/beta5/gender.history-/var/lib/essentia/svm-models/beta5/genre_rosamerica.history-/var/lib/essentia/svm-models/beta5/genre_electronic.history-/var/lib/essentia/svm-models/beta5/mood_acoustic.history-/var/lib/essentia/svm-models/beta5/mood_aggressive.history-/var/lib/essentia/svm-models/beta5/mood_electronic.history-/var/lib/essentia/svm-models/beta5/mood_happy.history-/var/lib/essentia/svm-models/beta5/mood_sad.history-/var/lib/essentia/svm-models/beta5/mood_party.history-/var/lib/essentia/svm-models/beta5/mood_relaxed.history-/var/lib/essentia/svm-models/beta5/moods_mirex.history-/var/lib/essentia/svm-models/beta5/voice_instrumental.history-/var/lib/essentia/svm-models/beta5/tonal_atonal.history-/var/lib/essentia/svm-models/beta5/timbre.historyFor more information, seeCLI.UsageOnce theautogenreplugin is enabled within your beets configuration, you can detect and assign the genres for each track within your library as follows:beetautogenreCLIUsage: beet autogenre [options]

Options:
  -h, --help          show this help message and exit
  --pretend           do not persist item changes but log them
  -f, --force         reevaluate genres for items with a matching genre_source
  -a, --all           overwrite genre if genre_source not specified
  --no-all            do not overwrite genre from unspecified source
  --lastgenre         use lastgenre plugin
  --no-lastgenre      do not use lastgenre plugin
  --xtractor          use xtractor plugin
  --no-xtractor       do not use xtractor plugin
  --from-title        derive genre from title
  --no-from-title     do not derive genre from title
  --parent-genres     add primary genre's parent genres
  --no-parent-genres  do not add primary genre's parent genres
  --genre=GENRE       specify the genre to assign to the selected itemsDevelopmentRun the unit tests (containerized):maketestRun the e2e tests (containerized):maketest-e2eTo test your plugin changes manually, you can run a shell within a beets docker container as follows:makebeets-shA temporary beets library is written to./data.
It can be removed by callingmake clean-data.