NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Add-ons (3rd party plugins, utilities and skins) v
« Previous 1 2 3 4 5 … 20 Next »
NextPVR Recording Service Monitor

 
  • 0 Vote(s) - 0 Average
NextPVR Recording Service Monitor
ChaosMageX
Offline

Junior Member

Posts: 48
Threads: 25
Joined: Oct 2015
#1
2019-09-23, 02:54 AM (This post was last modified: 2019-09-29, 07:00 PM by ChaosMageX.)
Well, after NextPVR's recording service crashed yet again last night, destroying almost all of Toonami without my knowledge until the following morning, I finally decided to bite the bullet and build an app to do something about it. I only regret not doing it sooner.

This app is designed to basically babysit NextPVR by monitoring the state of its recording service once per second. If it detects that the service has stopped for whatever reason, it will log the time at which this occurred, copy all of NextPVR's log files into a separate directory with this timestamp, and then attempt to restart the service. Once the service has been successfully restarted, it will log the time at which it restarted the service. From my own tests of manually stopping the service, it seems to restart it within 5 seconds of it stopping. The new folder full of the log file copies is in the same directory as the original log file folder, which is C:\Users\Public\NPVR\Log_yyyy-MM-DD_hh\hmm_ss, and it can then be perused at your leisure, or compressed and uploaded to this forum for the developers to peruse.

The application is completely open source and the code is available to download as part of the suite of tools that I have been developing to complement NextPVR. It can be found and downlaoded at my GitHub repository here:

https://github.com/ChaosMageX/NextPVR-Utilities

WARNING: USE THIS SOFTWARE AT YOUR OWN RISK. It is designed to directly mess with NextPVR's central recording service, but only to restart it if it has stopped. Still, Murphy's Law: What can go wrong, will go wrong. NextPVR itself has proven that to me time and time again. I've tried my best to fool proof it by ensuring that it can only run one instance at a time and always run with administrator privileges so it can successfully restart the recording service, but still, be wary.

If anything does go wrong, please let me know in a reply to this thread and I'll do my best to fix it in the code and upload a new version.

If you have any suggestions on how I can further improve this application and any new features I can add to it, please don't hesitate to let me know in a reply to this thread.

Installation is simple. Just extract the contents of the ZIP file to the directory of your choice, and begin running the application with administrator privileges. It should ask you for admin privileges from the start, but if it doesn't, it will simply refuse to run, and you'll have to right click it and choose Run As Administrator.

If you want, you can also right click the executable and choose Create Shortcut, and then move the created shortcut file into either

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp

or

C:\Users\<username>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

in order to get it to start up at the time you start your computer so that it can monitor NextPVR's recording service right from the start.

EDIT 9/23/2019: Added SecsToStart to the configuration file that comes with the application so that the seconds it waits at startup before monitoring can be adjusted for when it's run from Startup on computers where NextPVR takes longer than usual to start its recording service itself.

EDIT 9/24/2019: Added a "Backup NextPVR Logs Now" button so that users can backup NextPVR's logs into a separate timestamped button at any time with just a single click, in case they need to backup the logs for another reason besides the recording service crashing.

Since this is a change to the GUI, I think it warrants a new version, Version 1.1, which can be downloaded below.

EDIT 9/29/2019: Improved the internal handling of the application, so that its GUI is no longer stuck frozen and unusable while waiting on initial startup. These improvements are in version 1.1 only, so I'm removing version 1 now.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#2
2019-09-23, 03:53 AM
An easier way of achieving this is go into the Recovery tab of the NextPVR Recording Service in the Services tab, and set it to restart on failure.
ChaosMageX
Offline

Junior Member

Posts: 48
Threads: 25
Joined: Oct 2015
#3
2019-09-23, 02:19 PM
Yes, but that won't backup NextPVR's logs. It might note the time of failure, though, but you'd probably have to go sifting through the Windows Event Logs to find it.

Ultimately, this is just a way of automating the rest of the process so that someone could possibly isolate what exactly it is that's causing the recording service to crash.

Still, it's good to know there's a simple alternative if you don't want the logs.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Radio stations for NextPVR mvallevand 16 1,269 2025-02-20, 03:28 AM
Last Post: Siftingice
  Comskipped videos played back on NextPVR desktop application halt on commercial break mlopez1007 2 898 2023-07-03, 07:47 PM
Last Post: mvallevand
  OlSkool skin for NextPVR v6 Jaggy 0 964 2023-06-11, 03:59 AM
Last Post: Jaggy
  Nextpvr imports not playing in Kodi samwiliams33 25 4,208 2021-12-30, 03:20 PM
Last Post: mvallevand
  how to configure RemoteRecorder Plugin to use remote NextPVR instance? bm_00 5 2,891 2020-10-06, 12:32 PM
Last Post: mvallevand
  Automatic movie recording based on existing libraries daneo 10 5,036 2020-04-14, 08:02 PM
Last Post: daneo
  NextEnd: "Sports event monitor did not start" antenna 37 12,554 2019-10-27, 12:22 AM
Last Post: mvallevand
  Need nextPVR Add-on for testing using Kodi Version 19 jmooremcc 3 3,389 2019-06-28, 08:02 PM
Last Post: mvallevand
  NextPVR/Ceton InfiniTV Eth6/ FOIS /Copy Freely Locks up Dnabsuh 4 3,310 2019-03-01, 06:18 PM
Last Post: Dnabsuh
  New Plex Scanners for NextPVR W3bbo 2 4,402 2018-05-25, 07:23 AM
Last Post: W3bbo

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

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

Linear Mode
Threaded Mode