Hello, I am trying to make my own downloader to learn something (I am not able to download anything so far, and I think I've done exactly what you are doing).
But everytime I try to recieve the stream I get error 400, why do I get it?
I am using your DLL and doing it like this:
(Delete this if you don't want anyone to know how you do it, but since you are a programmer I bet you want people to know how you code and you gladly help other programmers)
Code:
//Code by scilor, www.scilor.com
private void DownloadItem(string sURL, string strFile, string strFolder)
{
object DownloadItem;
string myStringWebResource = null;
WebClient myWebClient = new WebClient();
WebHeaderCollection myHeaders = new WebHeaderCollection();
try
{
myStringWebResource = sURL;
//Directory.CreateDirectory(strFolder);
myWebClient.DownloadFile(myStringWebResource, "C:\\test.mp3");
myHeaders = myWebClient.ResponseHeaders;
DownloadItem = true;
}
catch (Exception exception1)
{
MessageBox.Show(exception1.Message);
}
}
private void button1_Click(object sender, EventArgs e)
{
GroovesharkSession test = Grooveshark.Connect();
GroovesharkSearchResponse resp = test.Search("Lady gaga");
GroovesharkSearchResponseItem respitem = resp.Items[11];
Stream music = respitem.GetMusicStream();
string Str = test.GetMusicUrl(respitem.SongID);
DownloadItem(Str, "", "");
}