NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Docker arm32v7 v
1 2 Next »
EPG Update on start up

 
  • 0 Vote(s) - 0 Average
EPG Update on start up
thecubasekid
Offline

Member

UK
Posts: 72
Threads: 12
Joined: Apr 2020
#1
2021-02-15, 12:05 PM (This post was last modified: 2021-02-15, 12:34 PM by thecubasekid.)
Hi Folks,

i am running nextpvr in a docker install using latest image from December, and power my box using usb from my TV, so the box is only on when the TV is on. this leads to no EPG often when i turn on, and i need to manually update or wait for the next scheduled epg update run.

is it possible to force epg to update (xml url for iptv channels) when nextpvr starts using poststartup.sh and placing in the scripts folder?

if yes, what would i need to put in that file?

fyi i am using matrix RC running in CoreElec, and from what i read when EPG updates in NextPVR, it forces Kodi to update from NextPvr, and this is new for Matrix, so hoping a simple script to update on start will have my EPG populated well in an automated fashion shortly after the box is up and running....


Thanks
Graham
Offline

Posting Freak

UK
Posts: 4,058
Threads: 102
Joined: Dec 2005
#2
2021-02-15, 02:13 PM (This post was last modified: 2021-02-15, 02:13 PM by Graham.)
(2021-02-15, 12:05 PM)thecubasekid Wrote: is it possible to force epg to update (xml url for iptv channels) when nextpvr  starts using poststartup.sh and placing in the scripts folder?

nscripthelper can be use dto update the EPG ... https://github.com/sub3/NextPVR/wiki/nscripthelper

I am not sure what happens if you run it in poststartup.sh ... i would expect that it works ok ... you could try and post to tell us what happens ... or you could create a script to run nscripthelper before NextPVR Server starts.
thecubasekid
Offline

Member

UK
Posts: 72
Threads: 12
Joined: Apr 2020
#3
2021-02-15, 03:05 PM (This post was last modified: 2021-02-15, 03:11 PM by thecubasekid.)
Thanks for the reply,

i took a look at the page you suggested, but it seems to be aimed at windows, and the example certainly appears to be for a windows install (i found easy way to do it in widows with poststartup.bat in the script folder, but that just had windows command to run the exe with a flag. i think poststartup.sh maybe linux equivalent but need to know what the command in linux would be to update the EPG, so i could test it out in that file) i am running a docker image so it is a Linux install, and on the page it just shows Linux as TBA. i didn't think you could call nscripthelper.dll in Linux as i thought .dll were just for windows...
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,088
Threads: 957
Joined: May 2006
#4
2021-02-15, 03:12 PM (This post was last modified: 2021-02-15, 03:26 PM by mvallevand.)
First I'd be worried about corrupting the npvr.db3 file with your solution, it feels too risky so make sure you backup a few generations. Hopefully the load isn't too long.

Basically the PostStartup.sh is in the config/scripts folder remember to chmod +x the script. What you would need is

cd /apps
dotnet nscripthelper.dll -updateepg

Remember to do the linux fix, the one at the bottom of this page is easier than the one I have been posting, it is fixed in the upcoming 5.1.1 release.

https://forums.nextpvr.com/showthread.ph...#pid553116

Martin
Graham
Offline

Posting Freak

UK
Posts: 4,058
Threads: 102
Joined: Dec 2005
#5
2021-02-15, 03:28 PM
(2021-02-15, 03:05 PM)thecubasekid Wrote: i didn't think you could call nscripthelper.dll in Linux as i thought .dll were just for windows...

.Net Core & Linux ... https://dotnet.microsoft.com/download/do...nt/runtime ... And click on ... Linux ... Ignore references to "Server"
thecubasekid
Offline

Member

UK
Posts: 72
Threads: 12
Joined: Apr 2020
#6
2021-02-15, 03:56 PM (This post was last modified: 2021-02-15, 04:48 PM by thecubasekid.)
thanks for the advice,

i ran the linux fix, then set my poststart.sh file, but it doesnt seem to be working. in npvr logs i see the below lines..

Starting: bash -c "'/config/scripts/PostStartup.sh' "
2021-02-15 15:51:35.627 [DEBUG][5] > bash: /config/scripts/PostStartup.sh: /bin/sh^M: bad interpreter: No such file or directory
2021-02-15 15:51:35.629 [DEBUG][9] /config/scripts/PostStartup.sh has exited

in my poststart.sh i have

#!/bin/sh
#epg update
$cd /apps
$dotnet nscripthelper.dll -updateepg

did i make some mistakes with my syntax?

Thanks!

***Update***
after mssing about some more with this, i think the issue is with the linux 'fix' as even after running dotnet nscripthelper.dll -updateepg after getting in to docker apps# it still fails with error suggesting i need to download .net.

root@3099dfa629ca:/app# dotnet nscripthelper.dll -updateepg
It was not possible to find any installed .NET Core SDKs
Did you mean to run .NET Core SDK commands? Install a .NET Core SDK from:
https://aka.ms/dotnet-download
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,088
Threads: 957
Joined: May 2006
#7
2021-02-15, 04:58 PM
Yes you should'nt create linux bash scripts in Windows notepad. Use an editor that doesn't add the linefeed. Visual Studio Code and Notepad++

Martin
thecubasekid
Offline

Member

UK
Posts: 72
Threads: 12
Joined: Apr 2020
#8
2021-02-15, 05:29 PM (This post was last modified: 2021-02-15, 05:29 PM by thecubasekid.)
Thanks Martin

i created the script fresh using notepad++ but still same result / error on npvr logs.

i think the issue is with using the dotnet command. it doesn't work direct in ssh after getting in to docker to run commands, i guess it needs to be working there before i can put it in a script.

maybe i will leave it and try again when 5.1.1 lands with the linux fix built in...

thanks for your help!
mvallevand
Online

Posting Freak

Ontario Canada
Posts: 53,088
Threads: 957
Joined: May 2006
#9
2021-02-15, 05:42 PM
dotnet is in the path in docker, that original problem was definitely a LF issue. Did you tell Notepad++ to use CR only or create a linux compatible file?

Martin
thecubasekid
Offline

Member

UK
Posts: 72
Threads: 12
Joined: Apr 2020
#10
2021-02-15, 05:55 PM
not sure, i don't really know linux, i created an empty file then added the lines in with notepad++ and saved.

if i ssh in to the box, then run docker exec -it [my container ID] /bin/bash so i get root@3099dfa629ca:/apps at the prompt, running the below from the ssh window (i use putty) fails with below error

It was not possible to find any installed .NET Core SDKs
Did you mean to run .NET Core SDK commands? Install a .NET Core SDK from:
https://aka.ms/dotnet-download
« 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
  Update arm32v7 image on Docker Hub GlowTube 6 1,062 2025-03-19, 05:02 PM
Last Post: calande
  Update EPG on Startup HioWerBji 6 3,203 2020-10-31, 07:52 PM
Last Post: HioWerBji
  Not working after update joshskey 19 7,908 2019-09-16, 11:31 PM
Last Post: KyleC_USA

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

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

Linear Mode
Threaded Mode