Jump to content

Brandon

Active Members
  • Posts

    68
  • Joined

  • Last visited

Posts posted by Brandon

  1. His script first downloads te song to it's server, and then sends it to you. To make it faster, it has to be streamed to you as it's going to the server, or have it go straight to you. I have no experience in php so I can't help with that, but I'm just telling you why.

    I know the java\python based downloader posted on this thread that was made by somebody else does that, but I'm pretty sure that mine streams it as it receives it, and I cant do the direct link because it requires a POST on the url

  2. hey brandon, it seems to take a while for the downloads / listens to start.

    I noticed in timer.php you had a sleep(30); is there any use for this?

    I also removed it and it didn't seem to make a difference.

    Any way I can get it to start faster?

    Thanks

    You need to leave that file alone, its for grooveshark reporting, and does not affect the amount of time it takes to stream, and as far as the stream download, I noticed it makes multiple requests, ill work on that later,I'm really sick at the moment

  3. woops, sorry, I guess I saw wrong, I thought it was you that posted the java downloader. Where can I find your web based player? or can I not?

    kaputtmacher posted the java based one, and you have to check out the code from SVN, and put it on your own server

  4. I merged the unstable and stable versions, I commited it to the branches folder on SVN, I just need some people to test it and find any bugs

    EDIT: The problem with the songs not playing all the way through is a server/client problem, if you use wget or Windows Media Player to play the song, it plays all the way through, but if you use something like an iPhone, it wont play all the way through, I think the way to fix it is to send a Content-Length header, because Wireshark shows the iPhone not downloading the whole song

    Another Edit: I think I fixed the problem where the songs wouldn't stream completely, and also uploaded the iPhone version

  5. Very slick, painless death. Has anyone worked around the cut-off that stream.php seems to be causing? Songs seem to be dropping off with 10-15 seconds left. No idea what's causing it. :(

    Also: My site's down due to a conflict of interest with my Internet Service Provider, I can run my server, but it's on a bandwidth restriction. I'm upgrading the home plan pretty soon, and it should be up in a week or two.

    I think what is causing it is not including the content length header in the stream.php file

  6. Should probably provide a patch... and link to original script. Thats kinda what GPL is about.

    Also, isnt having a streaming player like that sorta redundant? i thought the script was about downloading songs...

    Edit: I guess you can download, pretty nice actually. You have to click on the song name

    I gave him commit access to SVN

  7. HTML5 does have mp3 support, and the player I picked out, it comes with a flash based player if HTML5 support is not availible

    EDIT: I added the iphone version to SVN

  8. If you'll observe, attempting to stream (or download) songs from the unmodified branch redirects you to the akamai domain.

    http://akamai.grooveshark.com/128/23110128...e7e5c8554f7471b

    Where __gda__ is your session code, I assume.

    My patch quickly fixes this by getting the URL from the redirect code and streaming from that instead.

    Actually, the more popular songs are served from akamai, and the rest are served from the stream server on grooveshark

    EDIT: About the player, I was planning on using this player

    http://www.happyworm.com/jquery/jplayer/la...loper-guide.htm

    which is HTML5 based, and turns into a flash player on browsers that dont HTML5

  9. Hmm, fair enough. Granted streaming isn't working at all in Chrome for me, for some strange reason. If you'll note I'm already using a rewrite rule redirecting /*.mp3 to /stream.php?songid=$1, which is satisfactory for personal use.

    Might whip up a quick "Preview" (Flash-player for streaming from the Search or Popular page) later on, it's like 4am here.

    Glad its not just me, what version of chrome do you use? And would you know how to make that mod_rewrite rule?

  10. Duely noted Brandon. Pro-tip; eliminate ANY whitespace before or after <?php ?>, as if said file/class is included before headers are defined, the whitespace is picked up as unparseable HTML and therefore PHP automatically defines headers. (which for this purpose is highly undesired!)

    If anyone on the project is looking for hosting, I have a box here doing pretty much nothing that could be put to good use. Hosting groovesnipe.it.cx on it at the moment if anyone has any questions about speed.

    EDIT:

    Useful update to stream.php to aid in track downloading (header trick)

    Replace the first part of stream.php (before "if(!...") with:

    &lt;?php
    session_start();
    include "newexec.php";
    $songInfo = json_decode(getSongInfo($_GET["songid"]), true);
    header('Content-Disposition: audio/mpeg; filename=' . $songInfo["result"]["song"]["artistName"]. " - " . $songInfo["result"]["song"]["songName"] . '.mp3');
    header('Content-Type: audio/mpeg');

    NOTE: For this to work, you must go into newexec.php and remove the whitespace line at the very end of the file. Otherwise the script will error with that same annoying headers issue.

    This edit causes the file to be automatically downloaded (in modern browsers) with the filename automatically set as {artistName} - {songName}.mp3, very useful for song cataloging! :D

    I think a better way to do this would be a make a mod_rewrite rule, make the song id the folder, and then set the filename as the {artistName} - {songName}.mp3, because the way you did it disables streaming

  11. Your welcome, and I set up as script, so whatever progress i have made on those files, will upload to the branches folder on the svn every night, the code that will be in there might or might not work

×
×
  • Create New...