Sign up here and you can log into the forum!

Plugin : Time

The WDTVExt plugin depot. Plugins/libraries/code only

Plugin : Time   

Postby KAD » Sat Jan 21, 2012 3:21 pm

This displays the Current Time on Home Page.

I swear it's been done before, but I couldn't find it, so here's my version. It uses the system time, so if NTP is not working the time will not be correct.

Changlog
01/21/2012 version 1.0
*Public Release of Time plugin

downloads
Download from WDTVext menu on screen

Supported Devices
WDTV Live

Requirements
any WDLXTV firmware with base version 1.02.21 or 1.05.04-dev
NTP must be ON

KAD
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: Plugin : Time   

Postby avkiev » Sun Jan 22, 2012 3:59 am

KAD wrote:I swear it's been done before, but I couldn't find it

Very old version: http://avkiev.kiev.ua/wdtv/WDTVExt/Time/
avkiev
Developer
 
Posts: 167
Joined: Tue Apr 27, 2010 5:02 am
Location: Ukraine, Kiev

Re: Plugin : Time   

Postby dentex » Sun Jan 22, 2012 6:29 am

@ KAD: Cool, thanks.

@ avkiev: for me the link is down...

ciao.
User avatar
dentex
Supporter
 
Posts: 179
Joined: Fri Apr 15, 2011 4:57 am
Location: Italy

Re: Plugin : Time   

Postby avkiev » Mon Jan 23, 2012 3:42 am

dentex wrote:@ avkiev: for me the link is down...

Hmmm... Strange... Ok, try this one: http://avkiev.kiev.ua/wdtv/WDTVExt/Time/Time.plugin.js
avkiev
Developer
 
Posts: 167
Joined: Tue Apr 27, 2010 5:02 am
Location: Ukraine, Kiev

Re: Plugin : Time   

Postby dentex » Mon Jan 23, 2012 3:47 am

Both links work now, thanks.
User avatar
dentex
Supporter
 
Posts: 179
Joined: Fri Apr 15, 2011 4:57 am
Location: Italy

Re: Plugin : Time   

Postby mad_ady » Tue Jan 24, 2012 7:15 am

Cool plugin, but (as usual) I have a few suggestions for improvement:
1. It would be cool to have the clock auto-update every few seconds (e.g. 5 seconds to reduce the load). The way I propose this can be done is by calling a setTimeout() method that keeps calling the time method and redraws the screen. Inside the called function one could always re-call setTimeout() to schedule a new refresh. The diffictulty here is to find out when the user navigated to some page where the timer is no longer visible and stop calling setTimout to break the loop.
2. If 1 is not feasible, then what about fading out/removing the time after a few seconds (again with a setTimeout function). The idea is to display the time when there is user activity and hide it after 5s of inactivity (since the time would stop being accurate).

P.S. Oh, and I reduced the font size to 32. Looks less intrusive on my CRT.
User avatar
mad_ady
Developer
 
Posts: 4522
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: Plugin : Time   

Postby recliq » Tue Jan 24, 2012 7:27 am

JS setTimeout() doesn't work in WDTVExt (or at least I never got it working, if anybody got this working please tell me how!! ;))

btw clock plugin was intergrated in Tools plugin once but I removed it because I suspected it to cause dmaosd crashes...
however you can still find the code in SVN:
https://svn.wdlxtv.com/filedetails.php?repname=wdtvext-plugins&path=%2FTools%2FTools.plugin.js&rev=49

EDIT:
I just saw it was already in the original commit of Tools plugin in wdtvext-plugins repo which was the first plugin in repo:
SVN rev. 1
https://svn.wdlxtv.com/filedetails.php?repname=wdtvext-plugins&path=%2FTools%2FTools.plugin.js&rev=1

I hereby claim to be the inventor and creator of the clock plugin, you will recieve an invoice for dealing with copyright and patent fees shortly.. :lol: :lol:
/jk
­WDLXTV Project Maintainer
-:] If you like my contributions feel free to donate for a beer or a new flash drive. ...and always remember: RTFM! (README, FAQ, WIKI) [:-
User avatar
recliq
WDLXTV Team
 
Posts: 5513
Joined: Thu Apr 15, 2010 8:09 am
Location: Kiel, Germany

Re: Plugin : Time   

Postby mad_ady » Tue Jan 24, 2012 7:57 am

well, if setTimeout doesn't work, then scratch my idea... I thought wonderful things could be done with it...
I wonder if markster uses it in his MovieSheets+ plugin...
User avatar
mad_ady
Developer
 
Posts: 4522
Joined: Fri Nov 05, 2010 9:08 am
Location: Bucharest, Romania

Re: Plugin : Time   

Postby recliq » Tue Jan 24, 2012 8:03 am

I doubt that since it was never working in WDTVExt afair.
­WDLXTV Project Maintainer
-:] If you like my contributions feel free to donate for a beer or a new flash drive. ...and always remember: RTFM! (README, FAQ, WIKI) [:-
User avatar
recliq
WDLXTV Team
 
Posts: 5513
Joined: Thu Apr 15, 2010 8:09 am
Location: Kiel, Germany

Re: Plugin : Time   

Postby KAD » Tue Jan 24, 2012 8:51 am

@Mad_ady, you probably noticed, time is updated on key press, but I guess on page timer could be used to update as well

@recliq,

I hereby claim to be the inventor and creator of the clock plugin, you will recieve an invoice for dealing with copyright and patent fees shortly..
/jk
the patent office will decide, you created a clock plugin, I created a time plugin :lol:
do I hear android vs apple in the background
/jk
KAD
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Next

Return to WDTVExt plugins

Who is online

Users browsing this forum: No registered users and 2 guests

cron