Re: [SlimDevices: Beta] LMS 7.9 - enhancement request - further parsing of Shoutcast track info
Seven and a half years after suggesting these changes, I have finally implemented them as part of a plugin. It includes parsing of SHOUTcast ICY StreamTitle and looking up missing cover art It is in my Radio Now Playing plugin that is available via the LMS 3rd-party plugin list https://forums.slimdevices.com/showthread.php?115201-Announce-Radio-Now-Playing-plugin The parsing is done by regex and is held in a configuration file which makes it relatively easy to adapt for other stations if needed. But given that no-one else in the last 7 years has asked for this capability then I suspect it is just my big itch that was finally scratched. The regex looks something like this Code: StreamTitle=\'(?.*?): (?.*?)(?: - (?.*?))?\'(?:;|$)(?:StreamUrl=\'(?.*)\'(?:;|$))? which, if given StreamTitle=Happy Hour: The Beatles - When I'm 64;StreamUrl=https://lastfm.freetls.fastly.net/i/u/770x0/56c8ae3f99db414db15270f6adcc0f5b.gif#56c8ae3f99db414db15270f6adcc0f5b; will return: progtitle=Happy Hour artist=The Beatles title=When I'm 64 cover=https://lastfm.freetls.fastly.net/i/u/770x0/56c8ae3f99db414db15270f6adcc0f5b.gif#56c8ae3f99db414db15270f6adcc0f5b The regex is a bit more complicated than you might think it needs to be because it has to return sensible things when there is no song artist/title (implying a spoken link). Paul Webster http://dabdig.blogspot.com author of \"now playing\" plugins covering radio france (fip etc), planetradio (bauer - kiss, absolute, scala, jazzfm etc), kcrw, abc australia and cbc/radio-canada and, via the extra \"radio now playing\" plugin, allzic radio, caroline flashback, cesky rozhlas, frequence3, jukeradio, klassikradio.de, linn radio, mother earth, naim radio, nova.fr, radioblues flac, radio espace, radio swiss, rte ireland, somehow jazz, supla finland 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
Re: [SlimDevices: Beta] LMS 7.9 - enhancement request - further parsing of Shoutcast track info
old topic ... I've gone for a halfway solution that has the big benefit that no-one has to install any new plugin ... The station now puts artwork link into the StreamURL Shoutcast ICY data - which then gets displayed by magic on appropriate Squeezebox devices. Does not resolve the artist name issue - but can live with that. 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
Re: [SlimDevices: Beta] LMS 7.9 - enhancement request - further parsing of Shoutcast track info
Bringing this one back from the dead because I spent a bit of time working on making my own plug-in yesterday as suggested. I used Michael's DRS plugin as a template and I have mine working now but there are some issues that I would like some guidance with. 1) URL filter My filter works when I play by typing in the stream URL but if I play via the regular RadioTime/TuneIn station list then, not unreasonably I suppose, I do not get a match. My guess is that I could try to hijack the TuneIn URL when it includes my station id but they could break ... and what does LMS do if more than 1 filter matches the same stream URL 2) Artwork I can extend my code to put artist/track/show/station image but ... wouldn't it be better for the plugin to be able to signal that it is happy for LMS to provide this and then let it fall through to the (say) TuneIn artwork finder (based in the artist and track info that my plugin returned? e.g. not returning icon attribute could mean that plugin wants LMS to try and find one and returning empty attribute could mean that (for some reason) the plugin does not want the automated search to be done. 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
Re: [SlimDevices: Beta] LMS 7.9 - enhancement request - further parsing of Shoutcast track info
I thought about something like that - filtering on dandelionradio.com The code would then be, in essence, a clone of what is in HTTP.pm with the risk that it becomes out of date if things change in the future and probably needing people to download it. The benefit would the be that there would be no chance of it affecting other stations that might put a colon in their metadata artist for some other reason. 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
[SlimDevices: Beta] LMS 7.9 - enhancement request - further parsing of Shoutcast track info
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
Re: [SlimDevices: Beta] LMS 7.9 - enhancement request - further parsing of Shoutcast track info
This sounds like a good idea for a little plugin. You can create your own metadata parser, overriding the default behaviour: Slim::Formats::RemoteMetadata-registerParser( match = qr/shoutcast.com/, func = sub { my ( $client, $url, $metadata ) = @_; # do your magic here ... }, ); Michael Am 17.06.14 19:46, schrieb Paul Webster: 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 -- Michael ___ beta mailing list beta@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/beta