Jump to content

Pandora Timeshifting App: Main Discussion Thread


irieb

Recommended Posts

Let me begin by saying thanks for all the hard work that's gone into this. It's great!

Question:

It appears that I am one of the few people who liked the mp3s being saved in separate folders for their respective "radio stations." This has been taken out in the latest version or changed with Pandora's recent renaming(?) and all mp3s are dumped into the same place (basically). Is there an easy way to switch back to having them dumped into separate "station" folders?

Thanks again.

I'll refer you to this: http://www.hak5.org/forums/viewtopic.php?p=16620#16620

Link to comment
Share on other sites

  • Replies 1.4k
  • Created
  • Last Reply

Top Posters In This Topic

Has anyone noticed that they are starting to mix up the file downloads between putting mp3's in plugtmp and in putting mp3's on the root of plugtmp? Now my songs that are ripped are all mixed up. It seems to start off okay with the first two songs, then it starts to alternate so you the titles are not matched to the songs.

Link to comment
Share on other sites

Maybe someone could try this (I know code, but I'm not running Pandora):

In the Mp3Processor.java, replace this (lines 68-80):

        File [] files = null; //pandoraTempDir.listFiles();

        File tmpDir = new File(System.getenv("TEMP"));

        files = tmpDir.listFiles(new FilenameFilter() {

            public boolean accept(File parentDir, String fileName) {

                boolean nameMatches = fileName.startsWith("plugtmp");

                if (nameMatches) {

                    File mp3File = new File(parentDir, fileName);

                    return !mp3File.isDirectory();

                } else {

                    return false;

                }

            }

        });

With this:

        File [] files1 = pandoraTempDir.listFiles(new FilenameFilter() {

            public boolean accept(File parentDir, String fileName) {

                if (fileName.matches("d{19}")) { // 19 digits (0-9).

                    File mp3File = new File(parentDir, fileName);

                    return !mp3File.isDirectory();

                } else {

                    return false;

                }

            }

        });

        File tmpDir = new File(System.getenv("TEMP"));

        File [] files2 = tmpDir.listFiles(new FilenameFilter() {

            public boolean accept(File parentDir, String fileName) {

                boolean nameMatches = fileName.startsWith("plugtmp");

                if (nameMatches) {

                    File mp3File = new File(parentDir, fileName);

                    return !mp3File.isDirectory();

                } else {

                    return false;

                }

            }

        });

        ArrayList<File> filenameMatches = new ArrayList<File>(Arrays.asList(files1));

        filenameMatches.addAll(Arrays.asList(files2));

        File [] files = (File [])filenameMatches.toArray();

Modified file:

http://comicnut.speedxs.nl/Mp3Processor.java

Pandora.jar with this change in it:

http://comicnut.speedxs.nl/pandora_experimental.jar

*PLEASE NOTE*: it's only been compile-tested.

Theoretically it should now check for both types of MP3 files and combine those lists, only then to go look for the one that's most likely the file you listened to.

Please don't tell the world to grab this one instead of what they're using now. If this fix works I'll put this (plus a few other fixups) in a new pandora.jar as a normal release.

Link to comment
Share on other sites

INFO Thread-2 servlet.ProcessAction - handling mp3 request

INFO Thread-2 util.Mp3Processor - locating mp3

INFO Thread-2 server.Server - unable to rip MP3

java.lang.NullPointerException

at util.Mp3Processor.findCurrentTmpMp3(Mp3Processor.java:39)

at util.Mp3Processor.findCurrentMP3(Mp3Processor.java:27)

at servlet.ProcessAction.handleMP3Request(ProcessAction.java:30)

at server.Server.handleHTTPRequest(Server.java:110)

at server.Server.run(Server.java:83)

INFO Thread-2 server.Server - unable to rip MP3 null

This is what I got when I tried Cooper's latest "experiment". I replaced mp3processor.java and pandora.jar files.

Link to comment
Share on other sites

I just tried creating a dummy plugtmp folder to force it to create plugtmp-1 folder for that problem with the filename length, just in case. I got this error which looks slightly different.

INFO Thread-2 servlet.ProcessAction - handling mp3 request

INFO Thread-2 util.Mp3Processor - locating mp3

INFO Thread-2 server.Server - unable to rip MP3

java.lang.ClassCastException: [Ljava.lang.Object;

at util.Mp3Processor.getAccessFile(Mp3Processor.java:93)

at util.Mp3Processor.findCurrentTmpMp3(Mp3Processor.java:57)

at util.Mp3Processor.findCurrentMP3(Mp3Processor.java:27)

at servlet.ProcessAction.handleMP3Request(ProcessAction.java:30)

at server.Server.handleHTTPRequest(Server.java:110)

at server.Server.run(Server.java:83)

INFO Thread-2 server.Server - unable to rip MP3 [Ljava.lang.Object;

Pandora seems to be randomly downloading whenever you open a new window. Sometimes it will be the 3rd song, sometimes the 2nd; putting file in temp folder.

Link to comment
Share on other sites

I've replaced the jar file with another one that should fix that ClassCastException. Care to try again?

The fix I've applied was to change:

File [] files = (File [])filenameMatches.toArray();

into

File [] files = filenameMatches.toArray(files2);

This whole Java 1.5 thing hasn't yet gotten hold with me. :)

P.S. ddkk, please strip the long URL from your posted trace as it messes up the layout of the forum.

Link to comment
Share on other sites

I hope I this doesn't mess up the forum.

I'm still encountering a problem with finding the correct mp3 file. I assumed I had to pull the pandora_experiment.jar file from your site again. This time around, Pandora seems to be first putting the files in temp folder. Is it a matter of looking at both folders and checking the time stamp?

INFO Thread-2 servlet.ProcessAction - handling mp3 request

INFO Thread-2 util.Mp3Processor - locating mp3

INFO Thread-2 server.Server - unable to rip MP3

java.lang.NullPointerException

at util.Mp3Processor.findCurrentTmpMp3(Mp3Processor.java:39)

at util.Mp3Processor.findCurrentMP3(Mp3Processor.java:27)

at servlet.ProcessAction.handleMP3Request(ProcessAction.java:30)

at server.Server.handleHTTPRequest(Server.java:110)

at server.Server.run(Server.java:83)

INFO Thread-2 server.Server - unable to rip MP3 null

Link to comment
Share on other sites

This program is great, but I am experiencing a problem - was wondering if anyone else had the same problem...

All the songs are saved as mp3's, but they are tagged incorrectly, ie: it is saving an mp3, but naming it as the next (or previous) song played (had it running while i was away from PC, so not sure which).

Is this just me, or is this a bug in the program?

Thanks!

Dan

Link to comment
Share on other sites

Wildandbad.com (where pandoraGrabber.zip and pandora.beta.6.zip are located) has changed ip address So it may be a day or so before the new a record propogates. Sorry for the inconvenience.

For now you can reach the files at

http://68.55.205.56/pandoraGrabber.zip

http://68.55.205.56/pandora.beta.6.zip

Does this work now with the latest changes Pandora made?

Link to comment
Share on other sites

In case anyone wants to run this on the mac, it's pretty easy to get going. The only step necessary to make this run is to set an environment variable named $TEMP which points to the folder where Flash saves the pandora files...

1) unzip latest realease (I'm using pandora.beta.6 with Mac OS Tiger)

2) launch Terminal

3) run the following commands:

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

sudo java -jar pandora.jar

4) launch firefox and go to http://localhost

