FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister   ProfileProfile    Log inLog in   RSS Feed

Pandora Remote 0.1.1 (Alpha)
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Windows
View previous topic :: View next topic  
Author Message
simbo
Senior Member


Joined: 28 Jul 2006
Posts: 78
Location: UK

PostPosted: Tue Jul 17, 2007 10:00 pm    Post subject: Pandora Remote 0.1.1 (Alpha) Reply with quote

Here is the first Alpha release of my script to control [url=http://www.pandora.com]Pandora Radio[/url] via your phone.

What this script can do:-
- View details of the currently playing track, including album art
- Pause, Play, Next Track and Volume controls
- Thumbs Up/Down from the keypad
- Choose a Station to play

Now I've got you interested, let me explain why it's in Alpha:-
- This script will [u]only[/u] work if Pandora is running in Internet Explorer. Firefox etc are [u]not[/u] supported at the moment.
- For this script to run on Vista, you'll need to disable IE's Protected Mode (Tools/Options/Security). Disclaimer to follow. ;-)
- Pandora should be running before you start the script. You can use the included "Start Pandora" script if you're really lazy.
- To use the Choose Station functionality, you must first go into Settings and provide your Pandora User ID. To find out your User ID, go to the Pandora website and to Your Profile (this it [u]not[/u] the e-mail address you use to log into Pandora).

