NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 78 79 80 81 82 … 93 Next »
Background plugin

 
  • 0 Vote(s) - 0 Average
Background plugin
sixgun
Offline

Member

Posts: 197
Threads: 35
Joined: Sep 2004
#1
2005-01-15, 09:18 AM
Hi,

I am looking to write a plugin that will sync the time with a NTP server providing that time update will not screw up any in-progress recordings. I have had a look through the GBPVR.Public namespace and cannot see anything obvious that would allow me to do that.

Is a plugin even capable of running in the background with no gui, or would i need to write an external service such as the GBPVR Recording Service?

Thanks.
GBPVR: v0.99.5
Server: Athlon64 X2 3800+, 2GB Memory, 1480GB Storage, 6 DVB-T Tuners (2 x Nova-T 500 PCI, 2 x Nova-T PCI)
HTPC: Athlon64 3000+, 1GB Memory, 80GB Storage, Blackgold GDI DVB-T Tuner, Ahanix MCE-302 Case, MSI K8NGM2-FID motherboard
Main TV: Toshiba 42WLT66 LCD
Media Playback: 2 x MVP (wired)
Homepage: http://www.sixgun.co.uk/
Author of MpegImport utility
jasonf
Offline

Member

Posts: 121
Threads: 7
Joined: Oct 2004
#2
2005-01-15, 01:46 PM
There are plenty of utilities to keep your computer's clock in sync. One is even built into Windows (at least XP and 2003).

If you double-click on the clock in the taskbar of Windows, you'll get the Date/Time applet. There should be a tab called "Internet Time". Enable "Automatically synchronize with an Internet server" and then select a server. It will adjust your clock accordingly, and then schedule itself to repeat automatically.

Oh, and your mileage may vary if you're located outside of the USA--I haven't played with foreign distributions of Windows to see if the same feature sets are available.
JasonF
sixgun
Offline

Member

Posts: 197
Threads: 35
Joined: Sep 2004
#3
2005-01-17, 02:55 PM
I do know about that. I actually have a piece of software that does it, but i wanted to link it into GBPVR so that it doesn't interfere with any recordings that have just started. I have had recordings that have lasted a few seconds because the time synced just after the recording started, changing the time to before the recording was scheduled to start, therefore stopping the recording. I don't know if that is what happened for sure, but it's the best theory i can come up with.

Unfortunately my real time clock is a bit screwy, in that it gains about 1 minute in every 15. So i have set up a recurring task in windows to sync the time every 15 minutes. I have an RMA number to get the motherboard fixed/replaced but it means me sending it to the Netherlands (i am in the UK), and i'd rather not do without it for the amount of time that it's going to take to get there, get fixed and arrive back with me.

I have tried complaining to the manufacturer and the supplier but neither of them seem to care much about after sales service [Image: sad.gif]

So, i wanted to try writing a plugin that would change the time sympathetically.

Thanks for trying to help anyway.
GBPVR: v0.99.5
Server: Athlon64 X2 3800+, 2GB Memory, 1480GB Storage, 6 DVB-T Tuners (2 x Nova-T 500 PCI, 2 x Nova-T PCI)
HTPC: Athlon64 3000+, 1GB Memory, 80GB Storage, Blackgold GDI DVB-T Tuner, Ahanix MCE-302 Case, MSI K8NGM2-FID motherboard
Main TV: Toshiba 42WLT66 LCD
Media Playback: 2 x MVP (wired)
Homepage: http://www.sixgun.co.uk/
Author of MpegImport utility
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,789
Threads: 769
Joined: Nov 2003
#4
2005-01-17, 03:36 PM
Writing it as a plugin wont really help anything. If you need to re-sync the time, you should do it outside of GB-PVR.
bgowland
Offline

Posting Freak

West Yorkshire, UK
Posts: 4,589
Threads: 385
Joined: Dec 2004
#5
2005-01-17, 03:56 PM
[b Wrote:Quote[/b] (sixgun @ Jan. 17 2005,09:55)]Unfortunately my real time clock is a bit screwy, in that it gains about 1 minute in every 15. So i have set up a recurring task in windows to sync the time every 15 minutes.

...