NOTE: you might want to export the TEMP variable in your ~/.bash_profile or create a bash script to export the variable and launch pandora.

Link to comment
Share on other sites

sudo? What would you need root for?

If it's needed to get the port the server wants to listen on by default (80), just pass an unprivileged portnumber as a parameter to that command.

i.e.: java -jar pandora.jar 8080

Link to comment
Share on other sites

It's only me or any other has bad song naming?

I have beta.6 and seems to work fine everything (stations, lastfm info, ...)

But first song is not ripped.

I can see this message at DOS window:

INFO [Thread-2] (Mp3Processor.java:39) - access file not found trying gain after 1 sec

When I'm at song 2 it rips first one (seems OK), but 2nd one is same as first (same song but with 2nd artist/song name), and same for 3rd.

Then 4th songs seems to be OK. But I can't be sure if it goes bad again later...

I'm not skipping tracks.

There's anything to check/change?

Link to comment
Share on other sites

Wow! Anyone tried to see if this would work under Linux?

In case anyone wants to run this on the mac, it's pretty easy to get going. The only step necessary to make this run is to set an environment variable named $TEMP which points to the folder where Flash saves the pandora files...
Link to comment
Share on other sites

This program is great, but I am experiencing a problem - was wondering if anyone else had the same problem...

All the songs are saved as mp3's, but they are tagged incorrectly, ie: it is saving an mp3, but naming it as the next (or previous) song played (had it running while i was away from PC, so not sure which).