Controls:-
Up: Volume Up
Down: Volume Down
Right: Next Track
1: Thumbs Up (I like this track)
7: Thumbs Down (I don't like this track)
#: Help
*: Menu

Acknowledgements:-
- OpenPandora, for the original concepts behind this script.
- Jonas, for hosting the all-important event wrapper.

This is an early Alpha so any feedback would be useful. Enjoy!



Pandora.zip
 Description:
Version 0.1.1 (Alpha)

Download
 Filename:  Pandora.zip
 Filesize:  6.31 KB
 Downloaded:  1757 Time(s)



Last edited by simbo on Wed Jul 18, 2007 9:26 am; edited 1 time in total
Back to top
View user's profile Send private message
melquiades
Junior Member


Joined: 24 Nov 2006
Posts: 50
Location: Washington, DC

PostPosted: Wed Jul 18, 2007 2:22 am    Post subject: Reply with quote

Very cool. Everything worked great for me except for my User ID. I tried changing it through: Menu/Settings/UserID, but stations which were not mine appeared in the station list.

Then I modified the following line in the script:

-------------------------------------------------------------------------------------------------------------
var StationFeedUrl = "http://feeds.pandora.com/feeds/people/(your name)/stations.xml";
--------------------------------------------------------------------------------------------------------------
I changed 'your name' to my user ID, and every thing is fine now. (You and I clearly enjoy different styles of music!)

Very nice work.

Mel


Last edited by melquiades on Wed Jul 18, 2007 12:12 pm; edited 1 time in total
Back to top
View user's profile Send private message
simbo
Senior Member


Joined: 28 Jul 2006
Posts: 78
Location: UK

PostPosted: Wed Jul 18, 2007 9:28 am    Post subject: Reply with quote

Whoops! Thanks for spotting, new version uploaded.

P.S. Some of my stations are for testing purposes, honest!
Back to top
View user's profile Send private message
simbo
Senior Member


Joined: 28 Jul 2006
Posts: 78
Location: UK

PostPosted: Wed Jul 18, 2007 10:43 am    Post subject: Reply with quote

For the sake of my musical modesty, Mel, would you mind blanking out my User ID from your post? Otherwise I might think twice about creating a "Brotherhood of Man" station... am I showing my age?

Thanks!
Back to top
View user's profile Send private message
melquiades
Junior Member


Joined: 24 Nov 2006
Posts: 50
Location: Washington, DC

PostPosted: Wed Jul 18, 2007 12:16 pm    Post subject: Reply with quote

I've changed it. Your secret groovy side is now safe. :)

Mel
Back to top
View user's profile Send private message
jae_63
Senior Member


Joined: 29 Mar 2006
Posts: 79
Location: Bethesda, MD

PostPosted: Thu Jul 19, 2007 9:10 pm    Post subject: Reply with quote

This is very wonderful and the code is nicely written ... thanks for your efforts.

I wanted to be able to do thumbs-up or thumbs-down from my Treo, so added the virtual keys ":o" and ":c" (palm Green and Calendar buttons), based upon the model in the PowerPoint remote software. Here are the diffs. It would be great if you would incorporate this (or equivalent functionality) into your next version.

Thanks again!

[code:1]
bash-3.2$ diff Pandora\ Remote.js Copy\ of\ Pandora\ Remote.js
192c192
< else if (theKey == "1" || theKey == ":o")
---
> else if (theKey == "1")
194c194
< else if (theKey == "7" || theKey == ":c")
---
> else if (theKey == "7")
439c439
< code[4] = new Array("1",":o");
---
> code[4] = "1";
443c443
< code[5] = new Array("7",":c");
---
> code[5] = "7";
445c445
< description[5] = "I don't like this track";
---
> description[5] = "I don'y like this track";[/code:1]
Back to top
View user's profile Send private message
simbo
Senior Member


Joined: 28 Jul 2006
Posts: 78
Location: UK

PostPosted: Thu Jul 19, 2007 10:59 pm    Post subject: Reply with quote

[quote="jae_63"]It would be great if you would incorporate this (or equivalent functionality) into your next version.[/quote]
Sure, I'd be happy to do so (and thanks for spotting the typo :-)
Back to top
View user's profile Send private message
jae_63
Senior Member


Joined: 29 Mar 2006
Posts: 79
Location: Bethesda, MD

PostPosted: Fri Jul 20, 2007 6:29 pm    Post subject: Re: Pandora Remote 0.1.1 (Alpha) Reply with quote

[quote="simbo"]
- Jonas, for hosting the all-important event wrapper.
[/quote]


Simbo, could you please explain the event wrapper? I found the XML and looked at it, but don't understand how all the pieces fit together. This is only of interest to developers, I admit.

Can you also explain why your software only works with IE?
Back to top
View user's profile Send private message
simbo
Senior Member


Joined: 28 Jul 2006
Posts: 78
Location: UK

PostPosted: Fri Jul 20, 2007 6:58 pm    Post subject: Re: Pandora Remote 0.1.1 (Alpha) Reply with quote

[quote="jae_63"]Simbo, could you please explain the event wrapper? I found the XML and looked at it, but don't understand how all the pieces fit together. This is only of interest to developers, I admit.[/quote]
The Pandora API uses an event broadcasting approach to pass information, with Flash objects as the "couriers". The event wrapper incorporates the Flash object to hook to Pandora's events and publicise the information as XML (I chose XML because I find it quick and easy to handle from Javascript). For reasons that escape me, the Flash object only works if remotely hosted.

[quote="jae_63"]Can you also explain why your software only works with IE?[/quote]
I'm using the Windows API to send commands to the Pandora player, which means I have to know the exact windows class hierarchy to get a handle on the Pandora player. To support multiple browsers would mean identifying the browser being used and having specific code for each browser. I'm not ruling out supporting other browsers in the future but for this release I chose to stick to one for simplicity. I'm happy to spend some time investigating incorporating other browsers but only if there is a strong demand to do so, otherwise I could end up with a real maintenance headache!
Back to top
View user's profile Send private message
navinrjohnson
Newbie


Joined: 21 Jan 2007
Posts: 8

PostPosted: Sat Jul 21, 2007 5:05 pm    Post subject: Reply with quote

Hi, I was the one who requested the Pandora script a few weeks ago.

[b]A HUGE THANKS to Simbo! IT WORKS BEAUTIFULLY! [/b]I'm having ZERO technical problems. Just a couple enhancement requests to make it even better (not sure if these are possible):

- Have Pandora pause when you're on the phone.

- Ability to bookmark the song that's playing.

- Would be nice (not a big deal) to be able to use it with OpenPandora. (Honestly, having this script is much better than using OpenPandora, so I've just switched back to the web version of Pandora.)
Back to top
View user's profile Send private message
simbo
Senior Member


Joined: 28 Jul 2006
Posts: 78
Location: UK

PostPosted: Sun Jul 22, 2007 5:58 pm    Post subject: Reply with quote

[quote="navinrjohnson"][b]A HUGE THANKS to Simbo! IT WORKS BEAUTIFULLY! [/b]I'm having ZERO technical problems.[/quote]
Thanks for the feedback! :-)

[quote]Have Pandora pause when you're on the phone.[/quote]
Yep, I plan to support phone events in an upcoming release.

[quote]Ability to bookmark the song that's playing.[/quote]
Unfortunately the current Pandora API doesn't support functionality like this. I'm looking into alternatives but don't hold your breath!

[quote]Would be nice (not a big deal) to be able to use it with OpenPandora.[/quote]
This is similar to supporting other browsers; short answer yes, if there's strong enough demand and it's technically feasible, but see my response to jae_63 for a more detailed explanation.
Back to top
View user's profile Send private message
navinrjohnson
Newbie


Joined: 21 Jan 2007
Posts: 8

PostPosted: Sun Jul 22, 2007 6:48 pm    Post subject: Reply with quote

Thanks Simbo - Looking forward to future releases!

One other suggestion: since you can't go back in Pandora (i.e., play the previous song), why not put something else in place of the back button on the screen; perhaps thumbs up or thumbs down? Actually, it would be great to have both the thumbs up and down buttons on the screen. On my device (a Treo), I need to press the Option and X keys to get a 7 (thumbs down), option + E to get a 1 (thumbs up). Would be much nicer just to have a button on the screen. Thanks again.
Back to top
View user's profile Send private message
simbo
Senior Member


Joined: 28 Jul 2006
Posts: 78
Location: UK

PostPosted: Sun Jul 22, 2007 7:04 pm    Post subject: Reply with quote

[quote="navinrjohnson"]since you can't go back in Pandora (i.e., play the previous song), why not put something else in place of the back button on the screen; perhaps thumbs up or thumbs down?[/quote]
I'm holding off on utilising the left/back button at the moment. From a usability standpoint Thumbs Up/Down is too commital - one slip (especially on those fiddly joysticks) and you've changed your station preferences.

[quote]it would be great to have both the thumbs up and down buttons on the screen. On my device (a Treo), I need to press the Option and X keys to get a 7 (thumbs down), option + E to get a 1 (thumbs up). Would be much nicer just to have a button on the screen.[/quote]
jae_63 suggested the palm Green and Calendar buttons as alternatives - would this work for you?
Back to top
View user's profile Send private message
0bvious
Newbie


Joined: 25 Jul 2007
Posts: 2

PostPosted: Wed Jul 25, 2007 6:16 pm    Post subject: Reply with quote

Hello, I love the script, I was just wondering if there was any way to alter it slightly for '[url=http://openpandora.googlepages.com/]OpenPandora[/url]'?

( [url]http://openpandora.googlepages.com/[/url] )

Open Pandora is a standalone Pandora service, which means no need for full screen browser Pandora.

I made a script to load the OpenPandora program, and your remote seems to recognise that it is running, but none of the controls work for the standalone player.

There must be a simple way to alter the code so it will work? I would love to be able to use your script with OpenPandora

Thanks
Back to top
View user's profile Send private message Visit poster's website
simbo
Senior Member


Joined: 28 Jul 2006
Posts: 78
Location: UK

PostPosted: Wed Jul 25, 2007 7:10 pm    Post subject: Reply with quote

[quote="0bvious"]Hello, I love the script, I was just wondering if there was any way to alter it slightly for OpenPandora?[/quote]
navinrjohnson has beat you to it asking for this! :-) It's not quite a "simple" change unfortunately (see above for more details) but I'll investigate for a future release. Thanks for the feedback.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Salling Software Forums Forum Index -> Scripting Salling Clicker for Windows All times are GMT + 2 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group