Jump to content

Pandora Timeshifting App: Main Discussion Thread


irieb

Recommended Posts

@Ransome:

Clear your cookies. That should take care of your settings. I usually clear cookies and cache, just to make sure. However, I'm 99% sure clearing cookies alone will get rid of your settings.

Also, I don't know why, but PJ is working again. I didn't do anything but let it play for a while. Your guess is as bad as mine as to why.

Link to comment
Share on other sites

  • Replies 1.4k
  • Created
  • Last Reply

Top Posters In This Topic

Can someone please post a working link to 7.3.1? The mirror that is listed in the noob's guide is serving an incorrect version, and wildandbad seems to never work. I'm still having lots of problems with incorrectly named files, or just skipping songs entirely. Seems like most people have had success with 7.3.1, so does anyone actually have it?[/i]

Link to comment
Share on other sites

Guest t3chn0b0y
Can someone please post a working link to 7.3.1? The mirror that is listed in the noob's guide is serving an incorrect version, and wildandbad seems to never work. I'm still having lots of problems with incorrectly named files, or just skipping songs entirely. Seems like most people have had success with 7.3.1, so does anyone actually have it?[/i]

I have a copy of 7.3.1 , 7.3.2, and 7.4.1 ... When using 7.3.2 im having little to no serious problems.. can't remember what the reason for the upgrade from 7.3.1 was.. as for 7.4.1 I'm not into the lyrics feature.. most of the music i lisen too doesnt contain much or any lyrics, and alot of the times when they do its getting the song wrong.. and i stopped using lastFM after they changed their site because it bogs my network down. I think that is what was fixed in 7.3.2 from 7.3.1 is the lastFM, maybe someone can correct me on that... I also have my own hacked up version of 7.3.2 that ive been playing with... i removed alot of excessive garbage from the sources for features that are not being used anymore. Helped speed it up a bit.. less on the CPU.. but yeah i got them, but i dont know where to post them.. I could email them....?

okay now where is pandora music video's.. :D

Link to comment
Share on other sites

Well guys, i finally got pnadora to work about 80% of the way, i had downloaded the flash player for IE instead of the one for Netscape users.......no wonder it didnt work.......songs are being added like they are supposed to be and tags are correct, but none of the track info i being added such as album name. Is the album art and lyrics also supposed to be embeded into the song file, they are loading fine in the player but arent saved.

Im running

Firefox : 1.5.0.6

Pandoras Jar 7.3.4

Flash 8

Java Runtime Environment build 1.5.0_06 b-05

Link to comment
Share on other sites

Guest t3chn0b0y
songs are being added like they are supposed to be and tags are correct, but none of the track info i being added such as album name. Is the album art and lyrics also supposed to be embeded into the song file, they are loading fine in the player but arent saved.

With the track information i think thats mostly a gracenotes issue,

and the album art i believe is coming from LastFM. I might be wrong

some one correct me.. lol..

you might also notice sometimes the album art grabbed isnt

matching the album subdirectory the mp3's are being placed into.

The whole thing of using 3 different sites for the information on the mp3, geez the odds of those songs not being on many different albums???

I think that all the information can be grabbed from backstage at

pandora, along with larger artwork, correct track # etc.. and adventually

have the complete set in the right subdirectory, not placed in 3-4 different

subdirectories for 3-4 different albums.. but then again checking the

backstage for every song might a bit suspective of time shifting.

Link to comment
Share on other sites

Don't fret so much, i'm going to hack into the pandora's jar later when I get the chance, i'm gonna have to fight to stay up, but i'm going to write up some PHP to help allieviate the capture problem.

I would send ya some energy drinks but seeing email hasent got that far yet, will have to put a hold on that idea. php conjures up a few free media center like software packages available for watching movies,ripping,playing mp3 and lisenning to internet radio.. :idea: the thought of incorporating pandora.jar into the living room.. :D

Are we going to have to install php in windows, and which one is prefered?

