Accessing data in songStreamController

Paul Webster <Paul.Webster.akkjrz-NUepA2SMhDQqspMVqqL2D+4xXEVPTSb/[email protected]> Tue, 17 May 2022 12:28:58 +0000
Newsgroups gmane.music.equipment.slimdevices.devel
Organization Logitech Squeezebox Forums
Message-ID <[email protected]>
I am trying to resolve an issue that I have had for ages ... where a
stream URL changes because of a redirect and then the new stream URL no
longer matches a regex that I have in place.
I have been getting around this by working out a set of regex matches
that work for the original and for the one redirected to but have now
hit one that this is not feasible to do.

So - time has come to do it properly and use the original URL.

I do this because I have to set up a timer to call me back to go out and
find metadata for the currently playing song (since it is not in the
stream metadata).

My recollection of the history of this is that if my timer expires but
the listener has changed to play something else then I must not
overwrite the now playing information with the track info from what is
now the previous station being listened to ... so I get the current
stream via


Code:
--------------------
    
  my $song = $client->playingSong();
  if ( $song && $song->streamUrl ) { $playingURL = $song->streamUrl}
--------------------


However, I dumped out a bunch of stuff and saw ... (edited) ...


Code:
--------------------
    
  'songStreamController' => bless( [
  bless( [
  'Slim::Player::Protocols::HTTPS',
  0,
  bless( [
  -157146472,
  1,
  undef,
  undef,
  'h t t p s ://currentlyplaying.stream/mp3',
  'h t t p://originally.launched.stream/mp3',
  'mp3',
  192000,
  0,
  undef,
  undef,
  undef,
  undef,
  undef,
  'station name',
  
--------------------


So my question ... what is the correct way to get those 2 URLs from
songStreamController ?
Is the first one the same as 
$song->streamUrl

I tried to find where the blessed object is defined but without luck so
far.



Paul Webster
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 lots more - see
https://forums.slimdevices.com/showthread.php?115201-announce-radio-now-playing-plugin
------------------------------------------------------------------------
Paul Webster's Profile: http://forums.slimdevices.com/member.php?userid=105
View this thread: http://forums.slimdevices.com/showthread.php?t=116388