So, i wanted to try writing a plugin that would change the time sympathetically.
How are you at "data access" programming, i.e., ODBC, ADO?

Looking at what you want to do, it seems that you want to check whether or not a recording is in progress or just about to start. You could try writing something that queried the gbpvr.mdb to return a RecordSet of recordings. I've not tried it but it could be done. There is no reason this has to be done from within GB-PVR.

Just a thought.

Brian
sixgun
Offline

Member

Posts: 197
Threads: 35
Joined: Sep 2004
#6
2005-01-17, 07:30 PM
I am a software engineer by trade, so it'd be a piece of cake. I'll have a look at the database layout.

Thanks.
GBPVR: v0.99.5
Server: Athlon64 X2 3800+, 2GB Memory, 1480GB Storage, 6 DVB-T Tuners (2 x Nova-T 500 PCI, 2 x Nova-T PCI)
HTPC: Athlon64 3000+, 1GB Memory, 80GB Storage, Blackgold GDI DVB-T Tuner, Ahanix MCE-302 Case, MSI K8NGM2-FID motherboard
Main TV: Toshiba 42WLT66 LCD
Media Playback: 2 x MVP (wired)
Homepage: http://www.sixgun.co.uk/
Author of MpegImport utility
KingArgyle
Offline

Posting Freak

Posts: 1,271
Threads: 95
Joined: Nov 2004
#7
2005-01-17, 09:33 PM
You could easily use the GBPVR API to get the Schedule, and filter down to just the ones that are in a Pending Recording Status or a Recording Status. Narrow the search further by just limiting to a certain start and end time range.
sixgun
Offline

Member

Posts: 197
Threads: 35
Joined: Sep 2004
#8
2005-01-20, 10:07 AM
I knocked up something the other night, just needs a bit of polishing up.

It accesses the gbpvr database and finds out if there are any in progress recordings, then works out whether the proposed time change (via the built-in NTP client) will screw up the in-progress recording(s).

Only thing is, i had a couple of very short power cuts the other night (just after i'd started this little project), the first one the media server was fine, the second power cut it restarted, and ever since the time has been spot on !!

It defies explanation.

Thanks for all the suggestions though.

If anyone has a need to a time sync service that integrate into the gbpvr database then i might carry on with the development.

I have now ordered a UPS for the server. Don't particularly want a 3x200 gig RAID0 disk crash.
GBPVR: v0.99.5
Server: Athlon64 X2 3800+, 2GB Memory, 1480GB Storage, 6 DVB-T Tuners (2 x Nova-T 500 PCI, 2 x Nova-T PCI)
HTPC: Athlon64 3000+, 1GB Memory, 80GB Storage, Blackgold GDI DVB-T Tuner, Ahanix MCE-302 Case, MSI K8NGM2-FID motherboard
Main TV: Toshiba 42WLT66 LCD
Media Playback: 2 x MVP (wired)
Homepage: http://www.sixgun.co.uk/
Author of MpegImport utility
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  PIP plugin for Kodi sgilani 2 3,048 2022-10-17, 12:44 AM
Last Post: sgilani
  New Systems Plugin kirschey 10 3,526 2020-11-14, 08:01 PM
Last Post: sub
  VIdeo playback from plugin mvallevand 5 3,610 2015-08-06, 10:43 PM
Last Post: sub
  Attention Sub: Open TV / Custom Data Grabber plugin Benoire 2 2,989 2014-11-14, 02:05 AM
Last Post: Benoire
  API docs to help with plugin development? McBainUK 3 2,852 2013-06-08, 06:14 PM
Last Post: sub
  Refreshing TV Guide Data (after System plugin EPG update) imilne 13 6,300 2013-03-24, 08:03 PM
Last Post: imilne
  sabnzbd plugin to show processed files Wakalaka 1 2,013 2013-03-12, 06:48 AM
Last Post: psycik
  Plugin problems with started from the command line mvallevand 11 5,190 2012-08-12, 07:56 PM
Last Post: sub
  How to prevent default screen background? cncb 28 8,706 2012-05-16, 08:28 PM
Last Post: ACTCMS
  Get NextPVR data directory from outside a plugin McBainUK 3 2,323 2012-02-11, 05:42 PM
Last Post: mvallevand

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode