Jump to content

Grooveshark Song Dl


Brandon

Recommended Posts

  • Replies 146
  • Created
  • Last Reply

Top Posters In This Topic

It would be cool to have a web based grooveshark downloader, but I found another one that works well. It's called Free Music Zilla. Basically it does some sniffing for mp3s and then grabs then and lets you download them. I just tested it out on grooveshark and it works great. It can't recover all of the metadata from the song, and you have to play like a second of each song on grooveshark to queue the download, but other than that it's awesome. My current instance of it is maybe 10 minutes old and its taking up about 12,500 K of memory.

freemusiczilla.com

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

Edit:

http://xqtftqx.hacked.jp/scripts/Grooveshark/

Thats the mirror, its on a free domain but a paid host, they said they are all good with it.

Ive made some modifications, you can get the diff file on the main page. Just some styling, fixed a bug in popular.php, and removed the counter code..

Also Playlists dont work..

Edited by Xqtftqx
Link to comment
Share on other sites

Edit:

http://xqtftqx.hacked.jp/scripts/Grooveshark/

Thats the mirror, its on a free domain but a paid host, they said they are all good with it.

Ive made some modifications, you can get the diff file on the main page. Just some styling, fixed a bug in popular.php, and removed the counter code..

Also Playlists dont work..

Thanks! Would you like commit access to svn, since you've done a good bit for this project?

Link to comment
Share on other sites

Thanks! Would you like commit access to svn, since you've done a good bit for this project?

Sure :D, PM Me

Also, i get:

Warning: Cannot modify header information - headers already sent by (output started at /home/xqtftqx/public_html/scripts/Grooveshark/newexec.php:188) in /home/xqtftqx/public_html/scripts/Grooveshark/stream.php on line 4

at the top of a page when trying to play a song... followed by the ascii of the mp3.. im trying to fix it

Edited by Xqtftqx
Link to comment
Share on other sites

Haha, good ol' unreliable header();, you're problem is that in stream.php, you're including the functions class before defining the headers. Now, I couldn't be bothered to pick through everything in newexec.php to see what explicitly it was echoing, but here's all you need to do to fix the error.

Open stream.php

(optional, but good practice) uncomment "session_start();"

Move "header('Content-Type: audio/mpeg');" one line before "include "newexec.php";"

That's it. If anyone would like to see this in practice, or simply would like to get back to downloading, http://groovesnipe.it.cx/

Enjoy!

-Scott

Link to comment
Share on other sites

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

Edited by DarkStar851
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

RewriteEngine On
RewriteRule ^(.*)/(.*).mp3 /stream.php?songid=$1

Should work, not sure. Haven't tested, and my Regex isn't the best.

Works.

Google Chrome 5.0.375.70 beta, for reference. They probably broke something. You under Linux as well?

Anyways, I'm off to sleep for the night. Let me know if you come up with something a tad more elegant for streaming.. I have an idea, I'll do it up when I wake up, sometime around 3pm likely. :P

Edit:

It seems Grooveshark has changed their servers a bit. Updated stream.php code:

http://pastebin.com/TWwJRSF9

Edited by DarkStar851
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...