View Full Version : My Albums

2004-09-22, 12:19 AM
Thought id start a new thread to let interested people know what is going on with my upcoming Album Player plugin.

I started out with the Jukebox plugin as a starting project, but this turned out to be a bit over the edge for me. I ended up with lots of weird rendering problems, which for instance made the plugin totally useless in MediaMVP... This led me to start all over with a blank project to get cleaner code and to get full control of what is happening everywhere in the plugin.

After two nights of coding (and "stealing" usefull stuff from the two Open Source Jukebox and Comics plugins), I have finally gotten the plugin to do the basic thing I want - to search and play songs in albums and list information I need. Some of the remaining parts for the first version of the plugin is:

- Queueing. Need to be able to queue both full albums and certain songs with a single click from remote.
- When handling the queue list, we need to switch screens (a bit like the jukebox plugin does) when something happens in the list.
- Able to use the language.xml
- Add at least some skin properties. Users should be able to set colors and fonts etc.

I am not going to list all features here and now, but you will know by the time its done http://gbpvr.com/iB_html/non-cgi/emoticons/wink.gif I may also post some screen shots when the queueing is done.

2004-09-22, 12:26 AM

Sounds good

Will it randomly play like jukebox ?

if you need a tester let me know


2004-09-22, 03:46 AM
I would be happy to test for you as well.
Does you concept of queues mean that you could have different Playlists for different purposes that could be selected.

2004-09-22, 08:52 AM
Hi Tobias,

I would be interested in trying that.


2004-09-22, 09:02 AM
Quote[/b] ]Will it randomly play like jukebox ?

My intention is that it should be possible to shuffle the queuelist after you got some songs in it, but the plugin does not automatically start playing randomly like the Jukebox are able to do.

Quote[/b] ]Does you concept of queues mean that you could have different Playlists for different purposes that could be selected.

This is a interesting question. When I sat down and listed the features I wanted, the ability to select, list and play playlists (like .M3U) was one of them. It should not be too hard to add support for M3U, so I will look in to it but wont make any promises for the first version.

Maybe I should explain my plugin concept a bit further, since I am now at work and its more boring than usual today *http://gbpvr.com/iB_html/non-cgi/emoticons/smile.gif

First, you configure a "albums path" in the GBPVR plugin configuration. I wanted this feature since I still like to use the orginal music player for my "unlisted" MP3:s, and that the plugin only should handle pure albums with ID3-tags all in place... After starting the plugin, you get a list of the existing directories in the path mentioned above. These directories are handled like Albums in the plugin.

When you select a directory, the plugin generates album information and song names from ID3v1 tags (if available) and present this together with a image of the album (fetched from folder.jpg) in a separate window. Then you can play specific songs from the album, or add a specific song to the Music Queue (which works like a playlist). You should also be able to add/play the whole album to the MQ by simply pressing a button on the remote in the album list.

The MQ is thought to be handled by the coloured buttons on the remote (or certain keystrokes on the keyboard for wireless keyboard users):

Blue button: Adds the current selection to MQ. Meaning if a song is selected, only the song is added. If a album is selected, all the songs in the album is added.

Green button: Switch between MQ and the info for the currently selected album.

Red button: Delete all songs in MQ.

Yellow button: Shuffle/Order all songs in MQ.

I also like to say thank you for reporting as willing testers... I will get back you further on.

2004-09-27, 10:37 PM
OK, some updates here now... have been out of town for a few days, but I plan to have a test-ready plugin for interested testers in the end of this week.

This is what have happened so far:

1. Had some problem with the NeedsRendering() function that is now resolved. Dont ask me how, did a major cleanup on my computer, installed XP SP2, .NET Framework 1.1 and reinstalled GB-PVR and all of a sudden the MediaMVP worked like it should. Weird. Im programmer, not a system engineer goddammit :-)

2. The Music Queue now works like I want it to. If you press the blue button on a selected album, it adds the whole album to the playlist. If you press the same button on a selected songs, it only adds the specific song. Green button switches between the Music Queue view and the album listing. Now going to add a feature where the red button deletes the last song song added to Music Queue.

3. Had some problems with the ID3lib class (same one as used in the Jukebox plugin). The ASCII-encoding in the library removed all of the swedish characters from the song names - not very nice. Maybe some other peoples from countries with weird characters have had problem with this in the jukebox? Anyway, going to add a config key that switches between the original line:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Encoding instEncoding = new ASCIIEncoding&#40;&#41;;[/QUOTE]

...and my workaround:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">Encoding instEncoding = Encoding.Default;[/QUOTE]

...in the ID3lib class. What it does is generally using the systems current codepage to encode instead of pure ASCII.

4. Going to look into M3U-support later on this week. If anyone knows of a open source C# class that can be used to list the files in a M3U-file feel free to post in this thread. My plan is to list M3U-files found in the configured directory the same way as you list songs from a normal directory... might seem a bit weird but youll get it when you see it :-)

5. Language support. Right now every text is hard coded... *sigh* Needs to fix this also.

6. Skin support added. You can change colors and fonts used in the plugin, but I have decided not to let the users resize the windows in the plugin. Too much boring code to make it work, sorry.

Hmm that was it for now. If you have any questions about the plugins features and the programming, please use this thread and not PM/e-mail since other developers may be helped by what comes out in the thread...

And sub - a donation is now on its way. Thanks for all your help so far.

2004-09-30, 09:33 AM
A tiny update of this thread...

- Fixed the switch between ASCII and Default encoding when reading textfiles. Actually got the same problem (missing swedish chars) when reading M3U files, but now you can easily select the encoding you prefer in the configuration...

- M3U playlists now works. You have the option to list only M3U files, only directories or both at the same time in the Album view (through settings in configuration). Disclaimer: If a M3U contains file links containing streaming (such as http://...) the file links will not show up in Album view. We can only handle physical files from your harddrive(s).

- Now using the yellow and red button to do PageDn/PageUp in Album view - just like the updated Jukebox plugin.

- A few minor things to fix left before I will release it for testing. I also want to add sort of a helparea to show what function the coloured buttons has in the current view in order to make the plugin more WC (Wife Compliant)...

2004-09-30, 05:25 PM
Quote[/b] (Tobias @ Sep. 30 2004,09:33)]- A few minor things to fix left before I will release it for testing. I also want to add sort of a helparea to show what function the coloured buttons has in the current view in order to make the plugin more WC (Wife Compliant)...
Hi Tobias,

now would that be &quot;Wife Compliant&quot; or &quot;Wife Complaint&quot;



2004-10-01, 10:54 AM
tgkafs: You seem to have the same experience of wifes v/s electronics like I do ;-)

I am actually going to user her as a interface tester before release. If she gets it everyone does :-)

(Now dont get me wrong, love my wife - but electronics is not really her strength..)

2004-10-01, 11:39 AM
Hi Guys,

But what would you do without them?

Ans - (Have a lot more time to play with GBPVR and Plugins)

2004-10-02, 11:26 PM
joecru: Very true http://gbpvr.com/iB_html/non-cgi/emoticons/laugh.gif

Speaking of that (time to play with GBPVR/Plugins), think I promised a bit too much when I promised a test-ready version in the end of this week. No time for coding today, and only a few hours tomorrow...

Well well.

2004-10-06, 10:35 PM
OK, time for a small update again...

Havent had hardly any time for coding, my real job takes too much of my time for now... But managed to implement my idea of help pictures for the coloured buttons. Decided to do them as JPEG:s which turned out to work just fine.

Now I only got language handling and some small things left. I will try to make a test version for all of you that were willing to betatest it available as soon as possible...

2004-10-11, 12:05 AM

My Albums changed name to Music Albums (in the last moment...) and is now out for beta testing... Some screenshots for those of you who are interested:

http://img23.exs.cx/img23/259/maimg1.th.jpg (http://img23.exs.cx/my.php?loc=img23&image=maimg1.jpg)

http://img23.exs.cx/img23/7190/maimg2.th.jpg (http://img23.exs.cx/my.php?loc=img23&image=maimg2.jpg)

http://img23.exs.cx/img23/42/maimg3.th.jpg (http://img23.exs.cx/my.php?loc=img23&image=maimg3.jpg)

I expect to release it to public in about a week or so.

2004-10-11, 12:28 AM
That looks pretty cool. I&#39;m looking forward to it.

2004-10-11, 09:10 PM
Hi Tobias,

Installed your Plugin, Music Albums no problems. Had a qiuck play. Just what I was looking for. Quick Selection and playing all from the one plugin ,well done. I need a bit more time for testing ,but so far so good.


2004-10-12, 07:42 AM
Thank you joecru (and all other testers) for your kind words, no serious bugs have been found yet so the release date is still the end of this week (if nothing serious happens)...