Is this just me, or is this a bug in the program?

Thanks!

Dan

I've the same problem.

pandoraGrabber.zip is needed? I only used the files from the beta.6.zip

Link to comment
Share on other sites

I've the same problem.

pandoraGrabber.zip is needed? I only used the files from the beta.6.zip

PandoraGrabber.zip (aka the MrDave skin) is included in beta.6 (the complete version) if you download the source files only (pandroa_src.zip) and compile your own then you would have to download pandoraGrabber.zip seperately.

I did make a recent update to the pandroraGrabber.zip files (and the beta.6 at the same time) but since we have not established a versioning control system it makes it tough to figure out which version you have.

I am still trying to vigour out how to get a sourceforge account (their Account signup seems to be ahving problems lately) so we can start this a seperate project there - and their CVS will track the changes.

Link to comment
Share on other sites

It's only me or any other has bad song naming?

I have beta.6 and seems to work fine everything (stations, lastfm info, ...)

But first song is not ripped.

I can see this message at DOS window:

INFO [Thread-2] (Mp3Processor.java:39) - access file not found trying gain after 1 sec

When I'm at song 2 it rips first one (seems OK), but 2nd one is same as first (same song but with 2nd artist/song name), and same for 3rd.

Then 4th songs seems to be OK. But I can't be sure if it goes bad again later...

I'm not skipping tracks.

There's anything to check/change?

Try downloading the pandoraGrabber.zip file and un-zipping it over your current installation. I had this problem for a while but the latest update seems to have fixed it

Link to comment
Share on other sites

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.

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.

Link to comment
Share on other sites

In case anyone wants to run this on the mac, it's pretty easy to get going. The only step necessary to make this run is to set an environment variable named $TEMP which points to the folder where Flash saves the pandora files...

1) unzip latest realease (I'm using pandora.beta.6 with Mac OS Tiger)

2) launch Terminal

3) run the following commands:

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

sudo java -jar pandora.jar

4) launch firefox and go to http://localhost

NOTE: you might want to export the TEMP variable in your ~/.bash_profile or create a bash script to export the variable and launch pandora.

Awesome. Thanks for the input. This works flawlessly for me. I do however still have the problem where I am grabbing the wrong mp3 and labelling it incorrectly. Has anyone found a workaround for this yet?

Link to comment
Share on other sites

I'm not really sure why, but Beta6 is not grabbing music for me. It's playing the music fine, but no files are being saved. I even modified the default.properties file to specify a location, but that still didn't work. This is on WinXP, if that matters.

This is the only thing that the log shows:

INFO main client.Client - initing app

INFO Thread-2 server.Server - running

INFO Thread-2 server.Server - Welcome to Pandoras Jar

INFO Thread-2 server.Server - Attempting to lauch on port 80...

INFO Thread-2 server.Server - OK!

INFO Thread-2 server.Server - [ready, lets grab some MP3's!!!]

INFO Thread-2 server.Server - localhost connected to server.

INFO Thread-2 server.Server - handling request

INFO Thread-2 server.Server - processing url: GET /favicon.ico HTTP/1.1

INFO Thread-2 servlet.ProcessAction - processing static request. path: GET /favicon.ico HTTP/1.1

INFO Thread-2 servlet.ProcessAction - path = favicon.ico

INFO Thread-2 servlet.ProcessAction - documentType = ICO

INFO Thread-2 server.Server - No enum const class enums.FileType.ICO

Link to comment
Share on other sites

I'm using this versions...

Wildandbad.com (where pandoraGrabber.zip and pandora.beta.6.zip are located) has changed ip address So it may be a day or so before the new a record propogates. Sorry for the inconvenience.

For now you can reach the files at

http://68.55.205.56/pandoraGrabber.zip

http://68.55.205.56/pandora.beta.6.zip

And overwriting the GRABBER over the BETA 6 still same problem of naming the files.

I use it under Windows XP :)

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