NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 2 3 4 5 6 … 93 Next »
Determine Server Tuner/Recorder Status from Console App

 
  • 0 Vote(s) - 0 Average
Determine Server Tuner/Recorder Status from Console App
27InchSony
Offline

Junior Member

Michigan, USA
Posts: 16
Threads: 2
Joined: May 2009
#1
2016-10-12, 03:10 AM (This post was last modified: 2016-10-13, 02:10 AM by 27InchSony.)
I'm trying to programmatically determine if anything is currently being recorded by NPVR from an external console app. I can probably deduce it by looking at the Scheduled Recordings in the NPVR db, but is there an easier method? Link to docs, sample code?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#2
2016-10-12, 03:21 AM
You can run "NScriptHelper.exe -isinuse" or "NScriptHelper.exe -isrecording" or "NScriptHelper.exe -now". Each does slightly different things.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,767
Threads: 954
Joined: May 2006
#3
2016-10-12, 03:22 AM
The nextpvr .net plugin API is available to console apps too. You can get status via http .

Martin.
27InchSony
Offline

Junior Member

Michigan, USA
Posts: 16
Threads: 2
Joined: May 2009
#4
2016-10-13, 02:04 AM (This post was last modified: 2016-10-13, 02:11 AM by 27InchSony.)
From sub's recommendation......how part of the NScriptHelper.exe code works:

Code:
string serverStatus = NShared.RecordingServiceProxy.GetInstance().GetServerStatus();
if (serverStatus.ToLower().Contains("recording") || serverStatus.ToLower().Contains("livetv"))
{
    //hey things are recording!
}
volfin
Offline

Junior Member

Posts: 41
Threads: 3
Joined: Jul 2016
#5
2016-12-08, 12:52 AM
Is there documentation somewhere for NscriptHelper.exe? I searched the wiki and found nothing.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#6
2016-12-08, 01:14 AM
You can find some info here:
http://forums.nextpvr.com/showthread.php...Helper-exe
volfin
Offline

Junior Member

Posts: 41
Threads: 3
Joined: Jul 2016
#7
2016-12-14, 01:31 AM
hmm, I was kind of hoping it would be able to start/stop a recording from the command line. Is there any way to do that with NextPVR? Or perhaps some other kind of utility that would work with a DRI device or Network Recorder device?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#8
2016-12-14, 02:15 AM
No - that sort of stuff is built into the user interface for the app.

What are you trying to do exactly? Why do you require this type of functionality from the command line?
volfin
Offline

Junior Member

Posts: 41
Threads: 3
Joined: Jul 2016
#9
2016-12-15, 10:35 PM
well, for whatever reason, my Ceton seems to have a problem when coming from Sleep, the first attempt to record fails because CableCARD has a bad channel list or something. Every record attempt after that is fine. But if I have 3 shows recording, then the one of the three always fails (whichever is attempted first I guess). So I wanted to make Wakeup.bat do a fake attempt to record to fix the problem.

And maybe by "fail" I should say NextPVR is oblivious that anything is wrong, it's simply the frequency is set wrong so there's no data sent. looking at channels when it happens, the frequency is wrong, and the program data is blank. (see pic)

[Image: 8MzWBlQ.png]

but anyway that's why I want to do that, to just poke the card to make sure it's fully working. I guess i'll have to write my own if I can find some docs on DRI/Network recorder APIs.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 52,767
Threads: 954
Joined: May 2006
#10
2016-12-15, 11:33 PM
Like I wrote earlier you can create a console .net app to do pretty anything. Probably the best source for this is to see how NEWA manages it.

Using sockets from the console you can also use sub's web XML api self documented in Kodi https://github.com/kodi-pvr/pvr.nextpvr/...extpvr.cpp or in NEWA's excellent well documented JSON web service. http://localhost:8866/api

To tune and record in batch file you could just use something like curl to capture a short live stream using curl or wget and then killing the task after a few seconds. Once streaming stops NextPVR will eventually cancel the recording on The syntax for a live tv url is http://localhost:8866/live?channel=## so in pseudo code it would be

start wget url -O nul
sleep 5
taskkill /IM wget.exe /f

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  FM tuner support in NextPVR? Goongyae 2 1,318 2022-11-23, 01:22 PM
Last Post: mvallevand
  Auto top movie recorder janoonk 8 2,547 2021-01-19, 10:49 PM
Last Post: mvallevand
  Status field values in Table SCHEDULED_RECORDING scJohn 2 2,289 2019-07-03, 07:01 PM
Last Post: sub
  Tuner status & disk usage mikaelgu 2 2,879 2017-04-10, 04:51 PM
Last Post: mikaelgu
  Looking for C# UPnP Media Server code bgowland 5 7,556 2016-12-16, 08:25 PM
Last Post: mvallevand
  What causes a new tuner to be used services/live?channel= psycik 2 2,252 2014-02-04, 05:32 PM
Last Post: psycik
  Tuner plugins and client id mvallevand 2 2,040 2013-07-03, 01:39 AM
Last Post: mvallevand
  Tuner Plugins - Output folders mvallevand 2 2,029 2013-02-19, 07:45 PM
Last Post: mvallevand
  Tuner plugins mvallevand 4 2,419 2012-08-05, 11:19 PM
Last Post: mvallevand
  Recorder plugins - Deleting tuners mvallevand 1 1,490 2012-03-29, 12:51 AM
Last Post: sub

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

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

Linear Mode
Threaded Mode