You shouldn't have to install PHP, but i'll be more than happy to set up something that can be done quickly in windows, if not come up with my own installer. (I do that from time to time with MindVision Installer Vice.) Anyways, I didn't get a chance to late last/earlier this week, but i'll see about this weekend, making it a point to hijack some calls, and lo-and-behold, when I peeked in earlier, I found some AJAX already set up for me to abuse. So I plan on taking over that way. Possibly even replace all the functions and just use the JAR as the capture device/caller for the functions. Need to run a test to see if Pandora itself makes the calls, but I doubt it.

Link to comment
Share on other sites

I believe I found out why fetching the ID3 information from gracenote did not work for me most of the time. There is an amazon ad in the lower left corner that appears before the album list in the HTML source. The name of the link in the ad matched what PJ was looking for so PJ followed that link down to amazon instead of fetching the album track list from gracenote.

I agree we would get much better name matches from pandora backstage but that's a little too suspicious to do as we are listening.

So, I updated the gracenote code to zoom in on the HTML main area and ignore the ads.

What's the procedure to submit this code?

Link to comment
Share on other sites

I believe I found out why fetching the ID3 information from gracenote did not work for me most of the time. There is an amazon ad in the lower left corner that appears before the album list in the HTML source. The name of the link in the ad matched what PJ was looking for so PJ followed that link down to amazon instead of fetching the album track list from gracenote.

I agree we would get much better name matches from pandora backstage but that's a little too suspicious to do as we are listening.

So, I updated the gracenote code to zoom in on the HTML main area and ignore the ads.

What's the procedure to submit this code?

If the code is in the actual Java JAR file, then a release "patch" would be appropriate (Instruction file containing needed changes to page if any, and readme with changes to the JAR file listed, and of course the patched JAR file), or if it's a change to the Javascript JS file, then just simply do what I did, hit "Code" (alt+c) and paste the original information we need to locate, close "Code", and then open a new "Code" and paste what we need to change it to. Label each section of code of course. And detail any other smaller, but still very very important changes as well. If it works more often than not for you, I'm sure the community will be very accepting of your fix, my anti-pandora shifting fix works for me on all my computers, still triggers everything just fine, but for some people it breaks it. I unno. I do plan on breaking into the Jar like I said, and I plan on taking at least a day out of my weekend to do this, possibly starting today.

Link to comment
Share on other sites

The Forum FAQ says I can't upload images so I assume I can't upload source files or jars either. All the changes are in CddbLookUp.java, so here it is:

package util;



import com.meterware.httpunit.*;

import org.xml.sax.SAXException;

import org.apache.commons.logging.Log;

import org.apache.commons.logging.LogFactory;



import java.io.IOException;

import java.util.StringTokenizer;

import java.net.URLEncoder;



public class CddbLookUp {



    private static Log LOG = LogFactory.getLog(CddbLookUp.class);



