utgg wrote:
> Here is another bit of patching to make the song info and icon from
> RadioVis actually update in the web interface with the
> BBCiPlayer-v1.3.1alpha2 plugin.
Thanks utgg - I was wondering how to get the bitrate to be updated
properly in the web UI.
This is for you hardcore tinkerers out there...
I've also put a bit of a patch together, I've been delving in to the
details coming back through the HLS stream and noticed it sends a
'CODECS' section that describes the type stream being sent. I went a
little over-the-top in writing a decoder module, but if anyone's
interested in seeing what type of stream info is sent then you might
want to try this. I did it in anticipation of any other stream type data
being sent down.
First download the attached RFC6381.pm file to the same BBCiPlayer
plugins directory and if you're on a unix-like OS make it owned by the
same user-id as the other files in that directory and readable eg as
root:
Code:
--------------------
root@squeezeplug:/var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/BBCiPlayer#
chown squeezeboxserver:nogroup RFC6381.pm
root@squeezeplug:/var/lib/squeezeboxserver/cache/InstalledPlugins/Plugins/BBCiPlayer#
chmod 644 RFC6381.pm
--------------------
Next you need to edit two of the existing files - As with all of these
changes remember to make a backup, and of course caveat emptor.
First edit *HLS.pm* and around line 16 add the use line below
Code:
--------------------
use Slim::Utils::Errno;
use Slim::Utils::Log;
use Plugins::BBCiPlayer::RFC6381;
use bytes;
--------------------
Then around line 120 add
Code:
--------------------
if ($params =~ /BANDWIDTH=(\d+)/) {
$log->debug("bandwidth: $1");
my $stream = ${*$self}{'song'}->streamUrl;
my $track =
Slim::Schema::RemoteTrack->fetch($stream);
$track->bitrate($1);
}
elsif ($params =~ /(^CODECS=.+)/) {
$log->debug("codecs: $1");
my $codecs =
Plugins::BBCiPlayer::RFC6381::description($1);
${*$self}{'song'}->pluginData('codecs'
=> $codecs);
}
}
my $redurl = shift @lines;
--------------------
Then in *iPlayer.pm* you need to change two other bits. Around lines 450
to 460 add a line and change another (the old one is commented out as
you see):
Code:
--------------------
$icon = $song->pluginData('icon');
}
my $codecs = $song->pluginData('codecs');
if ($song->pluginData('info')) {
return {
title => $title,
artist => $song->pluginData('info'),
cover => $icon,
icon => $icon,
# type => $track && $track->content_type,
type => $codecs ? $codecs : ($track &&
$track->content_type),
bitrate => $bitrate,
duration => $track && $track->secs,
};
--------------------
And also around lines 470-480:
Code:
--------------------
artist => $song->pluginData('artist') ||
uri_unescape($params{'desc'}),
cover => $icon,
icon => $icon,
# type => $track && $track->content_type,
type => $codecs ? $codecs : ($track &&
$track->content_type),
bitrate => $bitrate,
duration => $track && $track->secs,
};
--------------------
Then restart LMS as usual. The speed line for listen-live BBCiPlayer
streams changes from something like:
Code:
--------------------
339kbps CBR, aac
--------------------
to
Code:
--------------------
339kbps CBR, AAC LC
--------------------
A lot of work for a tiny visual change! was fun tho.
Have fun!
Parky.
+-------------------------------------------------------------------+
|Filename: RFC6381.pm |
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=17792|
+-------------------------------------------------------------------+
------------------------------------------------------------------------
Parky's Profile: http://forums.slimdevices.com/member.php?userid=30307
View this thread: http://forums.slimdevices.com/showthread.php?t=53229
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins