NextPVR Forums
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public NextPVR Support Other Clients v
« Previous 1 2 3 Next »
Jellyfin - Automate EPG updates

 
  • 0 Vote(s) - 0 Average
Jellyfin - Automate EPG updates
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 45,309
Threads: 865
Joined: May 2006
#1
2020-10-29, 02:35 PM (This post was last modified: 2021-12-16, 03:02 PM by mvallevand.)
I have attached a simple program that will allow you to trigger a jellyfin EPG update after NextPVR's EPG update has finished.  Using this approach you don't have to rely on a scheduled "Refresh Guide" task and it probably can be disabled.  Alternatively JellyRoll will check and if you have the Refresh Guide task scheduled in the upcoming 15 minutes JellyRoll won't trigger an update.  Boths update should be sheduled in off hours, the jellyfin update can be long.

To install, unzip the file into NextPVR's program directory  typically "C:\Program Files\NextPVR" or /opt/system/nextpvr  or /apps on Docker

To run you will to create an API key which is easily available using the jellyfin dashboard.

The  following lines need to be added into PostUpdateEPG.bat

Code:
C:
cd "C:\Program Files\NextPVR"
JellyRoll.exe APIKEY   {IP} {port}

or on linux PostUpdateEPG.sh (remember to chmod +x)

Code:
cd /opt/nextpvr/system
/opt/dotnet/dotnet JellyRoll.dll APIKEY {IP} {port}

On Docker your might need to unzip into /config and then copy them into /app from bash

Code:
cd /app
dotnet JellyRoll.dll APIKEY {IP} {port}

IP and port are optional on localhost and with default port 8096


Martin


Attached Files
.zip   JellyRoll.zip (Size: 79.31 KB / Downloads: 22)
herrep
Offline

Junior Member

Germany
Posts: 20
Threads: 3
Joined: May 2020
#2
2021-06-01, 12:44 PM (This post was last modified: 2021-06-01, 01:03 PM by herrep.)
Hi,



Thank you very much for providing the JellyRoll tool which I installed on my media server under Debian where NextPVR and Emby is located.

At first, I realized that JellyRoll expects the NextPVR data directory to be located below the user's home directory in ~/.NextPVR-data or even at /.NextPVR-data. As NextPVR located the data directory at /var/opt/nextpvr, I created a symbolic link first so that JellyRoll can access the correct data directory:

ln -s /var/opt/nextpvr /.NextPVR-data


I understood that JellyRoll needs to be triggered after an EPG update at NextPVR. Therefore, I placed the following commands into the file /var/opt/nextpvr/scripts/PostUpdateEPG.sh:



cd /opt/nextpvr/system
/opt/dotnet/dotnet /opt/nextpvr/system/JellyRoll.dll <myApiKey>

I ran the following commands:
sudo chown nextpvr /var/opt/nextpvr/scripts/PostUpdateEPG.sh
sudo chmod +x /var/opt/nextpvr/scripts/PostUpdateEPG.sh

Manual execution for test purposes:
sudo -u nextpvr /var/opt/nextpvr/scripts/PostUpdateEPG.sh

Output:
jellyroll:1.0.0.0
IntervalTrigger

However, I am not aware what I need to do inside the Emby backend so that the EPG update arrives at the right place. Of course, I created the API Key for JellyRoll, but Emby Live TV Backend still shows that my channels do not have an assigned EPG data source.

At the moment, I am a bit lost as how to continue. Thanks a lot for your explanations.


Best regards,

Peter
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 45,309
Threads: 865
Joined: May 2006
#3
2021-06-01, 12:51 PM
If you the install this according to the directions in PostUpdateEpg.sh it runs every time after the EPG is updated with the proper environment variables that the service uses. Why would you need to do this as a cron job?

Martin
herrep
Offline

Junior Member

Germany
Posts: 20
Threads: 3
Joined: May 2020
#4
2021-06-01, 01:34 PM
(2021-06-01, 12:51 PM).mvallevand Wrote: If you the install this according to the directions in PostUpdateEpg.sh it runs every time after the EPG is updated with the proper environment variables that the service uses.  Why would you need to do this as a cron job?

Martin

Sorry! I had some misunderstandings and updated my Reply #2 accordingly. I have placed now the scripts at the foreseen place. As you see in my updated reply, JellyRoll seems to be regularly executed, but I do not know which further steps are required on the Emby side that the EPG data are displayed there. When I open LiveTV, the EPG is still empty, even after a restart of both the NextPVR and Emby Server.

I have Emby Server 4.6.1.0 in combination with NextPVR 5.1.1.210329 and the NextPVR Plugin 3.3.3.0. Should it work under this constellation?

When I open the Emby Backend and go to Live TV > Channels, I see all my channels, but there is still a remark that no EPG is assigned to any of the channels. I this correct or needs anything further to be done? 

Thanks a lot for your explanations.

Best regards,
Peter
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 45,309
Threads: 865
Joined: May 2006
#5
2021-06-01, 01:55 PM
If you don't run the test from within NextPVR with a manual Update EPG update and just want to test the trigger you should run

NEXTPVR_DATADIR_USERDATA=/var/opt/nextpvr/ sudo -u nextpvr /var/opt/nextpvr/scripts/PostUpdateEPG.sh

Then zip and upload jellyroll.log from the /var/opt/nextpvr/logs and I can see what is going on.

Martin
herrep
Offline

Junior Member

Germany
Posts: 20
Threads: 3
Joined: May 2020
#6
2021-06-01, 02:02 PM
The log file is pretty compact:


Quote:[...startup]
2021-06-01 14:52:44.517 [DEBUG][1] jellyroll:1.0.0.0
2021-06-01 14:52:44.518 [DEBUG][1] http://localhost:8096/emby/ScheduledTask...key=hidden
2021-06-01 14:52:44.518 [DEBUG][1] Getting tasks
2021-06-01 14:52:44.632 [DEBUG][1] Found tasks
2021-06-01 14:52:44.841 [DEBUG][1] Refresh guide starting
2021-06-01 14:52:44.851 [DEBUG][1] Refresh guide activated
2021-06-01 14:52:44.851 [DEBUG][1] Exit
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 45,309
Threads: 865
Joined: May 2006
#7
2021-06-01, 02:18 PM (This post was last modified: 2021-06-01, 02:21 PM by mvallevand.)
That perfect and shows it is working, so this becomes a support post on the Emby forum with Emby logs. I wanted to make sure the proper steps were done first.

Keep it separate from your other post since this has nothing to do with OTA data from Emby tuners this triggers and update of the NextPVR plugin.

Martin
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Jellyfin with NextPVR 5.1.1 mvallevand 5 3,156 2021-12-19, 01:41 AM
Last Post: sub
  Kodi 19 client constantly asking for updates from server PapaJay 2 749 2021-03-21, 06:54 PM
Last Post: sub
  Jellyfin Users mvallevand 115 23,823 2021-02-26, 06:08 PM
Last Post: mvallevand
  Jellyfin recording with NPVR plugin VCR58 4 1,798 2020-10-11, 08:09 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