Midday? Is that a British thing? We Yanks say Noon, as in High Noon
(cowboy movie reference there). Here's a quick stab at changing to
Noon, making it based on the real time (no 2 minute increase -- if you
really want the display to read 2 minutes "fast", add 120 to all the
time() calls, and use explicit time values for the longDateF() calls ),
and made it compatible with my FuzzyTime plugin.
This plugin is begging for 7.0's use of an external strings.txt file.
:-)
Code:
--------------------
123c123
< my ($sec, $min, $hour) = localtime(time);
---
> my ($sec, $min, $hour) = localtime(&getFuzzyTime($client));
125d124
< $min += 2;
177c176,177
< my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime(time);
---
> my $time = &getFuzzyTime($client);
> my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) =
localtime($time);
180,181c180
< my $nextUpdate = $client->periodicUpdateTime();
< Slim::Buttons::Common::syncPeriodicUpdates($client, int($nextUpdate))
if
(($nextUpdate - int($nextUpdate)) > 0.01);
---
> $client->param('modeUpdateInterval', 0.5); # seconds
187c186
< 'center' => [
Slim::Utils::DateTime::longDateF(undef,Slim::Utils::Prefs::get('screensaverDateFormat')),
---
> 'center' => [
Slim::Utils::DateTime::longDateF($time,Slim::Utils::Prefs::get('screensaverDateFormat')),
195c194
< 'center1' => Slim::Utils::Misc::longDateF(),
---
> 'center1' => Slim::Utils::Misc::longDateF($time),
408c407
< EN Midday
---
> EN Noon
411a411,418
> sub getFuzzyTime {
> my $client = shift;
> if ( defined($Plugins::FuzzyTime::Plugin::apiVersion) ) {
> return
int(Plugins::FuzzyTime::Public::getClientTime($client))
;
> }
> return time();
> }
>
--------------------
--
peterw
------------------------------------------------------------------------
peterw's Profile: http://forums.slimdevices.com/member.php?userid=2107
View this thread: http://forums.slimdevices.com/showthread.php?t=32975
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins