Hi ,
once upon a time when i used windoze there was a 'not so common' media manager called Helium music manager
http://www.helium-music-manager.com/
it had one very interesting feature that it had an html kind of page which showed your play history in a very interesting way
we are already recording all the playcounts and other things ,
probably we can make a layout or something with filters showing songs most commonly played over last week , or artists which have many stars but not heard recently and many more possibilities
i am not sure if i was able to explain it properly
may be the image will help
thanks
dr subodh

the right sided statistics in the above image we regularly use in our mosaic mode, and i just checked that mosaic can be changed on play counts also....
so a similar kind of thing can be arranged in a layout with more interesting approaches, may be images or plain number of times played and so on

Below is the description of statistics page of helium
Using the Database Statistics

When you are on the Music Browser tab you can show the Database Statistics :

   This page shows the following information:

    The 5 most played music tracks. In each entry, clicking the track name will start that track playing and clicking the artist name will display the Artist page.

    The 5 most recent albums added to the database with some basic details such as: when added, number of tracks and album length. In each entry, clicking the album name will display the Album page.
    General Statistics that shows the number of tracks, artists, albums, genres and publishers in the database.

    Favourite Genres shows the 5 highest rated genres, at least three tracks in each genre has to be rated for the genre to appear in this list.

    Favourite Artists shows the 5 highest rated artists, at least three tracks from each artist has to be rated for the artist to appear in this list.

    The 5 top genres in the database and how many music tracks are in each genre. In each entry, clicking the genre name will display the Genre page.

 
    The 5 top artists showing how many tracks you have from each artist. In each entry, clicking the artist name will display the Artist page.

 

hi
i have started reading the layout documentation and am planning to make one myself with above features
can you or some of the senior members help me with the syntax ?
i read the document below and started reading perl also
http://wiki.gmusicbrowser.org/customization/songtree#general_syntax
our create filter dialog box allows only to make filters with top x no of songs but doesn't allow to create filters for top 5 genre played or so..
which files should i look to edit these settings? or they are meant to be edited and saved in a layout file only?
I want a HB to contain top 10 artists from the selected filter or from the total songs
and similar boxes with top x songs from the selected genre and so far.
Please help
i am not asking to be spoonfed and i am ready to go the hard way learning to program myself
thanks
dr subodh

Sorry I didn't answer. I always intended to do something like that since I made the first context page, but so far haven't done anything.

First, it's not currently possible to do that with the layout system, or the songtree, or in an extremely limited way.
Also the filters currently only returns songs, not genres or anything else.

But it can be done in a plugin, in perl, so you have to learn the basics of perl.
It's easy (when you know the functions of gmb, which means mostly only me) to get the stats.
What is harder is present the results in a nice way, a few possibilities :
- gtklabels and other widgets in hbox/vbox/tables
- the TextView of gtk, rather cumbersome to use, and a rather limited.
- gtkhtml (a limited html engine, not made for the web) might work, though it is more or less deprecated, and rarely packaged.
- gtk-webkit is a bit overkill and its perl bindings are rarely packaged.

The best place to talk about this is probably on irc (#gmusicbrowser on freenode)

thanks Quentin
you have been one of the most responsive developers online
will read the basics of perl
any suggestions as to where to start will be gratefully welcomed.
and then will ask you how to make a plugin
thanks again
please keep the good good work going
dr subodh

I began to think about this, and one problem in "weekly playcount" is that gmb only saves last time you have played tracks, not any other, so we have no knowledge when tracks have been played.

Quentin: Would it be possible to have @lastplay (array of times), which would consist of every playtime of a file? What problems would this cause? Also, how about $firstplay as a default field?

I have for some time thought about $hotness - field, which would be time-based, dynamic rating, but it would require to have all lastplay_times available (so if track has been played 3 times in a week, it would be 'blazing hot', if once in last year, it would be 'ice', no matter if its total playcount is past 100 or something. There is a good topic about this in foobar2000 forums: http://www.hydrogenaudio.org/forums/index.php?showtopic=62864

WOW
i guess this discussion is way beyond my capabilities
but anyways , its good if something new and interesting comes out of it
and laite, laitePLAY din't work on my computer, please help with that too...
subodh

Quote from: cardiacanesthesia on September 23, 2011, 15:33:04
and laite, laitePLAY din't work on my computer, please help with that too...
subodh

Hi. I sent you personal message, did you get that?

cardiacanesthesia: I wrote a very basic plugin that shows top (meaning most tracks) artists, genres and years, and favorite (meaning most plays) artists, genres and years. It is a context pane widget, so it should pop up next to lyrics, artistinfo etc. It is just a quick and dirty solution, not very fancy (very basic layout) and not very customizable, but it can work as a starting point or an inspiration.

Check it out at https://github.com/trasdahl/gmusicbrowser-plugins/blob/master/stats/stats.pm

#10 September 24, 2011, 18:57:03 Last Edit: September 24, 2011, 19:24:41 by Quentin Sculo
The screenshot doesn't show any "weekly playcount" :)  but yes it could be interesting, and yes it is not currently possible. I'd said I'd add play (and skip in option) history fields that would store the timestamp of all plays, so that will be possible then.

trasdahl: that was quick :)  as I said earlier, only I fully knows the function of gmb : it's even easier to get the playcounts for each artist/... :

my $top=10;
for my $field (qw/artists genre year/)
{ my ($plays,$songs)= Songs::BuildHash($field, $::Library, undef, 'playcount:sum', 'count');
warn "top $top $field by playcount\n";
warn Songs::Gid_to_Display($field,$_)." : $plays->{$_}\n" for (sort { $plays->{$b} <=> $plays->{$a} } keys %$plays)[0..$top-1];
warn "top $top $field by number of songs\n";
warn Songs::Gid_to_Display($field,$_)." : $songs->{$_}\n" for (sort { $songs->{$b} <=> $songs->{$a} } keys %$songs)[0..$top-1];
warn "\n";
}


EDIT: you can also get a hash with rating average or playcount average :
my ($plays,$songs,$rating,$playavrg)= Songs::BuildHash($field, $::Library, undef, 'playcount:sum', 'count', 'rating:average', 'playcount:average');

thanks everyone
just that my plugin never showed up in any context pane
do i add it to the layout file first?
thanks
dr subodh

The plugin should pop up automatically as a tab in the "Context" widget when you activate it. But not every layout contains a Context widget, so you need to add it somewhere in the layout file, or just switch to a layout that contains one (for example "Playlist, Library & Context").

#13 September 26, 2011, 05:39:59 Last Edit: September 26, 2011, 06:08:35 by cardiacanesthesia
well , I hadn't activated it in the first place
works nice
thanks man. ;D
please do keep working on more functionality of this plugin
Dr subodh

Trasdahl: could it be modified to show the stats of the current filter instead of whole library
like if i search pop from search menu or select pop from a HB and the right sided context change to show the top/favorite artists of that particular selection...