Topic: Last.fm Plus Genre and extended tags plugin for Picard 0.15+

Description:
This plugin expands upon the default lastfm plugin to provide many new options when tagging your files.
It attempts to get one or more Major genre or Grouping tag, One or more Genre, Mood, Occasion and Category tags
It allows getting a Country and or City tag, A Decade tag and an 'Original' Year tag.
Tags can be retrieved for the Artist only, Track only or a combination of Track and Artist tags.
All tags can be customised in lists defined in the options, many default values are provided
Terms can be translated into other terms for similar genres etc. Only terms defined are used, meaning no unwanted tag values

Install and Download:
Use the plugin from this link, http://www.mediafire.com/?qlso9gc8c75aq5a (plugin version 0.13)
Use this page as a guide to how the plugin works http://wiki.musicbrainz.org/Picard_Docu … Lastfmplus

I have tested and updated the plugin for 0.15, and migrated RifRaf's original documentation to the MBz wiki.

Thanks to bitmap for the initial 0.15 fix; RifRaf and Partner for the original last.fm Plus plugin (both disappeared into the realms of the internet) and Luks for the original last.fm plugin this all came from :)

Changes in lastfmplus-0.13
- Caching is now compatible with 0.15 webservice requests manager - avoids re-requesting the same URL (especially for artist tags)
- code that was accessing/updating album._new_tracks removed
- Request delay reduced to 200ms, in accordance with http://www.last.fm/api/tos so should be ~5x faster now.
- Default "year" filter list updated
- Remove redundant "split artists" code

TODO:
- Fix/remove the original year/original date logic. The plugin still makes strange changes to the MB-sourced metadata (it should not), and directly adjusts ID3-specific tags rather than using Picard's support
- Needs massive cleanup to be more maintainable :(
- Fix/review/apply some of the fixes noted from the old thread

Please let me know any feedback/bugs/issues. I'll try and fix 'em.

Original thread by RifRaf, and plugin history: http://forums.musicbrainz.org/viewtopic.php?id=1795

Re: Last.fm Plus Genre and extended tags plugin for Picard 0.15+

If you've noticed in v0.13 that bulk sets of albums refresh and complete loading in a weird order, please re-download the plugin (or you can find/replace in __init__.py for "Priority=False", change it to "Priority=True".) There was a short period of time where the wrong version was uploaded. Apologies.

Re: Last.fm Plus Genre and extended tags plugin for Picard 0.15+

I have tested the plugin last night and so far it looks good (all working as expected).
Thanks for all your work in updating it

Re: Last.fm Plus Genre and extended tags plugin for Picard 0.15+

Hi,

Thanks for the great plugin.

I came across a problem with major and minor tags and the max tags written setting. If I have say the following settings:

Max Tags - Group = 1
Max Tags - Genre = 4

Tag List Grouping = pop, dance, trance
Tag Lists Genres = pop, dance, trance, etc

If my track is tagged with pop, dance and trance on last.fm, I will correctly get only one Group Tag, but I also only get 1 Genre tag, whereas I expected all three.

Cheers,
Menno

Re: Last.fm Plus Genre and extended tags plugin for Picard 0.15+

Can you give me an example track and album on last.fm for which this is true, which I can test with?

Also, what are your settings for using track vs. artist tags; and the %ages for minimum, max tag drop? Possibly best if you can upload a screenshot of the first tab of the options page somewhere.

6 (edited by Sagehorn 2011-09-22 13:00:42)

Re: Last.fm Plus Genre and extended tags plugin for Picard 0.15+

Hey, any Idea why i cant generate genre-tags?
I hadnt the custom settings after installations.. maybe thats why it doesnt work...
Maybe i have to deinstall the plugin completely? If so, where?

[Edit] Okay, it worked with defaults settings (have other experiences too..)
But the genre-tags are not the last.fm top tags.. dont know why...

Re: Last.fm Plus Genre and extended tags plugin for Picard 0.15+

If you can send me a screenshot of your settings and let me know which release/tracks you're tagging as an example (and what you expect to see as the genre, vs what you are seeing), I can take a look. :)

Re: Last.fm Plus Genre and extended tags plugin for Picard 0.15+

I've had a few instances where during re-tagging multiple releases by a range of artists, only the first album by each artist would have the genre tags written to them and the rest are skipped. If I tag each artist separately then its fine. I can't see a reason for this.... any ideas?

Re: Last.fm Plus Genre and extended tags plugin for Picard 0.15+

Nope. Not sure I really understand to be honest. Unless I can replicate it... I probably can't fix it. Please give me a set of steps whereby I can replicate a problem with a given set of releases/tracks (and a a description of what the existing files look like, if it matters) and I'll try and fix it.

Re: Last.fm Plus Genre and extended tags plugin for Picard 0.15+

I dragged a selection of folders with a total of approx 1500 files into Picard. These files have been recently scanned and saved, so all up to date, I'm now just adding genres using this plugin. All files were then saved again. If I then check the same folders in Mp3tag I see that only 70% are fully tagged. If I refresh the list in Picard the files without tags with show up as unsaved and I have to save them again.

If there are multiple albums by one artist being saved then I am always seeing only one or two of them saving accurately.

Re: Last.fm Plus Genre and extended tags plugin for Picard 0.15+

I cannot replicate such a generic issue as this. This sounds like a general Picard issue - what does it have to do with the lastfmplus plugin? Are you implying that if you disable the plugin everything works as expected? What is displayed in Help > View Log?

Re: Last.fm Plus Genre and extended tags plugin for Picard 0.15+

To be honest I don't know if it is because of Picard or the Plugin. The files are all freshly saved with the MusicBrainz information and I never noticed any occurrences of albums/files being skipped or having errors before using the plugin. So I've just deleted artist name and album titles from a bunch of files, put them through Picard, and again, some albums don't have the genre tags written to them but the missing info from MB is saved.

There are no errors recorded in the log.

Re: Last.fm Plus Genre and extended tags plugin for Picard 0.15+

Have you looked on last.fm to see whether those artists/tracks have tags against them that meet your filters and plugin settings? You need to give me an example, or there's really nothing I can do....

Re: Last.fm Plus Genre and extended tags plugin for Picard 0.15+

Yeah if I run Picard again with just one artist, then I get all of the tags in all of the abums. Its pretty much happened with most artists in my collection.

To give you an example though... I just dragged my folder of 'V' artists into Picard, and these artists: VAST, Velvet Revolver, Volbeat, Veruca Salt, Visions of Atlantis, Van Halen and a few various artist albums all missed tagging some releases by them. No issues if I refresh Picard and save what is needed again or if I just drag one artist at a time.

Re: Last.fm Plus Genre and extended tags plugin for Picard 0.15+

Sorry, it's really just not specific enough for me to understand what you're seeing/observing with confidence. It sounds like it may be a network issue or other issue with Last.fm's service. You might want to try disabling getting track-level tags and see if it's better then.

Re: Last.fm Plus Genre and extended tags plugin for Picard 0.15+

Hello.  First off, I want to say thanks for all the effort you guys have put into this.  Even though I haven't gotten it to work for me yet, I can tell it's awesome.

Haven't found any other way to automatically tag mp3's with their respective genres yet.  My collection is looking pretty good, so hopefully I can figure this out.

I'm currently using Picard 0.15.1 on win7x64.  I have downloaded the last.fm plugin and followed the guide as far as I can tell.  I have the lastfmplus folder with the __init__.py and the ui_options_last.fm.py files.

I go to the plugin section and enable the lastfm plugin there then close out the program.  The guide says when I restart it, I should see an option for the last.fm plugin options.  Either I'm blind, or it's not listed anywhere.

What absolutely basic thing have I missed/screwed up? 

If you need anymore information, feel free to ask.

Thanks in advance!

Re: Last.fm Plus Genre and extended tags plugin for Picard 0.15+

The last.fm plus options will appear on the Options tree under "plugins"; there should be a (+) you can click and see them. If you still can't see this can you take a look at Help > View Log and see if there are errors trying to activate the plugin?

Re: Last.fm Plus Genre and extended tags plugin for Picard 0.15+

voiceinsideyou, thanks.

I knew it was going to be something basic like that.  Not sure how I missed the arrow, but I think I was expecting it to be listed as a main option and not a suboption. Screw you brain.

Can't wait to try it out! (:

Re: Last.fm Plus Genre and extended tags plugin for Picard 0.15+

Awesome. Let us know how it goes. It'll take some time to tweak it to get things how you want - test it on a few albums first!

Re: Last.fm Plus Genre and extended tags plugin for Picard 0.15+

Great plug-in imho, very useful. However if I may suggest a feature that would dramastically improve the "poweness" of the plug-in :
Make the grouping/genre/country pattern follow a 'tree' structure. That is, create a list of keywords that are allowed 'genre' when under a specific 'grouping', and do that for every available 'grouping'.

For example, when I have a finnish folk groupe, I'd like it to be marked as [Grouping = Folk] and [Genre=Finnish Folk], but for other groups like 'The Rasmus', as it would be marker with [Grouping=Rock], the token [Genre=Finnish Folk] would not be an authorized genre (so we toggle to [Genre=Alternative Rock], which would fit).

Likewise, if I have a Eletronic Jazz group, I'd it to be marker as [Grouping=Electronic] and [Genre=Jazz] (if the Electronic tag is more preponderant than the Jazz tag of course).


I don't know if I'm clear enough, but I hope you'll see why i would be quite useful to have such a feature.

21 (edited by fdemmer 2011-12-29 23:01:38)

Re: Last.fm Plus Genre and extended tags plugin for Picard 0.15+

good idea, but i think that it would require a lot of work on that tag tree and you might occasionally miss very popular tags, because your tree is not suitable for all the weird combinations of genre tagging people use... :)

nevertheless i tried to implement this in my *experimental* rewrite of the lastfm plus plugin (https://github.com/fdemmer/Picard-Last.fm.ng-Plugin). the "searchtree" implementation can also use regular expressions instead of name lists for tags. (eg. "^.*pop.*$" instead of "indie pop", "blah pop", ...)

EDIT:

beets (http://beets.radbox.org/) has a last.fm genre tagging plugin, that uses a genre tree:
https://github.com/sampsyo/beets/blob/m … /lastgenre

the tree they use is scraped off wikipedia using this: https://gist.github.com/1241307

Re: Last.fm Plus Genre and extended tags plugin for Picard 0.15+

Yes; the problem is indeed constructing such a tree. It's contentious and the knowledge of genres required to actually layer everything like that is more than one person could possibly be expected to have, except as a full-time job. Moreso; real life genres are not a tree structure - they are probably like a big venn diagram. Some sub-genres are wholly owned by another (thrash metal into metal). Others are an overlap - breakcore with respect to drum & bass and techno, arguably - or "rap metal/rapcore" - does it belong to rock, metal or rap? Even your example for electronic jazz - who says Electronic should be the grouping for it, as opposed to jazz? Building a UI to allow users to maintain and tweak that would be a significant endeavour.

For this reason, I support the more egalitarian view taken by the plugin. The theory goes that when you add up and weight all the tagging users have done on last.fm; the most important higher-level genre should emerge (i.e. the grouping). Attempts to force too much structure on genres are probably doomed to failure (or commitment to a very large time investment) IMO. All power to anyone who writes something easy to use to try and make this work though!

23 (edited by Peloqiun3 2011-11-17 18:57:32)

Re: Last.fm Plus Genre and extended tags plugin for Picard 0.15+

So, I've been playing with the plugin this morning and it is very robust and handy, but I've run into a bit of a problem. I want to flip/flop grouping and genre so that genre is the "Major" genre and grouping is the "Minor" genre. So I just set "Major Tags - Group" to 5 and "Minor Tags - Genre" to 1, but every time I scan a track, I get the Major results in both fields (see below). Any idea what's going on?

" Genre: Electronica; Alternative; Indie; Pop; Rock
" Grouping: Electronica; Alternative; Indie; Pop; Rock

{update} Actually, on further inspection, it seems like it doesn't matter how I set the numbers, Group always determines the number of tags to be added.

{update} Okay, so I cleared out all preferences files (I'm on a Mac) and reset both Picard and Last.fm Plus back to defaults and things seem to work okay, even when flip-flopping Major and Minor. The problem occurs when I put custom filter lists in to broaden the "Major" list to minor tags and restrict the "Minor" list to major tags. As soon as I swap the context, it just gives me the minor results for both fields. Maybe there's something broken in my filter lists.

{update} Rather than making custom lists, which I was doing first, I simply swapped the preloaded lists and things seem to be working correctly. My guess is there's an invalid character of some sort in my genre lists that's throwing an error and invalidating the results, and thus it's simply putting the same results in both boxes. Is this a possibility?

Re: Last.fm Plus Genre and extended tags plugin for Picard 0.15+

I'm hoping to update this plugin to allow album tags to be used, as well as the artist and track tags. I'd like to add my options to the options GUI, but don't have the .ui file that the GUI is created from. Where is the best place to get my hands on this file?

25 (edited by soulsearchingsun 2011-12-09 10:16:49)

Re: Last.fm Plus Genre and extended tags plugin for Picard 0.15+

foobar2000 is having troubles recognizing multivalue genre tags.
Picard configuration: 1 major, 4 minor genre groups, prepending major. Join tags with ';' and '; ' (tried both).
fb2k configuration: Genre is multivalue field, separator is ';' by default.

fb2k shows one genre like 'Indie;Progressive Rock;Alternative;Alternative Rock;Indie Rock' instead of all four separately. I have to make a change forcing fb2k to rewrite tags until it recognizes four different genre tags.
Any fb2k/lastfm+ user able to help?
Thanks.

edit: I just noticed the "Split values..." command in Tag Properties of fb2k. Works, but shouldn't be necessary IMHO.