I have one question though (thank tkgafs for pointing it out to me):

I this plugin, files are added to the internal GB-PVR playlist (addAudioFileToQueue) by pressing the blue button(or space on keyboard) and if you press Play (or enter) a selected song starts playing instantly (playAudioFile). A problem we do have with Music Albums Plugin is that if you create and currently play a playlist and then go back to file selection and choose to press Play on a specific file, the file starts playing instantly. This is just what we want to do, but it kind of messes up the internal playlist a bit.

If you query the internal playlist to get the active music file after the scenario above, it returns the song that was played before we interrupted the playlist... And that is not really good looking since the &quot;Now Playing&quot; section of the plugin is showing iaccurate data in this particular scenario.

If I have understood the whole thing correct, there is no way of telling wether the internal playlist is running or idle. I also havent found a way to stop or clear the internal playlist (if there was, I could stop, clear and repopulate the playlist with the song we started playing first which was one of my early ideas)

Anyone got any suggestions? Its not a crucial thing for the plugin, but it would definatly make it a bit easier to understand and neater :-)

2004-10-12, 08:02 AM
If you plau a file using playAudioFile() it should clear the internal playlist, so you could probably re-add the playlist files after this. Hopefully this helps.

2004-10-12, 08:10 AM

When you play a track instantly it plays and then when song is finished it goes back to the playlist which is untouched.

could the following be acheived

user chooses song to play instantly

you set flag noting this

you call GBPVR.MP3FileInfo which I think returns info about the track

your now playing code sees flag set above
and due to flag uses info retrieved from GBPVR.MP3FileInfo to populate display , supressing bit about track 2 of 27 or whatever.

You would probably have to keep some internal array storing song details and where it happend in queue in case user used back buttons later to try and return to song

when song ends flag is cleared and playing returns to queue
if user chooses another instant song before end of current one then simply forget details of current one as they obviously didnt like it anyway

does that sound possible


2004-10-12, 10:26 AM
Good suggestion tkgafs, Ill see if this is possible...

2004-10-13, 01:40 AM
Yes, yes, yes...&#33;&#33;

Finally I found a solution for this problem, but I must test it on my MediaMVP tomorrow before I can make really sure this works... What I did is that I managed to stop the internal playlist by using the magic:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">SendKeys.SendWait&#40;&#34;^{S}&#34;&#41;;[/QUOTE]

This simulates Ctrl-S for the plugin, and stopped the currently playing playlist (if it was playing). Then I started by add the song that we pressed Play on first, and then just readded the rest of the songs that were previously in it... So finally I managed to create a new internal playlist and repopulate it&#33; I also decided that if any songs in the old playlist had been played before we pressed play, they were deleted in the new list. Say we did have a playlist with 4 songs in it:

Song 1
Song 2
Song 3
Song 4

and while we were playing Song 2, we pressed play on a new song. The new list is created as follows:

New Song
Song 3
Song 4

meaning that we skip the first two songs (seems to be no use to keep them in the list...)

Its been a loooong evening but it was worth it...

2004-10-13, 11:57 AM
No, no, no...

Unfortunately the MediaMVP bailed out on me and decided it should hang for a few seconds and then reboot(&#33;) when the plugin called the Ctrl-S statement...

So we are back to square one on this one... But I think I am going to add this modification anyway, but depend on a &quot;Smart Play button&quot; configuration option so MediaMVP users can disable it. I cant think of any other way to make this work at the moment...

sub, do you think it is possible to add methods to stop/pause and clear the audioQueue (so they can be programmatically called) in a upcoming version of GB-PVR?

2004-10-13, 05:06 PM
This morning I&#39;ve added a method to StopAudio() which also clears the queue. This is what I do behind the scenes, and I didn&#39;t want to change the StopAudio() method to not clear the queue.

2004-10-13, 09:10 PM
sub: Sounds great to me.

When do you think the next version of GB-PVR will be released?

2004-10-13, 09:37 PM
Sometime in the next couple of days. I&#39;ve got a couple of my friendly users giving it the once over at the moment.

2004-10-14, 07:43 AM
Great news&#33;

Then I will wait for the latest release of GB-PVR before MAP is released for the public. This also gives me a few extra days to deal with some other issues that the beta testers provided me with http://gbpvr.com/iB_html/non-cgi/emoticons/wink.gif