SHOUTcast problems

Discussion in 'Mac Programming' started by fernandovalente, Apr 25, 2010.

  1. fernandovalente macrumors 6502

    fernandovalente

    Joined:
    Aug 29, 2008
    Location:
    Third world **** hole, I mean, Brazil
    #1
    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:mad:"http://202.4.100.2:8000/"];
    NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:URL];
    [request addValue:mad:"close" forHTTPHeaderField:mad:"CONNECTION"];
    [request addValue:mad:"accept" forHTTPHeaderField:mad:"*/*"];
    [request addValue:mad:"1" forHTTPHeaderField:mad:"Icy-MetaData"];
    [request addValue:mad:"RadioToolX/1.0 (Macintosh; Intel)" forHTTPHeaderField:mad:"user-agent"];

    I would have to get the headers from this request in order to get the information, right? Unfortunately it keeps returning these headers:

    Date = "25 Apr 2010 23:05:29 -0200";
    "Max-Age" = 0;

    What I'm doing wrong?
     
  2. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #2
    The red-hilited code looks wrong. I'm unaware of any HTTP header whose name is "*/*".

    And if you're looking for Shoutcast metadata, then I'm pretty sure you'd have to get that from the server's reply, not the client's request.
     

Share This Page