xTopPicks v1.6

Xlobby plugin development

xTopPicks v1.6

Postby defrag on Tue Oct 23, 2007 6:39 pm

NEW: Out of beta :D

Grab it here Please make sure you read all this post before jumping in!!!

v1.6 Update: Bug in numerical sorting fixed.
v1.5 Update: Ability to add multiple sort databases from the same base category (see post dated 23 March from me in this thread - will update this top post when I've time.
v1.4 Update: New plugin commands, "Refresh All" refreshes all databases. There is also an auto generated list of your categories to refresh so you can do them individually.

NOTE ON DB REFRESH: If you running this on a fat client the refresh will not work - sorry nothing I can do. It works on a stand alone or a server.

This is the results of the initial work detailed here and I was amazed how far I'd got before getting totally sidetracked by xLiveShout.

Ok, so what does this do.. well it allows you to create a sorted new category database limited to the number of records you want to create, sorted on any field available in the database. So, as a few examples, you could create the last 10 tv episodes added (if you store the date aired or added), or the top 50 music tracks if you have a way of monitoring amount played (see S Pittaways excellent xMusic plugin - http://www.xlobby.com/forum/viewtopic.php?f=14&t=5438)

Some instructions (you will need these). Install the contents of the zip into your plugins directory. Fire up xlobby, hit (or press) F2 to bring up the settings and goto plugins. Find the xTopPicks plugin and click configure. All being well you will be rewarded with the following dialog:
Image
Scary stuff. The top drop down list should contain all the databases in your database folder. Like so:
Image
If you select one then click add, the category will be parsed and filled in with the name and number of items (this is the total number of item elements).

You can then select the field you wish to sort on (note that all fields stored in the information elements are prefixed with an (i) - this is for my benefit!!!)
Image
You then choose the type of field it is, date, numerical or text and whether you want the list ascending or descending sort.
Pick the number of records to return and whether you want to pull display name and coverart from parent items. This is really usefull, as if you are just listing tracks, you can also pull back the album name too!!! Or Series Name for TV episodes.

Ok, we have a test button - click it!!! It will scan the category to see how many records can be sorted by your options.. like so..
Image
You have the ability to create a database now if you wish.

All databases are named xtoppicks-[your database name].xml - so if you were doing music then it would be xtoppicks-music.xml

Once you are happy, click save (the one next to test!) and it will add your configuration into the list at the right.

Finally click the save at the bottom of the dialog to save your preferences.

Make sure you click the Run at startup option if you want your database to be refreshed each time xlobby starts.

Enjoy
Last edited by defrag on Wed Mar 26, 2008 12:05 am, edited 3 times in total.
defrag
 
Posts: 376
Joined: Mon Jan 16, 2006 7:56 am
Location: Didcot, UK

Re: xTopPicks - Beta

Postby cmhardwick on Tue Oct 23, 2007 7:31 pm

Wow defrag! You are on a plugin TEAR! Keep 'em comin'!! :D
cmhardwick
 
Posts: 508
Joined: Fri Jul 14, 2006 6:07 pm
Location: Tennessee

Re: xTopPicks - Beta

Postby scottw on Tue Oct 23, 2007 10:48 pm

Thanks defrag, I will try almost any plugin you put out...great minds think alike :lol: :lol:

Things like this is what make the free XL so awesome.

On a side note..Defrag are you planning on buying the new XL??? Just curious.
scottw
 
Posts: 774
Joined: Mon Feb 06, 2006 4:21 pm
Location: Glen Burnie, Maryland

Re: xTopPicks - Beta

Postby defrag on Tue Oct 23, 2007 10:52 pm

scottw wrote:On a side note..Defrag are you planning on buying the new XL??? Just curious.


Maybe, probably....

Either way I will continue to support all versions of my plugins
defrag
 
Posts: 376
Joined: Mon Jan 16, 2006 7:56 am
Location: Didcot, UK

Re: xTopPicks - Beta

Postby scottw on Tue Oct 23, 2007 10:55 pm

defrag wrote:
scottw wrote:On a side note..Defrag are you planning on buying the new XL??? Just curious.


Maybe, probably....

Either way I will continue to support all versions of my plugins


I see you saw where I was going with that..huh :D

Thanks,
scottw
 
Posts: 774
Joined: Mon Feb 06, 2006 4:21 pm
Location: Glen Burnie, Maryland

Re: xTopPicks - Beta

Postby scottw on Tue Oct 23, 2007 11:03 pm

Just as a note to others...move the whole xTopPicks folder from the zip to the plugins folder not just the .dll. It could just be me being too thick headed but just figured I would pass it on for anyone else who has a Blonde moment like me :lol:

Trying it out now Defrag.
scottw
 
Posts: 774
Joined: Mon Feb 06, 2006 4:21 pm
Location: Glen Burnie, Maryland

Re: xTopPicks - Beta

Postby scottw on Wed Oct 24, 2007 12:51 am

Ok this thing is really cool, just what I needed!!!!!

It seems to work fine but I cannot get the Refresh All and Refresh DB to do anything. It works fine on a restart of XL.
I am using xMusic to create a 10 most played songs cat. Xmusic will increases the played.count number everytime you play that song. So what I am looking for is everytime I load my "top 10 played songs" page it will refresh the DB and show my current 10 top songs at all times.
I assume this is kind of what you are going for right?

I know you said the Refresh All and Refresh DB command are not tested so am I assuming these are the commands I should use, provided they work for me?? :D
scottw
 
Posts: 774
Joined: Mon Feb 06, 2006 4:21 pm
Location: Glen Burnie, Maryland

Re: xTopPicks - Beta

Postby defrag on Wed Oct 24, 2007 6:21 am

scottw wrote:Ok this thing is really cool, just what I needed!!!!!

It seems to work fine but I cannot get the Refresh All and Refresh DB to do anything. It works fine on a restart of XL.
I am using xMusic to create a 10 most played songs cat. Xmusic will increases the played.count number everytime you play that song. So what I am looking for is everytime I load my "top 10 played songs" page it will refresh the DB and show my current 10 top songs at all times.
I assume this is kind of what you are going for right?

I know you said the Refresh All and Refresh DB command are not tested so am I assuming these are the commands I should use, provided they work for me?? :D


Yep - I really wanted to make sure that the sorting worked for people - than I get onto the sticky problem of getting the databases to refresh live. Similar problem to the favorites in xLiveShout.

So for now, live with what you've got as I will be spending some time on the database refresh.
defrag
 
Posts: 376
Joined: Mon Jan 16, 2006 7:56 am
Location: Didcot, UK

Re: xTopPicks - Beta

Postby S Pittaway on Wed Oct 24, 2007 8:52 am

looks good i will have to have a play when i get chance :)


can i put a plug in (pardon the pun :)) for sharring the code? i am sure plenty of people would have a nosy :)
S Pittaway
 
