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 … 48 49 50 51 52 … 433 Next »
PostProcessing and PostCancel.bat being triggered but not working

PostProcessing and PostCancel.bat being triggered but not working
antenna
Offline

Member

Posts: 61
Threads: 8
Joined: Oct 2017
#1
2018-08-05, 01:04 AM
This seems like the simplest problem, but I'm stumped. After a recording finishes, I want NextPVR to "touch" a URL on my Plex Media Server that will kick off a library update. Plex has a number of URL's that will automatically start a task. In my case, I want NextPVR to visit this web page after a recording completes:

Code:
http://[PMS_IP_ADDRESS]:32400/library/sections/29/refresh?X-Plex-Token=YourTokenGoesHere

(Except the IP, library number, and token are added properly)

Now that Windows 10 natively has curl available from the command, this should be a piece of cake. I have both a PostProcessing.bat and a PostCancel.bat located in C:\Users\Public\NPVR\Scripts that contain just one line (with the IP and Token info removed of course):

Code:
curl http://IP:32400/library/sections/3/refresh?X-Plex-Token=Token

If I double-click that batch file, Plex updates immediately. And NRecord.log shows that the batch files are seen, and are being run after a recording. But then nothing happens. The Plex library doesn't update. So the command in the file seems to be correct, but it fails when triggered by NextPVR. Here's the line in the log:

Code:
2018-08-04 18:00:01.870    [DEBUG][9]    Starting: C:\Users\Public\NPVR\Scripts\PostProcessing.bat "F:\Recordings\TV\Friends\Friends.S03E02.The.One.Where.No.Ones.Ready.ts" 1434 864 29 "Friends"

Any guesses what I'm doing wrong? I'm kind of sorry to ask, but I feel like I'm making a really obvious mistake that I'm just not noticing.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,671
Threads: 767
Joined: Nov 2003
#2
2018-08-05, 06:24 AM
You might need to update your batch file to redirect the curel.exe stdout and stderr to a log file, so you can check what's happening.
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 52,849
Threads: 954
Joined: May 2006
#3
2018-08-05, 02:47 PM
Since you are reluctant to post the IP I assume that Plex is not on localhost. In that case can Plex see your recordings on F: Drive?

Martin
antenna
Offline

Member

Posts: 61
Threads: 8
Joined: Oct 2017
#4
2018-08-05, 03:52 PM
mvallevand Wrote:Since you are reluctant to post the IP I assume that Plex is not on localhost. In that case can Plex see your recordings on F: Drive?

Apologies, I should have just included the IP info. The NextPVR box is at 192.168.2.112, and the Plex box is on 192.168.2.12. They're on the same subnet. The DVR folder is shared out (Windows 10) and allows anonymous access. The Plex box is running Ubuntu and I have the share mounted in /media. I can ssh into Ubuntu and do an ls on the mounted share and see all the recordings. When I do a manual update, it sees everything.

Re: curl, I'll redirect to a log file with more verbose info later today. Thank you!
antenna
Offline

Member

Posts: 61
Threads: 8
Joined: Oct 2017
#5
2018-08-05, 07:40 PM
On a whim, I downloaded the Win32 curl directly from https://curl.haxx.se/ (instead of using the version now built into Windows 10) to see if it handled it differently. Go figure, it worked immediately on the first try. I don't know if this was a permissions issue between the service that triggers the batch script and the built-in curl, or something else. But this workaround fixed it, so I'm happily not going to troubleshoot any further. Thanks for your replies!
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  HDHomerun recording bizzarely not working Jean0987654321 3 1,988 2021-03-27, 03:23 PM
Last Post: Jean0987654321
  Channels/PIP popups not working 4.2.5 (191014) eastavin 7 2,728 2020-04-20, 03:20 AM
Last Post: eastavin
  Absolute Newbie OTA EPG not working as expected. n8lbv 4 2,553 2020-04-02, 06:03 PM
Last Post: mvallevand
  Live TV not working jresnick 21 9,958 2020-01-04, 06:26 PM
Last Post: BrettB
  postprocessing batch to escape special characters donbrew 3 1,702 2019-11-06, 11:29 PM
Last Post: JavaWiz
  PostProcessing.bat not executing MiyoshiSaki 13 4,560 2019-09-03, 10:36 PM
Last Post: sub
  Some Channels not working jasonwilliams 7 2,109 2019-08-01, 06:31 PM
Last Post: sub
  NextPVR has Stopped Working rgc101 0 1,116 2019-05-27, 11:24 PM
Last Post: rgc101
  Cancel button not working in web interface antenna 0 953 2019-05-20, 04:45 PM
Last Post: antenna
  Help Pls - Working fine on Server PC but not on other devices furball 14 3,444 2019-05-02, 09:44 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