Jump to content

(Pandora) Saver2


ZigZagJoe

Recommended Posts

So, I was wondering if you'd be interested in working with another developer to extend your awesome program. Here are my thoughts:

I have a home theater PC that I generally use to run Saver2, which plays music in my whole house and saves the stream. I have some wireless Pocket PC devices. I would love to be able to wander around my house, listening to the music, and have 1) album art displayed on my pocket pc and 2) be able to thumb up/down music from my pocket PC.

How do we accomplish this?

Well, you and I can work together and create a communications protocol whereby devices on the local network can send simple commands to saver2, basically one command for each of the UI elements. Also the protocol would allow the program to query the currently playing, including the location of the album art. My program could then pull the album art over the network and show it, have a simple UI that forwards UI commands on to Saver2, etc.

Interested?

Sure - actually, there's already commands to do something like that over http, though not querying the text of ui elements. Be simple to do though.

Breakdown of current args:

http://(addr):(port)/pluginrpc/Pandora%20Client%20C1.4/do/(action code)

do arguments:

pp : playpause
ne: next song
rl: rate good:
rh: rate badly
ss/station id : set station to id, return 404 if not a valid/known station id, should look like /do/ss/(ID)
ns[int, music id] : returns 200 if ok otherwise 500 (http code)              
ts : toggle shuffle
tt : toggle turbo
vu[int, amount to inc vol by]
vd[int, amount to dec vol by]

all of these except ns just return a 302 moved page to redirect back to the webui

to find id codes to make stations, use http://autocomplete.pandora.com/s2?q=(query) . result is fairly easy to figure out

will add stuff to query UI element values

