NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Legacy (v4.x and earlier) v
« Previous 1 … 323 324 325 326 327 … 433 Next »
Checking if npvr is recrding or viewing live-tv

Checking if npvr is recrding or viewing live-tv
Reddwarf
Offline

Posting Freak

Posts: 6,629
Threads: 230
Joined: Mar 2007
#1
2012-01-21, 09:02 AM
I'm trying to use the NScriptHelper with the parameter -inuse to see if npvr is idle or using a tuner, but I can't seem to get this work. How should I use NScriptHelper -inuse in a batch to determine if npvr is recording or showing live-tv?

"I'd rather have a bottle in front of me than a frontal lobotomy"
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#2
2012-01-21, 04:44 PM
I'm terrible at batch files, so dont have any example for you. If you run "NScriptHelper.exe -isinuse" (notice the "is"), it'll say "RECORDING" if the system is eiethr recording or watching live tv, otherwise it'll say "NOT RECORDING".
OTAjunkie
Offline

Senior Member

Posts: 277
Threads: 49
Joined: Jul 2010
#3
2012-01-21, 06:09 PM
Often I'll keep the NPVR status window open on my client to be aware all the activities that may be going on when all of my tuners are in use.
Server:ASUS F1A75-V Pro,Radeon HD 6000,AMD A6 3670K,SSD128GB,2xWD 2Tb,W7Ultx64,5.1spks,2xHaup2250-MC,ATI650,CM7777,WG HD-8800
ClientTongue4 3.4,ATI HD4650,W7Ult
ClientTongue4 3.06,NVIDA6200,W7Ult
Client:Gateway Netbook,W7Start/XPpro
nDroid Client:Samsung Galaxy Note(synced to previous days recordings)
Reddwarf
Offline

Posting Freak

Posts: 6,629
Threads: 230
Joined: Mar 2007
#4
2012-01-21, 06:18 PM
sub Wrote:I'm terrible at batch files, so dont have any example for you. If you run "NScriptHelper.exe -isinuse" (notice the "is"), it'll say "RECORDING" if the system is eiethr recording or watching live tv, otherwise it'll say "NOT RECORDING".
I bet I'm even worse than you on batch files. I can't figure out how to assign the return value of the call to NScriptHelper to a variable I can compare to "RECORDING". Anyone has a tips?

"I'd rather have a bottle in front of me than a frontal lobotomy"
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,192
Threads: 958
Joined: May 2006
#5
2012-01-21, 06:32 PM
Here's a quick start

Code:
@echo off
FOR /F "tokens=*" %%i in ('"\Program Files\NPVR\NScriptHelper.exe" -isinuse') do SET ISINUSE=%%i
if "%ISINUSE"=="NOT RECORDING" echo Hi Reddwarf

Martin
Reddwarf
Offline

Posting Freak

Posts: 6,629
Threads: 230
Joined: Mar 2007
#6
2012-01-21, 06:40 PM
mvallevand Wrote:Here's a quick start

Code:
@echo off
FOR /F "tokens=*" %%i in ('"\Program Files\NPVR\NScriptHelper.exe" -isinuse') do SET ISINUSE=%%i
if "%ISINUSE"=="NOT RECORDING" echo Hi Reddwarf

Martin
Thanls! I'd never figured that out myself :o

"I'd rather have a bottle in front of me than a frontal lobotomy"
Reddwarf
Offline

Posting Freak

Posts: 6,629
Threads: 230
Joined: Mar 2007
#7
2012-01-21, 06:52 PM
As it turns out, NScriptHelper is actually returning "RECORDING " and "NOT RECORDING ", including the trailing space.

"I'd rather have a bottle in front of me than a frontal lobotomy"
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#8
2012-01-21, 06:59 PM
Reddwarf Wrote:As it turns out, NScriptHelper is actually returning "RECORDING " and "NOT RECORDING ", including the trailing space.
Not true. But it does write a line to the standard output, so it'll have a carridge return & line feed at the end of the line. This space you're seeing is probably something to do with how the batch file interpretter is handling those characters.
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,192
Threads: 958
Joined: May 2006
#9
2012-01-21, 07:06 PM
When I test with the script snippet I posted it doesn't return a trailing space.

Martin
Reddwarf
Offline

Posting Freak

Posts: 6,629
Threads: 230
Joined: Mar 2007
#10
2012-01-21, 07:39 PM
sub Wrote:Not true. But it does write a line to the standard output, so it'll have a carridge return & line feed at the end of the line. This space you're seeing is probably something to do with how the batch file interpretter is handling those characters.
mvallevand Wrote:When I test with the script snippet I posted it doesn't return a trailing space.

Martin
Well in order to get the compare (==) to kick in I had to add a trailing space to the string, like "RECORDING ". Don't know if it matters but this is on an XP machine.

"I'd rather have a bottle in front of me than a frontal lobotomy"
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Tuner not being released when live TV stopped on Kodi dark_half 7 3,002 2022-06-12, 11:59 PM
Last Post: sub
  npvr is not responding johndutcher 3 1,577 2022-05-05, 07:57 PM
Last Post: sub
  NPVR 4.2.4 Video Library No Longer Shows folder.jpg Lao Pan 12 4,062 2022-04-14, 04:33 AM
Last Post: Antmannz
  nPVR Continually Wakes PC bfos 23 11,647 2022-02-17, 03:48 PM
Last Post: sub
  Can't find tuner filter in NPVR 4.05 on old XP machine (eee 701) with RTL2832U iamanotheruser 3 1,827 2022-01-03, 04:45 AM
Last Post: mvallevand
  NextPVR and Remote viewing MaxiBelas 2 1,762 2021-09-07, 05:29 PM
Last Post: sub
  Can't watch certain channels on live tv (but can record) tvwatcher 4 2,289 2021-05-05, 06:23 AM
Last Post: tvwatcher
  Streaming Services with NPVR tesla1886 4 2,835 2021-01-04, 02:58 AM
Last Post: tesla1886
  NPVR choosing incorrect xml guide display-name after reboot drlava 7 3,252 2020-12-27, 02:27 AM
Last Post: sub
  Can NPVR offset only 3 channel listings in EPG? acemib 20 7,394 2020-04-27, 01:28 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