Posts: 651
Joined: Wed Jan 25, 2006 11:08 am
Location: Manchester, England

Re: xTopPicks - Beta

Postby scottw on Wed Oct 24, 2007 12:57 pm

defrag wrote:
scottw wrote:Ok this thing is really cool, just what I needed!!!!!

It seems to work fine but I cannot get the Refresh All and Refresh DB to do anything. It works fine on a restart of XL.
I am using xMusic to create a 10 most played songs cat. Xmusic will increases the played.count number everytime you play that song. So what I am looking for is everytime I load my "top 10 played songs" page it will refresh the DB and show my current 10 top songs at all times.
I assume this is kind of what you are going for right?

I know you said the Refresh All and Refresh DB command are not tested so am I assuming these are the commands I should use, provided they work for me?? :D


Yep - I really wanted to make sure that the sorting worked for people - than I get onto the sticky problem of getting the databases to refresh live. Similar problem to the favorites in xLiveShout.

So for now, live with what you've got as I will be spending some time on the database refresh.


Yep sounds good :D , was not complaining at all just making you aware.

What you have so far is great, thanks for knocking it out so quick.
scottw
 
Posts: 774
Joined: Mon Feb 06, 2006 4:21 pm
Location: Glen Burnie, Maryland

Re: xTopPicks - Beta

Postby scottw on Mon Nov 26, 2007 1:59 am

defrag wrote:
scottw wrote:Ok this thing is really cool, just what I needed!!!!!

It seems to work fine but I cannot get the Refresh All and Refresh DB to do anything. It works fine on a restart of XL.
I am using xMusic to create a 10 most played songs cat. Xmusic will increases the played.count number everytime you play that song. So what I am looking for is everytime I load my "top 10 played songs" page it will refresh the DB and show my current 10 top songs at all times.
I assume this is kind of what you are going for right?

I know you said the Refresh All and Refresh DB command are not tested so am I assuming these are the commands I should use, provided they work for me?? :D


Yep - I really wanted to make sure that the sorting worked for people - than I get onto the sticky problem of getting the databases to refresh live. Similar problem to the favorites in xLiveShout.

So for now, live with what you've got as I will be spending some time on the database refresh.


Just wondering if you have gotten anywhere with the Refresh All and Refresh DB commands??


Thanks :D
scottw
 
Posts: 774
Joined: Mon Feb 06, 2006 4:21 pm
Location: Glen Burnie, Maryland

Re: xTopPicks - Beta

Postby defrag on Mon Nov 26, 2007 6:42 am

Hi Scott,

Been tied up with work for a bit, so had to cool off xlobby dev.

In short, this ain't gonna work for the prerelease, but will work for the free version!!! See this thread for me and Seans gripe to Wes.

Hopefully I will get some time at the end of this week to finish off the free one, but we will have to see what V3 brings to the table before we can get dynamic databases working again for the prereleases.

Cheers
defrag
 
Posts: 376
Joined: Mon Jan 16, 2006 7:56 am
Location: Didcot, UK

Re: xTopPicks - Beta

Postby scottw on Mon Nov 26, 2007 12:59 pm

Thanks,

I am using the free version and at this point have no plan to switch. It does suck for people like you that develop great additions to a great program and then become unusable with newer versions. :(

I know you are using the newer version and really appreciate you still fixing bugs for us 'free" users, thanks alot :D :D
scottw
 
Posts: 774
Joined: Mon Feb 06, 2006 4:21 pm
Location: Glen Burnie, Maryland

Re: xTopPicks - Beta

Postby scottw on Tue Nov 27, 2007 1:27 am

Defrag,

One more question....not trying to give you more to do :D

Can you only sort once on a DB. For example if I wanted a Top Ten of the Music DB and a Last Added Songs of the Music DB. I cannot seem to do this.
Once I setup a Top Ten (which works fine), Music is no longer in the "Select Category to sort" drop down, is this as designed???


Thanks,
scottw
 
Posts: 774
Joined: Mon Feb 06, 2006 4:21 pm
Location: Glen Burnie, Maryland

Re: xTopPicks - Beta

Postby defrag on Tue Nov 27, 2007 5:16 am

scottw wrote:is this as designed??? Thanks,


Yep, currently only supports one sort per category. I have thought about adding muliples sorts, so it's not ruled out....
defrag
 
Posts: 376
Joined: Mon Jan 16, 2006 7:56 am
Location: Didcot, UK

Next