to get to so you can access sproxy remotely (and thus the client's web interface) you need to go into advanced settings, and do:

1. AllowNonLocal -> true

2. ServerName -> either IP or something that can be resolved to the computer sproxy is running on

Edited by ZigZagJoe
Link to comment
Share on other sites

...great info...

Thanks a lot, that was extremely helpful. I now have a simple version of the program working, and I'm getting ready to start writing the http-parsing code that will give me things like the currently playing artist, song, album art, etc. Is there a way I could get you to add in queries that will return something more easy to parse? Perhaps something like JSON, or even a simpler HTML page with the data tagged in some way?

Other than that, I've got most of the functionality I'd like with just the commands and the status - I'm basically re-writing the Pandora client UI as a C# app that suits the Pocket PC interface better. I suppose I could just use the webpage, but that'd require you to do work, which doesn't seem fair. Unless you want to give me access to the source... but I can understand not wanting to do that.

Link to comment
Share on other sites

could you get me specs on what the json output would look like? Also, i'm on irc atm.

Oh, i forgot to mention, AART.png (/pluginrpc/Pandora%20Client%20C1.4/AART.png) is the current album art.

There's also the output stage status "ps", returns:

Playing StreamPlayer { [R] False|False|77|49|7/27/2010 12:28:23 PM|14.8125|104/258 }

Easier to post code than try to explain it.

        public override string ToString() {
            StringBuilder sb = new StringBuilder("StreamPlayer { [");

            if ((pushThread != null) && pushThread.IsAlive) { // sending data
                sb.Append("R] ");
            } else sb.Append("D] ");

            sb.Append(DonePlaying + "|");

            sb.Append(_errd + "|"); // error occured?
            if (_errd)
                sb.Append("{" + ErrorStr + "} |");

            sb.Append(_volume);

            if (!DonePlaying) {
                sb.Append("|"+Cache.Count + "|"); // number of cached blocks
                sb.Append(StartTime + "|"); // start time
                sb.Append(timeOffset + "|"); // seconds have been paused, subtract this from secselapsed to get current time
                sb.Append(SecsElapsed + "/" + _lengthsecs); 
            }

            // if paused, secselapsed is not accurate!

            return sb.ToString() + " }";
        }

Edited by ZigZagJoe
Link to comment
Share on other sites

I've Gone and broke your Uploader.... :o

"Saver2 Install Started

Setup generated on 3:08:19 PM CST 7/2/2010

Output folder: C:\Program Files (x86)\Saver2New

Searching for processes called 'SProxy.exe'

-> Found 0 processes running

No application instances found

Downloading S2bins.zip...

Error: failed to download S2bins.zip (SendRequest Error)

Writing log file C:\Program Files (x86)\Saver2New\install.log"

Yes, tried it twice @ two install locations... same deal.

Oh - And HI - New Usr

Link to comment
Share on other sites

I've Gone and broke your Uploader.... :o

"Saver2 Install Started

Setup generated on 3:08:19 PM CST 7/2/2010

Output folder: C:\Program Files (x86)\Saver2New

Searching for processes called 'SProxy.exe'

-> Found 0 processes running

No application instances found

Downloading S2bins.zip...

Error: failed to download S2bins.zip (SendRequest Error)

Writing log file C:\Program Files (x86)\Saver2New\install.log"

Yes, tried it twice @ two install locations... same deal.

Oh - And HI - New Usr

Make sure you can connect to the internet using internet explorer. Check your proxy settings (see http://zzj.itf-inc.com/s2/docs/fixie.html )

Link to comment
Share on other sites

Make sure you can connect to the internet using internet explorer. Check your proxy settings (see http://zzj.itf-inc.com/s2/docs/fixie.html )

heh - I should have thought about that.

New Q. Though.

I have installed S2 per your installer - and at the end I get a msg saying I have to do an update myself.. Yet when i go to the link and DL the update, it seems to be the same S2 installer I already had.

If I do the update through S2, it gives me:

"Your version of Saver2 is out of date.

This update is marked as non-vital.

server md5 : e8219dfccd33b17723b6dc09b4e1c77c

local hash : 06ed4286297f05039838c8e303439521

server date: 7/2/2010 2:06:10 PM CST

local date : 7/2/2010 2:06:10 PM CST

server size: 802970

local size : 802970

-------------------------------------

| Would you like to update now? |

-------------------------------------

--- Changelog ----------------------------------------

!!! IMPORTANT !!! YOU WILL NEED TO INSTALL THIS UPDATE BY DOWNLOAD THE INSTALLER FROM http://zzj.itf-inc.com/s2/ !!! IMPORTANT !!!

http://zzj.itf-inc.com/s2/Saver2Setup.exe

A bug was introducted in the update mechanism in the last major patch... Sorry for the inconvience.

07/02/10: 1.3 build 746 (nonvital) ..."

I update this and once it opens it says it installed. Yet it once again tells me I need to apply this update. If I do it a 2nd time, it Deletes just about Everything from S2 install folder.

What noob mistake am I making?

Edit / Additional:

I am trying to get all audio at 320Bit - which I know - is overkill.. but thats just me.

I am seeing a lack of lame.exe runnng and more of "song is already in .mp3 format."

The songs I am getting are 2 - 4MB in size - which does not suggest they are 320bit...

Do you guys know anything about this? How can I make sure I am getting the higher quality audio?

Edited by Tix
Link to comment
Share on other sites

--- Changelog ----------------------------------------

!!! IMPORTANT !!! YOU WILL NEED TO INSTALL THIS UPDATE BY DOWNLOAD THE INSTALLER FROM http://zzj.itf-inc.com/s2/ !!! IMPORTANT !!!

http://zzj.itf-inc.com/s2/Saver2Setup.exe

A bug was introducted in the update mechanism in the last major patch... Sorry for the inconvience.

Doing the update manually should fix it (it was noted in the log there...). Also, make sure you don't have two installs knocking around.

The only service known to give 320kbs mp3s is songza. Just by setting 320kbs in the encode screen won't make the music the various services send 320kbs - it just means, if the music is received in a format that is not mp3, it will be re-encoded as mp3 at the user selected bitrate(320kbs).

Should also note that the only known situation that occurs in is when using the flash pandora client, as it gets 64kbs aacplus; also, encoding that to 320kbs would be massively overkill, 192kbs would be the highest practical i would recommend for a source format of 64kbs aacplus.

Link to comment
Share on other sites

Doing the update manually should fix it (it was noted in the log there...). Also, make sure you don't have two installs knocking around.

Maybe I am not understanding your update procedure.

The way I see things;

http://zzj.itf-inc.com/s2/ = Update Required to be installed by the end user

http://zzj.itf-inc.com/s2/Saver2Setup.exe = The generic app installer. (The one which will end up needing to be patched.)

When I go to http://zzj.itf-inc.com/s2/ ;

I find a page with dev. notes on S2 for each version, etc... Lots of good info here, but -

I can only find the full S2 installer itself up at the top of the page. I can't seem to find any info on the path itself. (yes, i see that it says it Needs to be patched - But no mention/location OF the patch DL/Installer.)

As the only DL I can find is the S2 installer itself (as mentioned), I am lead to believe that this DL is the fixed version. Yet, if I use the old installer or the one believed to be new - they both require an update when loading for the first time. This is the Same update that we have been talking about.

I am lost/going in circles. I have 2 S2 full installers (one dl link, but two pages pointing to it) but no patch.

Yes I am missing something and yes it is most likely right under my nose...

Either way, could you please clarify?

Link to comment
Share on other sites

The full installer _is_ the update - the only thing done differently when saver2 does the update is it is hidden and runs automatically. If you are using the Saver2Setup from that link, freshly downloaded, and you get that error, it seems likely you have another install knocking about which is being run/or files aren't being updated properly.

Link to comment
Share on other sites

Hello, Joe ...have you noticed that Saver2 is not saving every song from Slacker Radio, it is missing a song like every 3 played.

can you please confirm this or it is only me?

thank you very much

will check, i only do occasional checks of functionality on it.

Link to comment
Share on other sites

I'm testing it now. Also, a log snippet from both of you would help significantly.

It's a bit hilarious they make you pay to see the next artist now, used to be free... piss poor reason to upgrade tbh (though the ads are annoying... saver2 still saves some, which is hilarious)

6 songs in so far, all saved NP

okay, got one that missed, suspect it's using a non-slacker mirror... damn firefox can't tell me which url the last song was on, so i need to wait for it to occur again.

augh, found it. It's using RTMP.... can't save those songs (it's another protocol entirely). This unfortunately suggests that they are migrating to using it instead of http, so it may not be possible to save from slacker for much longer. I'm toying about with spawning a rtmpdump, which might or might not work.

Right. After a few virgin sacrifices and around 20 goats, I have a beta slacker rtmp saver ready.

Download (redacted - see update) and extract it in your SProxy folder - be sure sproxy is closed first and to overwrite existing files

Then listen to slacker some... you should eventually see "Spawning rtmpdump for xxxx", some more text, then forcing encoding, and finally a song saved. Not responsible for any smitings.

I don't like this method as much because it's not transparent (it makes another request to the rtmp servers), and causes 100% of one core to be used., but it dows work.

reason for the cpu use is we have to re-encode from FLV to MP3, which involves playing it back and then encoding it... have not found a reliable method to de-encapsulate flv audio yet.

edit: update deployed which includes this. re-encoding isn't necessary anymore.

Edited by ZigZagJoe
Link to comment
Share on other sites

Update deployed:

08/08/10: 1.3.1 build 768

This update will take longer than usual; the binaries need to be re-downloaded.

Version bump. Bug fixes, a few new developer features, and slacker fix. Playlist.com has become a generic plugin supporting multiple services. Added songza.com to generic ripper plugin. Youtube file naming fixed. play.it is now supported (however, not the live streams).

play.it (AOLRadio and others): Plugin added. Outputs 64kbs AACPlus. Does NOT support live streams.

BrowserPAC: Youtube now enabled by default, added section for songza.com and play.it

Client: Added /status pluginrpc request, returns a json array of current player status

Client: Added /stations pluginrpc request, returns a json array of stations known. returns 503 if not available at the moment

Slacker: Added support for RTMP urls (this is when a song was played and it would not be saved)

Slacker: Debug now spits out song info.

Playlist.com: Morphed into a generic saver plugin that relies on tags for metadata.

GenericSaver: Added http://*.musicnet.com/getFile* (www.Songza.com)

Saver2: Encoder wav dump should be massively faster. This will be most noticable on slow computers.

Saver2: Added Saver2.DumpRTMP(song,url,length) method to dump from known rtmp urls

Saver2: Added Saver2.FLVDump(song) to extract audio from FLV files

Saver2: Added a fix for album art failing in simplesaverplugin class

SProxy: Added /plugins http request, returns a list of plugins loaded with version

SProxy: Added Proxy.Funcs.jsonOut(msgcompositor, base class name, dictonary<obj,obj>) to create a simple json output

SProxy: ServerName is now sanity checked when loading.

SProxy: loopback is supported when listening on non-loopback addrs

SongManager: Song format and size now printed in edit box

Installer: Added rtmpdump.exe to the binary download

Installer: Added FLVAudioExtract.exe, a derivative of FLVExtract by Moitah. Source is in dev stuff.

Installer: Added a note if file download fails, with instructions.

Installer: If a download failure occurs while updating, a message box should be shown.

Youtube: HTML entities are now interperted and parsed out (no more files named ‪something‬‎.flv)

Known bugs:

Grooveshark will error if { or } is contained in the song's info; however, the back-up mp3 tag parser will catch it. Can't be fixed until a proper json implementation is found. Really don't want to include another library but seems likely at this rate.

play.it saver does not support live streaming radio. If you can't skip it, you can't rip it.

Other:

Looked at hulu again. Still can't write a saver for it.

Open to feature requests within reason.

Looking at adding http support for the events in the client.

Play.it outputs 64kbs aacplus (or 16 for low bandwidth)

Songza.com puts out 128kbs mp3

Playlist.com puts out 64kbs mp3 or less.

If you like this app, please donate! Check my site for the link (http://zzj.itf-inc.com/s2/) or paypal zigzagjoe@gmail.com

Link to comment
Share on other sites

Gotta love the little bugs, after patch... if your update does not ever re launch sproxy and your install directory is missing everything, your proxy settings are messed up. Follow these steps:

1. Check if you can open a page in internet explorer

2a. if it errors, see http://zzj.itf-inc.com/s2/docs/fixie.html and follow the steps there

3. download the current installer from http://zzj.itf-inc.com/s2/Saver2Setup.exe

4. run installer, check any pertinent options (except clear settings, unless you really want to), finish install, run sproxy

I had added a message box if install failed due to connectivity, but due to me missing a zero it shows the message box when not running silently and doesn't show when running silently (ie. updating). Due to how the update system works I can't update without causing *everyone* to have to re-update, or cause some people to miss the update. Blech.

Edited by ZigZagJoe
Link to comment
Share on other sites

Gotta love the little bugs, after patch... if your update does not ever re launch sproxy and your install directory is missing everything, your proxy settings are messed up. Follow these steps:

1. Check if you can open a page in internet explorer

2a. if it errors, see http://zzj.itf-inc.com/s2/docs/fixie.html and follow the steps there

3. download the current installer from http://zzj.itf-inc.com/s2/Saver2Setup.exe

4. run installer, check any pertinent options (except clear settings, unless you really want to), finish install, run sproxy

I had added a message box if install failed due to connectivity, but due to me missing a zero it shows the message box when not running silently and doesn't show when running silently (ie. updating). Due to how the update system works I can't update without causing *everyone* to have to re-update, or cause some people to miss the update. Blech.

Thanks for the fix, at least - I had this problem.

Link to comment
Share on other sites

Problem's caused by bad proxy settings. Don't know what causes it unless that many people are using auto config for ie (and the damn thing is still buggy?)

Edit: Next update will have an updated installer which will automatically try without IE proxys if the downloads fail. This should render the need for those messages obsolete. Thank fuck.

Edited by ZigZagJoe
Link to comment
Share on other sites

Deployed a silent update; only people just now updating or installing get it. Don't need it otherwise. Basically made the installer a bit more robust, for updating.

Also, thanks for the donation, Doc Hodges.

Changelog:

Fix for some installer stuff. Not important.

Saver2: FLVExtract is now run by reflection; more reliable and less resource intensive.

Installer: Fixed update failure message box.

Installer: New binaries will be deleted properly on uninstall

Installer: No longer deletes extra files like tor when doing a soft wipe.

Installer: Message box will copy the current installer to desktop if failed while updating.

Installer: License updated.

Installer: Now will try without proxy if download fails - this gets a lot of people, it seems.

Installer: Icons will no longer reappear (if deleted) on desktop or startmenu when updating

Installer: Added save file prompt for installer if things go pear shaped while updating and can't resolve

YouTube: Prompt added at plugin management screen

Edited by ZigZagJoe
Link to comment
Share on other sites

It no longer appears in the station list.

Ah, yeah, that got disabled a few patches back as it caused bad behavior on the station list. Turning on shuffle (ie. change station every 4 songs) is easier anyways; even with all stations selected on the quickmix there is only about a 200 song max variety on quickmix + no way to re-configure it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...