Getting SHOUTcast metadata on the Mac
Posted
by Fernando Valente
on Stack Overflow
See other posts from Stack Overflow
or by Fernando Valente
Published on 2010-04-18T01:02:58Z
Indexed on
2010/04/18
1:13 UTC
Read the original article
Hit count: 696
I'm creating an application in Objective-C and I need to get the metadata from a SHOUTcast stream. I tried this:
NSURL *URL = [NSURL URLWithString:@"http://202.4.100.2:8000/"];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL];
[request addValue:@"1" forHTTPHeaderField:@"icy-metadata"];
[request addValue:@"Winamp 5/3" forHTTPHeaderField:@"User-Agent"];
[request addValue:@"audio/mpeg" forHTTPHeaderField:@"Content-Type"];
[NSURLConnection connectionWithRequest:request delegate:self];
I would have to get the headers from this request in order to get the information, right? Unfortunately it keeps returning these headers:
Date = "17 Apr 2010 21:57:14 -0200";
"Max-Age" = 0;
What I'm doing wrong?
© Stack Overflow or respective owner