    public static void lookup(SongInfo songInfo) throws IOException, SAXException, IdaNotFoundException {

        LOG.info("looking up data: " + songInfo);

        String artist = songInfo.getArtist();

        String title = songInfo.getTitle();

        if (artist == null || title == null) {

            throw new RuntimeException("unable to fetch ID3 info - title and artist are required");

        }

        int featuring = title.indexOf("(feat.");

        if (featuring != -1)

                title = title.substring(0, featuring).trim();



        WebConversation wc = new WebConversation();

        WebRequest req = new GetMethodWebRequest("http://www.gracenote.com/music/index_old.html");

        WebResponse resp = wc.getResponse(req);

        WebForm searchForm = resp.getFormWithName("search");

        searchForm.setParameter("qartist", URLEncoder.encode(artist, "UTF-8"));

        searchForm.setParameter("qtrack", URLEncoder.encode(title, "UTF-8"));

        WebResponse webResponse = searchForm.submit();



        LOG.debug("submitted initial search");



        if (webResponse.getTitle().toUpperCase().indexOf("SEARCH") != -1) {

            HTMLElement[] mainAreas = webResponse.getElementsWithAttribute("class", "cddb_main_area");

            HTMLSegment segment = mainAreas.length > 0 ? (HTMLSegment)mainAreas[0] : webResponse;

            WebLink[] links = segment.getLinks();



            boolean found = false;



            LOG.debug("looking for artist: " + artist);

            for (WebLink link : links) {

                String text = link.getText();



                LOG.debug("line: " + text);

                if (text.toUpperCase().indexOf(artist.toUpperCase()) != -1) {

                    webResponse = link.click();

                    found = true;

                    break;

                }

            }

            if (!found) {

                throw new IdaNotFoundException("no IDA tag found for artist: " + songInfo);

            }



            LOG.debug("clicked through");

        } else {



            LOG.debug("skipped clicked through");

        }



        HTMLElement[] albumTd = webResponse.getElementsWithAttribute("class", "cddb_returns");



        String[] strings = albumTd[0].getText().split("n");

        for (String text : strings) {



            LOG.debug("ele: " + text);

            if ((text.toUpperCase().indexOf(artist.toUpperCase()) != -1) && songInfo.getAlbum() == null) {

                String album = text.substring(text.indexOf("/") + 1).trim();



                LOG.debug("setting album: " + album);

                songInfo.setAlbum(album);

            } else if (text.indexOf("Label") != -1) {

                String str = "Label: ";

                String lable = text.substring(text.indexOf(str) + str.length()).trim();



                LOG.debug("setting label: " + lable);

                songInfo.setLable(lable);

            } else if (text.indexOf("Year") != -1) {

                String str = "Year: ";

                String year = text.substring(text.indexOf(str) + str.length()).trim();



                LOG.debug("setting year: " + year);

                songInfo.setYear(year);

            } else if (text.toUpperCase().indexOf(title.toUpperCase()) != -1) {

                text = text.replaceAll("|", "");

                StringTokenizer track = new StringTokenizer(text, ".");

                if (track.countTokens() != 2) {



                    LOG.debug("ignoring: " + text);

                    continue;

                }

                String trackNumber = track.nextToken();



                LOG.debug("setting track: " + trackNumber);

                songInfo.setTrackNumber(trackNumber.trim());

            } else if (text.indexOf("Digital") != -1) {

                String genre = text.trim().substring(0, text.indexOf("Digital")).trim();



                LOG.debug("setting genre: " + genre);

                songInfo.setGenre(genre);

            }

        }

        LOG.info("complete");

    }



}

Link to comment
Share on other sites

Hey, Cap, that's a source file. Did changing that help fix your issue just as the source file? Or did you rebuild pandora.jar? If you rebuilt pandora.jar, and need someplace to host it from, I would love a copy, and I could host it for you for free from my .com, permanent hosting, no bullcrap (meet this quota or stay under this quota).

Link to comment
Share on other sites

You need to compile the source and rebuild the jar.

Thank you for your offer to host pandora.jar. That will be useful.

My pandora.jar is a patched version of 7.2, we should patch a newer version of the jar instead. If you tell me where to get the newer jars, I can patch them for you. I tried wildandbad.com and the site is down again.

The source of CddbLookUp.java did not change between 7.2 and 7.3.

I don't know if it changed between 7.3 and 7.3.x. Is there a 7.4 out there?

Is there a subversion or CVS repository for PandoraJar somewhere? How can we get code changes accepted in the official distribution?

Link to comment
Share on other sites

The source of CddbLookUp.java did not change between 7.2 and 7.3.

I don't know if it changed between 7.3 and 7.3.x. Is there a 7.4 out there?

Is there a subversion or CVS repository for PandoraJar somewhere? How can we get code changes accepted in the official distribution?

Bahahaha, Official distribution? That's the best joke I've heard all thread. There is no 'official' because if it get's an 'official' status, then somebody's name (and ass) is pinned to the wall for aiding in copyright infringement which, if you didn't already know, the RIAA is really hunting for right now. It's still the Music Genome's deal to report this abuse, but still the RIAA might get another stick up their asses and try to shut anyone down who has the whole picture painted in a single file for everyone, hence why i'm ok with hosting just 1 component. Also 7.4.2 was a beta, and was accidentally released as 7.2.1 or at least in the 7.2.1 file from wildandbad. Whatever, you have 7.2.what? I think that'd be enough for people, I mean it's patched and it works, I could just as easily patch on top of it with my PHP stuff for even better functionality!

