June 30, 2011, 12:15:06 Last Edit: June 30, 2011, 12:17:29 by trasdahl
I've written a plugin based on (and similar to) the artistinfo plugin, except it retrieves information about albums, and it does so from allmusic.com. The plugin displays the album review in a Context widget, and offers to save some of the information (genre, moods, styles and themes) in gmb fields. This requires some fields to be enabled/created, so I cite my README:

GENRES IS THE ONLY FIELD EXISTING AND ENABLED IN GMUSICBROWSER BY DEFAULT. "Moods" exists, but must be enabled. This can be done under Preferences -> Fields -> Standard fields -> mood. "Styles" and "Themes" must be created by the user under Preferences -> Fields -> Custom fields. Click "New custom field", call it "Style" (yes, capitalized). Field type must be "flags". Field name is what appears in the filter pane tab, and can be chosen freely ("Styles" is natural). Do the same for "Themes". Moods, Styles and Themes will now be available as filter panes, songtree columns etc.

For more information, read the README.

If (or should I say when) you find any bugs, please tell me! Also let me know if you have any feature requests.
There's a TODO list in the source file, but it's actually more of a "Suggestions" list, so I don't know if I'll implement them unless someone tells me to :)

I hope you find it useful and that it doesn't break anything :)

hey,
just downloaded and tried it - looks great! :)
haven't had time to look at the code, but i can already say that i like the manual search-function.

i'm starting to think that these context-tabs should get meaningful icons, because slowly but surely i'm getting a tab-overflow problem here.
i mean a lastfm-icon or an allmusic-icon is ok, but it doesn't tell the user about the functionality of the thing. maybe the generic album and artist icons would be better for that. what do you think?

also: if you feel like hosting/sharing your code on github feel free to send me an email.

Nice work, looks (and works) really good!

after using it for a while, here are two feature-request for v0.2:
* if no review is found, there's a button to show lastfm info instead.
* if the widget isn't loaded/shown in the layout, there's an entry in the album-context-menu to open that pane/plugin in a new window.

Suggestion: I would appreciate 'scan the whole library' - function, as I have fairly large collection and it would be nice to use moods/styles immediately without the need to manually play songs from every album :)

Hello again.

Quotemaybe the generic album and artist icons would be better for that. what do you think?

I don't really have an opinion about the icons. But it kinda depends on the scope of the plugin. I was uncertain whether I should call it allmusic-plugin or albuminfo plugin. If people think there should be one albuminfo-plugin for allmusic, last.fm etc., then I guess generic icons are sensible.

Quoteif no review is found, there's a button to show lastfm info instead.

I was considering togglebuttons such as the "biography, events & similar"-buttons in artistinfo. Or it could be done the way you describe. But once you add more than one source, then maybe stuff such as "manual search" and "auto-save fields" becomes confusing. Maybe I can try it out, see how it works.

Quoteif the widget isn't loaded/shown in the layout, there's an entry in the album-context-menu to open that pane/plugin in a new window.

You have the "Open Context window" command in the standard main menu, don't you think that's enough?

QuoteI would appreciate 'scan the whole library'

I can try, though I'm not quite sure how to :). I think it would be pretty slow, and I don't know if it would be safe if you for example cancel the process by shutting down gmb.

Quote from: trasdahl on July 04, 2011, 12:08:44
I can try, though I'm not quite sure how to :). I think it would be pretty slow, and I don't know if it would be safe if you for example cancel the process by shutting down gmb.

Yeah, I was thinking this should be like some small button in the plugin's preferences which would span progress-window similar to gmb's scan and checks are.

Anyway, suggestion #2: It would be nice to see album's styles/moods etc. immediately in the panel view, although I'm not sure if they take too much space out of it. Perhaps as optional?

#7 July 11, 2011, 14:02:31 Last Edit: July 11, 2011, 14:05:00 by laite
BUG: Albums from artists that contains umlauts in their names (like "Amon Düül II", "Kauko Röyhkä" etc.) can't be found with automatic search ("review not found"). When searched manually they work fine.

Thanks for the feedback.

I don't have much time to fix bugs and features these days, and with the summer holiday coming and all, it might be some time (days, weeks). Sorry about that.

If anybody wants to contribute, though, feel free! :)

Btw, I noticed an interesting bug myself. If you choose "Auto-save fields" and "Add to existing values", each song in the album is saved separately. I think it has to be done that way. So, if the album contains a lot of songs and if your computer is a bit slow, then the progress window pops up with one progress bar for each song, stacked vertically. If there are a LOT of songs, the progress window becomes extremely "tall", actually so tall that compiz crashes with the report "Max texture size exceeded" (or something like that).

Now how about that, huh? :)

I'm not quite sure what to do about it.

About the problem with umlauts or other accents in the album name, replacing :
lc($entry->{artist}) eq lc($artist)
with :
::superlc($entry->{artist}) eq ::superlc($artist)
should make it work (::superlc() is a function that tries to remove accents : ö => o)

About saving fields with the Songs::Set function, there is a simpler way to do it :
- $ID can be a list of IDs :
- for genre-like fields, you can add/remove values with "+genre" => ["genre1","genre2"]  (or "-genre")
so you can simply do :
Songs::Set($IDs, ["mood"=>["mood1","mood2"],  "Style"=>["style1","style2"], ]);
or if adding to existing values :
Songs::Set($IDs, ["+mood"=>["mood1","mood2"],  "+Style"=>["style1","style2"], ]);
that should solve your many progress bars problem.

I think I'm going to add "style" and "theme" as standard optional fields, that will make things simpler.

Quote from: laite on July 03, 2011, 10:19:44
Suggestion: I would appreciate 'scan the whole library' - function, as I have fairly large collection and it would be nice to use moods/styles immediately without the need to manually play songs from every album :)
I support this suggestion and mabye it can be implemented as a separate script...

"Scan the whole library" - function is now implemented, and can be found in the shimmer git:

https://github.com/shimmerproject/gmusicbrowser/commit/7f581f6e60274f3392672b1732734c2af6149829

Better late than never, huh? ;)

Does not work, search also does not work. Could you please help? It used to work first time I started gmusicbrowser, now it always says "no review found".

Quote from: nonameplease on May 29, 2012, 19:15:41
Does not work, search also does not work. Could you please help? It used to work first time I started gmusicbrowser, now it always says "no review found".

For me it worked perfectly until just now, I guess it might have something to do with allmusic.com renewing itself (at least the site design is completely different) :-\