SciLor's Open Source Forums
http://forum.scilor.com/

Grooveshark API - getMusicUrl
http://forum.scilor.com/viewtopic.php?f=133&t=213
Page 1 of 1

Author:  greenlipton [ Wed May 26, 2010 4:24 pm ]
Post subject:  Grooveshark API - getMusicUrl

Hi

I Would like to make my own version of the Grooveshark downloader for myself.
I'm a bit confused about the datastream: How to get the download Url

Some example code:
Code:
        Dim client As New GroovesharkClient
        Dim resp As SearchArtist.getSearchArtistResultsResponse = client.SearchArtist("beyoncĂ©", 1000)
        Dim item As SearchArtist.SearchArtistResult = resp.result.result.Item(11)

        Dim stream As New Functions.GetMusicStream(client)


I am actually a java programmer, but I know some basics of VB.net
I saw this topic (viewtopic.php?f=133&t=87), but I can't find the method "GetMusicUrl", so I am able to download the song.

How can I get the download Url of the selected song?

I realy appreciate soms tips :)

Thx anyway!
Dieter

Author:  SciLor [ Wed May 26, 2010 4:36 pm ]
Post subject:  Re: Grooveshark API - getMusicUrl

You will not get any URL(It was an old API), but a DownloadStream in that version. Just read the Stream into a file.

That may help: http://ondotnet.com/pub/a/dotnet/2003/0 ... reams.html

And please, do not release your Downloader in any way, including my Grooveshark(tm).com API. You may release your tool without the my API, but you will have you say the user to download the api from here!

Author:  greenlipton [ Wed May 26, 2010 6:37 pm ]
Post subject:  Re: Grooveshark API - getMusicUrl

Hi

Can I use the stream from the GroovesharkAudioStream, because there is no access to read this stream?

Don't worry the release, it's just for myself ;)

Author:  SciLor [ Wed May 26, 2010 6:51 pm ]
Post subject:  Re: Grooveshark API - getMusicUrl

Just play around with it a bit ;)

Here is some source:
Code:
            Dim tempMusic As Groove.Music.GroovesharkAudioStream = grooveClient.GetMusicStream(DownloadResults(SearchItemID).SongID)
            Dim DataRead As Integer
            Dim LoadedData As Integer = 0
            Dim tempBuffer(1023) As Byte
            If IO.Directory.Exists(IO.Path.GetDirectoryName(tempFileName)) = False Then
                IO.Directory.CreateDirectory(IO.Path.GetDirectoryName(tempFileName))
            End If
            Dim tempFile As New IO.FileStream(tempFileName, IO.FileMode.Create)

            pgbCurrentDownload.Value = 0
            pgbCurrentDownload.Maximum = tempMusic.Length
            Do Until tempMusic.Length = LoadedData
                DataRead = tempMusic.Stream.Read(tempBuffer, 0, tempBuffer.Length)
                tempFile.Write(tempBuffer, 0, DataRead)
                LoadedData += DataRead
                pgbCurrentDownload.Value = LoadedData
                Application.DoEvents()
            Loop

Author:  greenlipton [ Wed May 26, 2010 9:00 pm ]
Post subject:  Re: Grooveshark API - getMusicUrl

Thx dude!

Donation 4 free ;)

Page 1 of 1 All times are UTC + 1 hour [ DST ]
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/