Author Topic: [PLUGIN] Albuminfo  (Read 12626 times)

trasdahl

  • Jr. Member
  • **
  • Posts: 28
    • View Profile
[PLUGIN] Albuminfo
« on: June 30, 2011, 17:15:06 »
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 :)
« Last Edit: June 30, 2011, 17:17:29 by trasdahl »

ochosi

  • Full Member
  • ***
  • Posts: 187
    • View Profile
Re: [PLUGIN] Albuminfo
« Reply #1 on: July 02, 2011, 03:40:18 »
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.

laite

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Gmusicbrowser-plugins by laite
Re: [PLUGIN] Albuminfo
« Reply #2 on: July 03, 2011, 13:42:41 »
Nice work, looks (and works) really good!

ochosi

  • Full Member
  • ***
  • Posts: 187
    • View Profile
Re: [PLUGIN] Albuminfo
« Reply #3 on: July 03, 2011, 14:39:37 »
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.

laite

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Gmusicbrowser-plugins by laite
Re: [PLUGIN] Albuminfo
« Reply #4 on: July 03, 2011, 15: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 :)

trasdahl

  • Jr. Member
  • **
  • Posts: 28
    • View Profile
Re: [PLUGIN] Albuminfo
« Reply #5 on: July 04, 2011, 17:08:44 »
Hello again.

Quote
maybe 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.

Quote
if 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.

Quote
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.

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

Quote
I 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.

laite

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Gmusicbrowser-plugins by laite
Re: [PLUGIN] Albuminfo
« Reply #6 on: July 04, 2011, 19:01:26 »
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?

laite

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Gmusicbrowser-plugins by laite
Re: [PLUGIN] Albuminfo
« Reply #7 on: July 11, 2011, 19:02:31 »
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.
« Last Edit: July 11, 2011, 19:05:00 by laite »

trasdahl

  • Jr. Member
  • **
  • Posts: 28
    • View Profile
Re: [PLUGIN] Albuminfo
« Reply #8 on: July 11, 2011, 20:04:26 »
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! :)

trasdahl

  • Jr. Member
  • **
  • Posts: 28
    • View Profile
Re: [PLUGIN] Albuminfo
« Reply #9 on: July 11, 2011, 20:18:55 »
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.

Quentin Sculo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1082
    • View Profile
Re: [PLUGIN] Albuminfo
« Reply #10 on: July 17, 2011, 19:14:45 »
About the problem with umlauts or other accents in the album name, replacing :
Code: [Select]
lc($entry->{artist}) eq lc($artist)with :
Code: [Select]
::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 :
Code: [Select]
Songs::Set($IDs, ["mood"=>["mood1","mood2"],  "Style"=>["style1","style2"], ]);or if adding to existing values :
Code: [Select]
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.

pyropingvin

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: [PLUGIN] Albuminfo
« Reply #11 on: November 23, 2011, 00:40:27 »
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...

trasdahl

  • Jr. Member
  • **
  • Posts: 28
    • View Profile
Re: [PLUGIN] Albuminfo
« Reply #12 on: December 05, 2011, 16:14:41 »
"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? ;)

nonameplease

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: [PLUGIN] Albuminfo
« Reply #13 on: May 30, 2012, 00: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".

laite

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
    • Gmusicbrowser-plugins by laite
Re : Re: [PLUGIN] Albuminfo
« Reply #14 on: May 30, 2012, 12:17:05 »
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) :-\