Link to comment
Share on other sites

Let's try this. You need the Java JDK and not the JRE.

Stop PandoraJar so we can write over pandora.jar

cd <pandora jar home>

copy pandora.jar pandora.jar.bak

mkdir util

Copy the source of CddbLookUp above to a file <pandora jar home>utilCddbLookUp.java

Watch out for capital letters, the case is important.

Compile the source with javac, all on one line. There is a space before util/

javac -classpath pandora.jar;lib/JID3.jar;lib/commons-logging-1.0.4.jar;lib/httpunit.jar util/CddbLookUp.java

Update the jar file with the new class file.

jar -uf pandora.jar util/CddbLookUp.class

You only need to do this once. Now start PandoraJar as usual

If you know how to run ant to build the whole jar, you don't need those instructions anyways.

Link to comment
Share on other sites

I wouldn't do that personally, I don't wanna risk breaking stuff, you do it or email me your copy and i'll post it, also, are you sure you're including everything you need to make sure pandora works? And since you can build it, is there anyway we can just change it to a capture device and hand out calls in javascript (which can then be AJAX calls to my PHP script)? Can you work on breaking it down to just a javascript caller? And whoever said they forsee Pandora on a media center computer, well you already can, but one with the functions of pandora's jar, not yet, and php based rips of the functions you're asking for, will require a lot of different applications and a lot of work to make, and yes, I can take on the challenge a weekend at a time, since it's something i've been looking forward to. (And accomplished to a small degree with mplayerc.)

Link to comment
Share on other sites

If it does not work, you can remove the patch by restoring your pandora.jar from your backup

copy pandora.jar.bak pandora.jar

I might work on a batch processor to update my ID3 tags. I might also look at fetching the album art since that does not work for me now.

Link to comment
Share on other sites

If it does not work, you can remove the patch by restoring your pandora.jar from your backup

copy pandora.jar.bak pandora.jar

I might work on a batch processor to update my ID3 tags. I might also look at fetching the album art since that does not work for me now.

Well go ahead and make your updates and i'll go ahead and get to work this weekend on the PHP scripts for windows and tell people how to make the rest work on mac and linux (pretty straightforward for you guys), so that we can get this show on the road, and considering the way pandora is built, it looks like i've got a little fun in store for me.

Link to comment
Share on other sites

The cover art does not work because PJ is looking for the string "Track Statistics" but this string no longer appears in the lastfm HTML page.

    private static int setTrackStats(String text, LastFmTrackStats lastFmTrackStats) {

        int startTracjInfo = text.indexOf("Track Statistics");

        if (startTracjInfo == -1) {

            throw new RuntimeException("Song info not found");

        }

The call to setAlbumImageLocation() appears after the call to setTrackStats() but it is by-passed by the exception as it unrolls the stack.

Does anyone remember what the track stats looked like in PJ when it was still working?

If I cannot figure out what the song stats are supposed to do, I might simply comment out the code and let the cover art code run through.

Link to comment
Share on other sites

Guest t3chn0b0y
so i tried using pandomax (heracy i know),

You said it , I didn't.. LoL

I could email you the latest if you would like.. Im working on setting

up a place to store the versions.

Link to comment
Share on other sites

nvrmind about finding the version...just found it it think...version 7.3.1?however, i do have another question. when i run the jar it was saving the songs to my computer but not into my itunes (i selected "yes" to add to itunes library and i had itunes open and running), and now its not even saving the songs to my computer. does anybody have any fixes to these?

Link to comment
Share on other sites

Sorry for my noobness you guys are like hard core shiznet to the max. LOL ok so here comes the question I no you guys are going to lauch but I just cant figure out how to get this to work. Ok so I got everthing working and all but when it trys to rip the mp3 it says "Cant not rip mp3 please make sure that pandora is runing in your firefox browser". It is runing and all so if you guys can help please do...

Sorry for being a noob...

codywolf

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