NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Windows v
« Previous 1 … 92 93 94 95 96 … 102 Next »
NScriptHelper.dll

 
  • 0 Vote(s) - 0 Average
NScriptHelper.dll
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#21
2019-08-28, 09:23 PM
mvallevand Wrote:I mean this kind of post that you and I request a lot https://forums.nextpvr.com/showthread.ph...post538897

Martin
As long as they've logged into the web app, they can open a tab and view that url. (it gets the sid from the user's existing session)
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#22
2019-08-28, 09:26 PM
You'll notice the browser automatically adds a .AspNetCore.Session=…… cookie to the web requests. On the server side, NextPVR determines the sid from this session.
jcole998
Offline

Posting Freak

New York, USA
Posts: 865
Threads: 186
Joined: Jun 2015
#23
2019-08-29, 01:40 PM
OK, I think I got it: No need to be signed in for NScriptHelper calls and SIDs are not an issue.

Finally, does NScriptHelper supply return codes? How? How is a recordings list returned? JSON? Is piping involved? Stdout? Scraping text files is lame. Web API returns nice neat JSON.

Is there a wiki somewhere?
Later...JohnC

System Status: Humming nicely!  Smile
Desktop: Intel DX38BT MB - Intel Q9650 3GHz Quad - NVIDIA GeForce GTX 1050 Ti Graphics
Software: Win 10 Pro(Build 1909) - NextPVR - WinTV8
Video: Verizon FiOS - Hauppauge DCR-3250 - Hauppauge 1512 HDPVR2
RaspberryPi 4 Raspbian and FLIRC
jcole998
Offline

Posting Freak

New York, USA
Posts: 865
Threads: 186
Joined: Jun 2015
#24
2019-08-31, 01:08 PM
Gentle nudge...Post #23...
jcole998
Offline

Posting Freak

New York, USA
Posts: 865
Threads: 186
Joined: Jun 2015
#25
2019-09-01, 02:26 PM
OK. Maybe I'm stating my case poorly.

I use Powershell virtually always and have created quite a few useful scripts that help me track what I want to schedule. I'd like to keep using them and is a V5 show-stopper. Documentation of URL usage is lean and the single source I have was offered by mvallevand from source code in GitHub. Tough going but I've managed to get what I need...so far.

There is a section in that source code dealing with SIDs: "/service?method=session.initiate&ver=1.0&device=xbmc" and "/service?method=session.login&sid=%s&md5=%s", m_sid, md5.c_str()"
Questions:
- Is session.initiate required?
- Are these the exact parameters? What needs to be altered to make it work for my environment? &device? &ver?
- Is the session login required? MD5 is complicated but manageable.

I looked again at the "help" for NScriptHelper(here) and it appears that all output goes to StdOut which is not very data-friendly. There is much more information returned by URLs than NScriptHelper. (start and end times, season and episode, recording resource, etc.)

I'm hoping I can get some detailed help on URLs for V5. Community members are virtually my only source.

Thanks...
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,191
Threads: 958
Joined: May 2006
#26
2019-09-01, 03:21 PM
The session.initiate gets you a sid the login authenticates it. So yes you need to do it. md5 in ps seems pretty simple to me https://docs.microsoft.com/en-us/powersh...rshell-4.0

You need the parameters that you see. I only know device=emby gives richer details then device=kodi

I don't know what you mean that stdout is not data friendly. std is just a file that is displayed to the console by default. Just direct to a file if you need to.

Martin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#27
2019-09-01, 06:45 PM
Sorry for the slow reply - I've been away the last few days.
jcole998 Wrote:Finally, does NScriptHelper supply return codes? How?
It doesn't currently, but I guess I should have it use a specific return code for failure.

Quote:How is a recordings list returned? JSON? Is piping involved? Stdout? Scraping text files is lame. Web API returns nice neat JSON.
These calls default to returning xml, but you can add &format=json to get json.

Quote:Is there a wiki somewhere?
No, not yet for v5 stuff. I'm thinking about how to address this though.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#28
2019-09-01, 06:48 PM
jcole998 Wrote:There is a section in that source code dealing with SIDs: "/service?method=session.initiate&ver=1.0&device=xbmc" and "/service?method=session.login&sid=%s&md5=%s", m_sid, md5.c_str()"
Questions:
- Is session.initiate required?
- Are these the exact parameters? What needs to be altered to make it work for my environment? &device? &ver?
- Is the session login required? MD5 is complicated but manageable.
With NScriptHelper you wont need to worry about the session.

Quote:I looked again at the "help" for NScriptHelper(here) and it appears that all output goes to StdOut which is not very data-friendly.
Where would you want it to go?

Quote: There is much more information returned by URLs than NScriptHelper. (start and end times, season and episode, recording resource, etc.)
The NScriptHelper will return you the exact same information as the URLs when using these -service calls

dotnet NScriptHelper.dll -service:method=recording.lists&list=pending
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 53,191
Threads: 958
Joined: May 2006
#29
2019-09-01, 08:44 PM
sub Wrote:It doesn't currently, but I guess I should have it use a specific return code for failure.
When it is an action you already send the rsp json/xml back. When there is an error you get it back too

sub Wrote:dotnet NScriptHelper.dll -service:method=recording.lists&list=pending

I am pretty sure you need to use quotes around the method to keep it together.

Marin
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#30
2019-09-01, 08:56 PM
yes, you'd be right - if it's got a space of '&' character, it'd need quotes around it.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (4): « Previous 1 2 3 4 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  nscripthelper in V7.0.0.241105 PRBUK 3 534 2024-12-17, 10:42 PM
Last Post: mvallevand
  How Run NScriptHelper.dll windows 11 NextPVR V6 bertiverson 3 1,005 2022-10-24, 05:09 PM
Last Post: bertiverson
  Nscripthelper jcjefferies 26 6,662 2021-12-25, 05:35 PM
Last Post: ReplayHarry
  EPG Update via command line nscripthelper failing .net error spe109 8 3,593 2021-04-03, 03:41 PM
Last Post: spe109
  updateepg using NScriptHelper is not allowed after recent V5 release upgrade fwpvr789 5 1,925 2020-06-13, 09:50 PM
Last Post: fwpvr789
  dotnet "C:\PROGRA~1\NextPVR\NScriptHelper.dll" -Rename does not rename pascalb 16 4,187 2020-05-25, 06:47 AM
Last Post: pascalb

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

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

Linear Mode
Threaded Mode