Hello all,

I have a request - and have a patch for it (but am not git-literate).
When the track info from a streaming (Shoutcast) server has " - " then
it is assumed to be
artist - track
I have a special case where there is extra info before the artist name -
something like this
showname: artist - track
This is not a standard - so I could imagine that people might not want
it ... but I think that the chance of a clash with a genuine artist name
is very remote.

I suppose that it could be made configurable (to enable/disable the
facility).

The change would be in /Player/Protocols/HTTP.pm within sub
getMetadataFor
change

Code:
--------------------
    
  my ($artist, $title);
  
--------------------


to

Code:
--------------------
    
  my ($artist, $title, $artistPrefix);
  
--------------------


AND


Code:
--------------------
    
  my @dashes = $currentTitle =~ /( - )/g;
  if ( scalar @dashes == 1 ) {
  ($artist, $title) = split / - /, $currentTitle;
  }
  
--------------------


to

Code:
--------------------
    
  my @dashes = $currentTitle =~ /( - )/g;
  if ( scalar @dashes == 1 ) {
  ($artist, $title) = split / - /, $currentTitle;
  
  # Special case - if Artist has a "non-space colon space" then assume special 
prefix and split again
  # e.g. "The 60s Chart Show: Beatles - Help!" => artist=Beatles title=Help!
  # but should not catch "Code : Red Core - Caution" => artist=Code : Red Core 
title=Caution
  my @showcolon = $artist =~ /\S: /g;
  
  if ( scalar @showcolon == 1 ) {
  ($artistPrefix, $artist) = split /: /, $artist;
  }
  }
  
--------------------



To test - play any Shoutcast station and show that things appear to work
as before ... then play "Dandelion Radio" before and after the change.



Paul Webster
http://dabdig.blogspot.com
------------------------------------------------------------------------
Paul Webster's Profile: http://forums.slimdevices.com/member.php?userid=105
View this thread: http://forums.slimdevices.com/showthread.php?t=101728

_______________________________________________
beta mailing list
beta@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/beta

Reply via email to