Jump to content

Pandora Timeshifting App: Main Discussion Thread


irieb

Recommended Posts

  • Replies 1.4k
  • Created
  • Last Reply

Top Posters In This Topic

takeshi7 wrote:

I think that you should re-add the ability to sort the mp3s by what station they were from. I listen to lots of genres and i want to keep them seperated. I'm really impressed by this hack so far. Keep up the good work.

btothec wrote:

All you have to do is add your pandora username to the settings section and they will be in subfolders (your radio station). This has been answered already.

I'd love to get the radio station sorting back but entering my username doesn't seem to work for me. Somewhere along the way, it stopped using the stationid folders. I've updated to the latest versions and tried MrDave's suggestion to check out the var pars code (http://www.hak5.org/forums/viewtopic.php?p=16620#16620) but my coding knowledge isn't good enough. Anyone have time to explain?

Thanks again for a great time shifter!

Link to comment
Share on other sites

I'd love to get the radio station sorting back but entering my username doesn't seem to work for me. Somewhere along the way, it stopped using the stationid folders. I've updated to the latest versions and tried MrDave's suggestion to check out the var pars code (http://www.hak5.org/forums/viewtopic.php?p=16620#16620) but my coding knowledge isn't good enough. Anyone have time to explain?

Thanks again for a great time shifter!

(I added emphasis above)

I'd restore the grabMp3 function in pandoraGrabber.js to the original. This adjustment was to REMOVE the folder sorting and so if you tried the mod I detailed then it is no wonder it has disappeared. You could also re-download the skin file (pandoraGrabber.zip) and unpack it to restore the files to the original versions as well.

 function downloadMP3() {

    lookup = $F("cddb");

    artistName = $F("artist");

    songName = $F("song");

    albumImgLoc = $F("albumImgLocation");

    pandoraUserNameValue = $F("pandoraUserName");

    stationIdValue = $F("stationId");

    cruise = $F('cruiseControl');

   if(artistName == '' && songName=='') {

       Element.update('resultTarget2',"unable to locate artist and song information.");

   } else

       Element.update('resultTarget2',"Fetching ID3 information and tagging MP3 for artist. (" + decodeURIComponent(artistName) + ") song (" + decodeURIComponent(songName) + ")....");

    var url = "process";

    var pars = "action=grab&artist=" + artistName + "&title=" + songName + "&album=&genre=&comment=ripped by [PaNDoRas jAR] your source for listening pleasure&year=&cruise=" + cruise + "&albumImgLocaction=" + albumImgLoc + "&pandoraUserName=" + pandoraUserNameValue + "&stationId=" + stationIdValue + "&cddbLookUp=" + lookup;

    var myAjax = new Ajax.Request(url,

    {

        method: 'get',

        parameters: pars,

        onComplete: downloadMP3Response

    });

}

Link to comment
Share on other sites

As many people as have been saying that songs are being named wrong and such I'll run through the debuggin process, and show you what I did to try to find a problem and then post the results. I suspect someone may have to step in from there if the problem is java related.

First

I started Pandora's jar and it did grab the first song and move it just fine...but the SECOND song was the same as the first song just renamed.

So I cleared my TEMP directory, restarted PandorasJar and looked again.

Yep. Same thing. 1st song just fine, and second song a dupe of the first.

But I did notice that the temp directory was plugtmp-5 and the temp files were plugtmp-5-1 and plugtmp-5-2

So then:

I cleared by Firefox Cache and tried again.

This time the temp folder was plugtmp and the temp file was plugtmp-1, and PandorasJar isn't moving songs at all now.

Inside the plugtmp folder there are two files whose file names are just long strings of numbers. They might be cache files for streaming songs. Rename one. Listen. Yep. There is also a plugtmp-1 that seems to be the first song played, and the others are just cache files for upcoming songs.

Although it seems that the first cache file is the first played song...but the cache file is made after plugtmp-1. Interesting.

Ah-Ha!

Just as the first song finished playing the plugtmp-2 file appeared and the second song began to play. Also the grabMP3 routine finally created the new file.

Okay the second song moved over as expected and was properly named and tagged.

I am noting that it isn't putting it in a 'station' folder but in an artist folder. (I usually prefer the station folder).

Second Song Ends and third starts:

Works Fine. Moved Named and tagged all as expected.

So my Conclusion:

Clear your Cache, clear your TEMP directory and close all your browser windows before restarting Pandora's Jar and be patient. After the first couple of songs it'll come good.

Link to comment
Share on other sites

Maybe someone could try putting files from temp as well as files from tempplugtmp into another folder and sort them by date/time then rename them with the artist-song name.mp3. I don't know java script, sorry.

When you do this manually you can see that Pandora is saving files randomly between temp and tempplugtmp folders. The rip may seem like it is saving the files correctly, but when you try to play them back they are not what they are tagged as.

Link to comment
Share on other sites

Got a question guys, When i look at my music in my mp3 folder, a few songs are not what they are labeled as. Like the song will be labeled linkin park but really its some other song that i dont even know.

any ideas?

i think this happened when i ran it overnight

edit// alot of my songs are like this. shit

Link to comment
Share on other sites

I think I may have found a partial workaround, though it only works if you're sitting there trying to get a particular song. If you clear the cache while you're listening to the song you're trying to grab, then grab it, it seems your chances of successful tagging are much higher.

Link to comment
Share on other sites

Maybe someone could try putting files from temp as well as files from tempplugtmp into another folder and sort them by date/time then rename them with the artist-song name.mp3. I don't know java script, sorry.

Javascript can't do this. Java, maybe, but not javascript.

When you do this manually you can see that Pandora is saving files randomly between temp and tempplugtmp folders. The rip may seem like it is saving the files correctly, but when you try to play them back they are not what they are tagged as.

Actually once I cleared my cache and temp folders it worked fine.

This comment appeared on my blog (almost at random) and rather than put it up there, I put it up here. Dunno who wrote it, but it may have some value for ideas.

Relative to something somewhere else, the files being downloaded are in %TEMP% dir and %TEMP%/plugtm…

When the union of them is used, rather than just the ones in one place or the other, things might work better…

Link to comment
Share on other sites

Ok, i'm not a programmer, but I think I have an idea about how this could be fixed. If the program just scans the temp directory in realtime for all files matching that type, and as soon as they appear, copies them into another temp directory, it would preserve the order in which they were downloaded, and then the program could capture the CDDB info as it comes in order too. Then the files could get tagged according to when the file was created, and what CDDB info was streaming in at that moment.

I wish i could contribute to the code, but I got a D in java, so I wouldn't be much help.

Edit: Just realized that the program is acutally downloading the songs ahead of play time to ensure gapless play... There has to be a way that the flash is smart enough to know which song is which. Think it's that long number string? some kind of database at the pandora site that has all the songs catalogued by serial number? Maybe a packet sniffer could pick up that database query and figure out how to parse the response into an MP3 tag...

Link to comment
Share on other sites

Guest t3chn0b0y
Ok' date=' If the program just scans the temp directory in realtime for all files matching that type, and as soon as they appear, copies them into another temp directory, quote']

the files are all #'s, then there is the tmp and then there the plugtmp-#

im also getting some of them downloading in the same second, so by ordering them by the date created becomes an issue, and when trying to change one of the tmp files names it wouldn't let me, it was locked.. it had finished downloading.. its pulled the recreate a file with the same name thing and replaced the plugtmp-1 on me also.. I've tried to find a pattern on the way they are going into the folders but too no prevail, they change back in forth in a random fashion... I thought i had it figured out and then boom they pulled one over on me :(

Link to comment
Share on other sites

here's the link to barley!!!'s patched jar

http://s129541905.onlinehome.us/downloads/...r_beta[1].7.zip

Thanks for the great work barley!!!

He also has included some ipod functionability...

Brilliant. I've uploaded it as http://wildandbad.com/pandora.alpha.7.zip

The 'add to itunes library' doesn't work for me. Then again, I have a HUGE itunes library XML file (3Mb+) so it may be a matter of size that is the problem.

UPDATE: The new version (Beta 7.1) fixes the itunes problem

Link to comment
Share on other sites

FYI

Downloaded the source and patched the jar - works like a charm.

I would be happy to share but can not host, pm me for the new distribution if you are interested - preferably someone who can host.

Just a question, blarney!! what does jacob.dll in the bin directory do?

EDIT: nevermind. I found it

Link to comment
Share on other sites

Anone care to take on a more ambitious idea?

What about an EMBEDDED java browser that uses the mozilla standard instead of launching a seperate browser window?

So just launch PandorasJar and forget it...That would even allow it to be minimized to the tray if desired.

Link to comment
Share on other sites

How can I modify the directory that it saves the mp3 files to?

I know there is a "Save Dir" field, but for some reason when I went from version 6 to version 7, it is defaulting to "E:downloads" and then whatever i put as the "Save Dir". For example if I enter "C:Pandora" as the Save Dir, it actually saves my files to "E:downloadscpandoramp3".

My E: drive is a very small partition on my hard drive, and I don't even normally use it!

Link to comment
Share on other sites

New verion works. However the default save directory is a little screwey. For example, if I change the default.properties archive path to "D:pandorasmp3" the actual place where they are saved to is "D:pandoraspandorasmp3mp3"

Not a huge deal. However on my mac if I set the default.properties default save path to "/Users/myname/Desktop/pandora.alpha.7/" The files are saved to "/Users/myname/Desktop/pandora.alpha.7/mp3"

Either way I am just glad that it is working again.

Thanks for the help.

Link to comment
Share on other sites

FYI.. If anyone wants to run this on os x here is a script that I put together to start everything for yo.

export TEMP=`echo ~`/Library/Caches/TemporaryItems 

java -jar pandora.jar 8085&

cd /Applications/Firefox.app/Contents/MacOS/

./firefox-bin http://localhost:8085&

I just create a file called pandora.sh and add all that to it. Make sure it is executable and run ./pandora.sh. May be a better way to do it, but this works for me. Also this only works if Firefox is not running yet. I am not sure how to open a new window in firefox via command line. Any ideas?

Link to comment
Share on other sites

Thank you barley for the excellent work. I am ashamed to ask for any more from you but... is there any way possible to retrieve the album info in the saved mp3 file name in addition to the artist name and title. Would make tagging easier in Musicbrainz.

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...