TooTallNate / node-icy

Node.js module for parsing and/or injecting ICY metadata
MIT License
291 stars 48 forks source link

metadata event only called once #31

Open rastographics opened 7 years ago

rastographics commented 7 years ago

The 'metadata' event is only getting called once on app startup. If the song changes, a new event is never thrown, but if I restart the server, it does grab the new song title then.

Is my stream setup wrong, or am I missing something in the code?

My code:

icy.get(shoutcastConfig.serverUrl,function(res){
    console.error(res.headers);
    res.on('metadata',function(metadata){
      var parsed = icy.parse(metadata);
      console.log('Metadata event called');
      console.log(parsed);
    });

The stream url is: http://ic2.christiannetcast.com/wytj-fm?type=.mp3

rastographics commented 7 years ago

OK I noticed this closed issue I must have missed when looking through before...it gives a correct answer to this problem.

I think this should be in the README somewhere for people to find much easier (than being buried in a closed issue). Thanks for this fantastic library.