Picard-Last.fm.ng-Plugin icon indicating copy to clipboard operation
Picard-Last.fm.ng-Plugin copied to clipboard

Can't work out how to get consistent tags for all album/artist tracks

Open pdf opened this issue 8 years ago • 7 comments

I used to use last.fm-plus, with only artist tags enabled, and that worked well to for categorizing artists into genres. With this plugin, I cannot seem to get consistent genre/grouping applied to all album tracks - I end up with different tags on various tracks, which really messes up indexing in other apps.

Is there any way to get it to just apply top artist tags to all tracks? I tried messing with weights but failed to get it to do anything useful. I tried enabling only metatag_album, and disabling metatag_track, no good. I'm really out of ideas here without reading/hacking all the code.

pdf avatar Mar 25 '16 22:03 pdf

this plugin works on album and track basis, so you are bound to get varying results per track.

there are two areas you can fine tune that...

  1. if you want per-album consistency use the albumgrouping and albumgenre variables. They are suggested for use in naming rules (eg zu sort albums per genre in directories), but you can use them in a script to eg. overwrite all the per-track genre information with the per-album albumgenre.
  2. if you want to put even more emphasis on the artist and not necessarily the album tagging from last.fm, change the weights (lastfmng/settings.py#L79). however, this is not exposed in the ini file for a reason: it probably won't do you any good :) ...
    • in the per-abum scope the artist is already weighed 55x (that's a lot compared to the album 15x and track 30x). in general per-artist consistency is more important, than picking out a variation in genre of a single weird album.
    • in the per-track scope, the artist is weak on purpose 2x, compared to track 8x. this is to pick out more variation to find things like that one quiet song in the album. i find that very useful to eg. filter for an artist and then maybe find their more "jazz" songs or the more "indy" tracks...

anyway, back to your issue: the weights are just multiplying factors to whatever we get from last.fm they can never guarantee consistency... in the end it all depends on last.fm. so i'd suggest a script as mentioned in 1. the albumgenre and albumgrouping variables are guaranteed to have per-album consistency at least and the artist weight is already strong for them.

fdemmer avatar Mar 26 '16 00:03 fdemmer

When you say albumgenre and albumgrouping variables, are you saying that setting metatag_* to one of those values triggers a different code-path? And so, the only way to use the album data is to populate those tags, then write a script to copy them to the standard tags? I was expecting metatag_album to trigger the album code, and metatag_track to trigger the track code - wouldn't that make more sense than magic tag names?

pdf avatar Mar 26 '16 00:03 pdf

I've done some testing, and even using albumgenre/albumgrouping, and an artist weight of 1000, I still have albums from the same artist ending up with different albumgrouping, how is that possible?

pdf avatar Mar 26 '16 01:03 pdf

  • album* are both from the same "codepath" (code is actually the same, but things like weights vary, different paramenters). the others arent, like genre, grouping...that's what i called per-album and per-track scope. (lastfmng/plugin.py#L444, plugin processes tags for every single track "per track scope" -> "grouping" and then again for the whole album "per album scope" -> "albumgrouping")
  • the settings metatag_album and metatag_track define the variable names that will be filled with data by the plugin. only (the categories) genre, grouping and mood are available in per-album scope. try it: set metatag_album = whatisthisshit in the [category-grouping] ... you'll see that "albumgrouping" is gone.
  • what artist? what albums? where exactly did you set the artist weight? you need to give me concrete examples, if you want me to try to reproduce. musicbrainz album URLs.

fdemmer avatar Mar 26 '16 07:03 fdemmer

  • I think this is what I was suggesting my interpretation was.
  • So, what is the significance of the naming of metatag_album, and metatag_track? What happens if I put albumgrouping in metatag_track, and grouping in metatag_album?
  • A number of artists, but as an example, I tried tagging all my Black Sabbath, and various albums came out with different albumgroupings. I changed the weight in settings.py:
# toptag to metatag configuration
CONFIG = {
    # on album level set the following metadata
    'album': {
        # multiplication factors for each type of toptag
        'weight': dict(album=15, all_artist=1000, all_track=30),
    },
    # for each track set the following metadata
    'track': {
        # TODO *plus supports disabling toptag types per metatag... eg. country only via artist toptags.
        'weight': dict(artist=2, track=8),
    }
}

pdf avatar Mar 26 '16 08:03 pdf

When you say albumgenre and albumgrouping variables, are you saying that setting metatag_* to one of those values triggers a different code-path? And so, the only way to use the album data is to populate those tags, then write a script to copy them to the standard tags? I was expecting metatag_album to trigger the album code, and metatag_track to trigger the track code - wouldn't that make more sense than magic tag names?

no, because I want both. per album and per track genre/grouping information.

  • per album for naming.
  • per track for track tagging.

if you don't. script.

  • I think this is what I was suggesting my interpretation was.
  • So, what is the significance of the naming of metatag_album, and metatag_track? What happens if I put albumgrouping in metatag_track, and grouping in metatag_album?

then you get the per album scope in grouping and the per track scope in albumgrouping.

fdemmer avatar Mar 26 '16 08:03 fdemmer

I don't generally write Python, but I think I might just go and try to resurrect the old plugin - migrate it to use the 2.0 API, since that's worked perfectly for me through previous years. Thanks for taking the time to try explaining your logic to me, but I'm afraid I'm not grokking it.

pdf avatar Mar 26 '16 09:03 pdf