PDA

View Full Version : [Slim-Checkins] r3620 - trunk/server/Slim/Player



Triode
2005-07-06, 10:48
Dan,

This only handles line 2 - is the same needed for line1, center1/2 and the overlay 1/2?

Adrian
----- Original Message -----
From: <dsully (AT) svn (DOT) slimdevices.com>
To: <checkins (AT) lists (DOT) slimdevices.com>
Sent: Wednesday, July 06, 2005 2:52 AM
Subject: [Slim-Checkins] r3620 - trunk/server/Slim/Player


> Author: dsully
> Date: 2005-07-05 18:52:20 -0700 (Tue, 05 Jul 2005)
> New Revision: 3620
>
> Modified:
> trunk/server/Slim/Player/Player.pm
> Log:
> Bug: 1486
>
> Description: Non-G displays can't handle non-latin1 data. Turn off the UTF-8
> flag on the scalar so it's treated as bytes.
>
> We can't just turn on 'use bytes' - as valid Latin1 with the utf8 flag still needs to work.
>
>
> Modified: trunk/server/Slim/Player/Player.pm
> ================================================== =================
> --- trunk/server/Slim/Player/Player.pm 2005-07-06 00:07:25 UTC (rev 3619)
> +++ trunk/server/Slim/Player/Player.pm 2005-07-06 01:52:20 UTC (rev 3620)
> @@ -273,6 +273,14 @@
> if (defined($parts->{line2}) &&
> (!defined($cache->{line2}) || ($parts->{line2} ne $cache->{line2}) || (!$scroll && $cache->{scrolling}) ||
> ($scroll == 2) || ($scroll == 1 && $cache->{ticker}) )) {
> +
> + if (Slim::Utils::Misc::encodingFromString($parts->{line2}) eq 'raw') {
> +
> + # SliMP3 / Pre-G can't handle wide characters outside the
> + # latin1 range - turn off the utf8 flag.
> + $parts->{line2} = Slim::Utils::Misc::utf8off($parts->{line2});
> + }
> +
> $cache->{line2} = $parts->{line2};
> if (!$double) {
> $cache->{line2text} = $parts->{line2};
>
>

Dan Sully
2005-07-06, 10:50
* Triode shaped the electrons to say...

>This only handles line 2 - is the same needed for line1, center1/2 and the
>overlay 1/2?

I don't think so - the bad data never seems to be displayed there.

If you don't think it will hurt performance, then sure.

-D
--
<weezyl> $6.66: The Value Meal of the Beast.

Triode
2005-07-06, 10:56
>>This only handles line 2 - is the same needed for line1, center1/2 and the overlay 1/2?
>
> I don't think so - the bad data never seems to be displayed there.
>
> If you don't think it will hurt performance, then sure.

I'll look at the performance and see. Certain screensavers [MusicInfo] can put text in any corner, other than that I tend to agree.

Adrian