Jump to content


Photo

NextPVR and the future


  • Please log in to reply
89 replies to this topic

#21 cayars OFFLINE  

cayars

    Advanced Member

  • Alpha Testers
  • 2721 posts
  • Local time: 07:18 PM

Posted 21 January 2019 - 07:17 AM

Got ya sub3.

 

Just for clarification I'm not concerned with some down time or blackout window for scheduling things.  While I do tend to schedule things all around the clock (weird schedule I have) I could certainly live with not doing any scheduling for an hour period.  What I worry about and have had problems with is stuff not recording properly that were already scheduled.  Emby will have 1 ID for the movie/show in it's DB but NextPVR has already updated that ID to something else and the recording never kicks off. A few minutes later Emby would have been updated because it's schedule would have run.  This is with about a 10 minute window from NextPVR finishing EPG updates to Emby starting (on average) them to leave a bit of cushion space which I've found is needed.  That's what I've seen before.

 

Anything that either of you could do to minimize this would be great.

 

I guess the architect/programmer in me just doesn't understand why you're essentially doing a complete remove/reload of data vs just updating/adding new records to the guide which wouldn't cause this problem.



#22 pünktchen OFFLINE  

pünktchen

    Advanced Member

  • Members
  • 1979 posts
  • Local time: 01:18 AM

Posted 21 January 2019 - 07:28 AM

@cayars so you are creating manual one time schedules at 4.00 AM?

#23 cayars OFFLINE  

cayars

    Advanced Member

  • Alpha Testers
  • 2721 posts
  • Local time: 07:18 PM

Posted 21 January 2019 - 07:55 AM

No what I'm saying is I can set something to record on channel 100 at 2am, 110 at 2:30, 848 at 3am.

I don't know if this would affect things or not but I have probably 200+ series setup that record around the clock as well.

Plus typically at least one TV watching live TV 24/7 in the house.  

 

Kind of screwy but everyone in the house has revolving work schedules so there is no "night time" or down time in my environment.  I pretty much have at least two tuners in use 24/7 up to around 10 during prime time.

 

I can certainly try it again and maybe I was to focused on this issue and testing it when I knew it was likely to not work.

 

Ideally, I'd love to use Emby completely for all Guide and scheduling and use NextPVR as the engine.  That was I'd get the benefit of all the Emby integrations including Gracenote data.  I got close using NextPVR with Emby using it as an IPTV source feeding it an M3U file but this didn't seem reliable and would leave tuners open in NextPVR. That's documented in this thread: https://emby.media/c...mb-tuner/page-1



#24 pünktchen OFFLINE  

pünktchen

    Advanced Member

  • Members
  • 1979 posts
  • Local time: 01:18 AM

Posted 21 January 2019 - 08:27 AM

The problem with different program id's only exists right at the time of creation of one time schedules. It has no affect to series schedules.

 

@sub3

If you want to create a trigger for Emby's guide refresh you have to create a get request:

http://localhost:8096/emby/ScheduledTasks?IsHidden=false&api_key=PERSONAL API KEY CREATED IN EMBY

This returns a json response like this:

[
  {
    "Name": "Refresh Guide",
    "State": "Idle",
    "Id": "9492d30c70f7f1bec3757c9d0a4feb45",
    "Triggers": [],
    "Description": "Downloads channel information from live tv services.",
    "Category": "Live TV",
    "IsHidden": false,
    "Key": "RefreshGuide"
  }
]

You have to search for "Refresh Guide" and with its "Id" create a post request:

http://localhost:8096/emby/ScheduledTasks/Running/ID OF THE REFRESH GUIDE TASK?api_key=PERSONAL API KEY CREATED IN EMBY

Edited by pünktchen, 21 January 2019 - 08:30 AM.


#25 cayars OFFLINE  

cayars

    Advanced Member

  • Alpha Testers
  • 2721 posts
  • Local time: 07:18 PM

Posted 21 January 2019 - 08:50 AM

 

The problem with different program id's only exists right at the time of creation of one time schedules. It has no affect to series schedules.

That's the way I tested by doing one time schedules.  I figured all the series would have to be setup from scratch so I wasn't going to do that while testing.

 

Curious how this would work. Maybe you could answer this.

 

Let's say I've got a series setup in Emby that records MASH episodes.  Lets also assume these are airing at 2am, 2:30am and 3am on Channel 100.

Now I have NextPVR setup to update the schedule at 2am.  It uses 5 EPG sources and finishes at 2:20.

I leave a 10 minute window and have Emby setup to pull this at 2:30am

Emby finishes at 2:45.

 

Are all 3 of those going to get recorded properly?  The IDs will be changing during those times, hence the question.

 

Thanks for the insight on this!


Edited by cayars, 21 January 2019 - 08:51 AM.


#26 pünktchen OFFLINE  

pünktchen

    Advanced Member

  • Members
  • 1979 posts
  • Local time: 01:18 AM

Posted 21 January 2019 - 09:07 AM

Curious how this would work. Maybe you could answer this.

 

Let's say I've got a series setup in Emby that records MASH episodes.  Lets also assume these are airing at 2am, 2:30am and 3am on Channel 100.

Now I have NextPVR setup to update the schedule at 2am.  It uses 5 EPG sources and finishes at 2:20.

I leave a 10 minute window and have Emby setup to pull this at 2:30am

Emby finishes at 2:45.

 

Are all 3 of those going to get recorded properly?  The IDs will be changing during those times, hence the question.

 

Thanks for the insight on this!

All 3 should record properly, because the series schedule created in Emby only tells the live tv backend what kind of series schedule the backend has to create:

what time, which days, which channels, what program name to search for.

The single schedules of the series are then created by the backend, not by Emby!



#27 SHSPVR OFFLINE  

SHSPVR

    Advanced Member

  • Members
  • 563 posts
  • Local time: 06:18 PM
  • LocationVinita, Oklahoma

Posted 21 January 2019 - 10:36 AM

No what I'm saying is I can set something to record on channel 100 at 2am, 110 at 2:30, 848 at 3am.

I don't know if this would affect things or not but I have probably 200+ series setup that record around the clock as well.

Plus typically at least one TV watching live TV 24/7 in the house.  

 

Kind of screwy but everyone in the house has revolving work schedules so there is no "night time" or down time in my environment.  I pretty much have at least two tuners in use 24/7 up to around 10 during prime time.

 

I can certainly try it again and maybe I was to focused on this issue and testing it when I knew it was likely to not work.

 

Ideally, I'd love to use Emby completely for all Guide and scheduling and use NextPVR as the engine.  That was I'd get the benefit of all the Emby integrations including Gracenote data.  I got close using NextPVR with Emby using it as an IPTV source feeding it an M3U file but this didn't seem reliable and would leave tuners open in NextPVR. That's documented in this thread: https://emby.media/c...mb-tuner/page-1

 

Being you talk about M3U what about Cast4ME being that base on NextPVR code?.



#28 sub3 OFFLINE  

sub3

    Advanced Member

  • Members
  • 260 posts
  • Local time: 11:18 AM
  • LocationNextPVR HQ (New Zealand)

Posted 21 January 2019 - 09:09 PM

What I worry about and have had problems with is stuff not recording properly that were already scheduled.  Emby will have 1 ID for the movie/show in it's DB but NextPVR has already updated that ID to something else and the recording never kicks off. 

That doesn't matter, and isn't something you'd need to worry about. It'd still record. Once it's scheduled, it's fine, and doesn't matter if the IDs change. (it was only a problem at scheduling time when Emby asked to record show ID 1234, and that wasn't an ID NextPVR knows about, and so it's never scheduled in the first place)

 

(there is some logic that'll fix up any recordings that have had show details change, like IDs, start/stop times etc, so the scheduled recordings will be kept up to date, and not something you need to worry about)


Edited by sub3, 21 January 2019 - 09:32 PM.


#29 sub3 OFFLINE  

sub3

    Advanced Member

  • Members
  • 260 posts
  • Local time: 11:18 AM
  • LocationNextPVR HQ (New Zealand)

Posted 21 January 2019 - 09:21 PM

I guess the architect/programmer in me just doesn't understand why you're essentially doing a complete remove/reload of data vs just updating/adding new records to the guide which wouldn't cause this problem.

 

I do it because it's substantially less work for the machine, and a lot quicker. Some people have a quarter of a million listings in their database. Most EPG sources don't have any unique identifier to identify the existing show, other than some combination of show name / time / channel. Any of those listings could have changed, including those identifying attributes like show name / time, or shows could have been removed, so it's lot of work to lookup the existing data and compare to find which ones need inserts/updates/deletes etc. It's a hell of a lot quicker to just delete everything and do a bulk insert of the current data.


Edited by sub3, 21 January 2019 - 09:27 PM.


#30 sub3 OFFLINE  

sub3

    Advanced Member

  • Members
  • 260 posts
  • Local time: 11:18 AM
  • LocationNextPVR HQ (New Zealand)

Posted 21 January 2019 - 09:30 PM

 

The problem with different program id's only exists right at the time of creation of one time schedules. It has no affect to series schedules.

 

@sub3

If you want to create a trigger for Emby's guide refresh you have to create a get request:

http://localhost:8096/emby/ScheduledTasks?IsHidden=false&api_key=PERSONAL API KEY CREATED IN EMBY

This returns a json response like this:

[
  {
    "Name": "Refresh Guide",
    "State": "Idle",
    "Id": "9492d30c70f7f1bec3757c9d0a4feb45",
    "Triggers": [],
    "Description": "Downloads channel information from live tv services.",
    "Category": "Live TV",
    "IsHidden": false,
    "Key": "RefreshGuide"
  }
]

You have to search for "Refresh Guide" and with its "Id" create a post request:

http://localhost:8096/emby/ScheduledTasks/Running/ID OF THE REFRESH GUIDE TASK?api_key=PERSONAL API KEY CREATED IN EMBY

Good info. Is there any equivalent of a more immediate execution of a task? or can I create a task with for the current time, and expect it to run immediately?



#31 pünktchen OFFLINE  

pünktchen

    Advanced Member

  • Members
  • 1979 posts
  • Local time: 01:18 AM

Posted 21 January 2019 - 11:41 PM

Good info. Is there any equivalent of a more immediate execution of a task? or can I create a task with for the current time, and expect it to run immediately?

The post request excecutes the task immediately. If you mean only one request for all, no that's not possible right now. But maybe @Luke can create an api endpoint to excecute a task by name instead of the id.

#32 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 124603 posts
  • Local time: 07:18 PM

Posted 22 January 2019 - 01:21 AM

Sure, we could do something like /LiveTV/Guide/Refresh



#33 cayars OFFLINE  

cayars

    Advanced Member

  • Alpha Testers
  • 2721 posts
  • Local time: 07:18 PM

Posted 22 January 2019 - 06:09 PM

Thank you guys for those thorough explanations. It definitely helps a lot because it seems my testing was all "worst case" manually specifying recordings when the two systems could have been at odds with the refresh taking place. 

 

In the real world this isn't going to be a problem!



#34 emveepee OFFLINE  

emveepee

    Advanced Member

  • Members
  • 114 posts
  • Local time: 07:18 PM

Posted 23 March 2019 - 01:02 PM

How much interest is there in a plugin for NextPVR when v5 comes out?  I am happy to do the port, but I want to make sure there are going to be users for it.

 

Whether not the addon will be compatible with v4 remains to be seen, I expect as a minimum v4 users will need to be current or they will have to upgrade.  I don't want to riddle the current code with if statements.

 

Martin


Edited by emveepee, 23 March 2019 - 01:02 PM.

  • JAJ and cayars like this

#35 cayars OFFLINE  

cayars

    Advanced Member

  • Alpha Testers
  • 2721 posts
  • Local time: 07:18 PM

Posted 23 March 2019 - 02:44 PM

You could just switch the code.  The AFAIK is the choice of API that was used.  The API used by the current Emby plugin isn't going to be supported moving forward with Next PVR.

 

I'd be interested in the plugin.



#36 arrbee99 ONLINE  

arrbee99

    Advanced Member

  • Members
  • 2545 posts
  • Local time: 11:18 AM
  • LocationNew Zealand

Posted 23 March 2019 - 04:22 PM

Definitely also interested.

 

Just as a user unfortunately, don't know nowt about coding...


  • rikiwi likes this

#37 rikiwi ONLINE  

rikiwi

    Advanced Member

  • Members
  • 357 posts
  • Local time: 11:18 AM
  • LocationNew Zealand

Posted 23 March 2019 - 04:45 PM

Definitely also interested.

Just as a user unfortunately, don't know nowt about coding...

Me too.

Sent from my SM-G950F using Tapatalk

#38 emveepee OFFLINE  

emveepee

    Advanced Member

  • Members
  • 114 posts
  • Local time: 07:18 PM

Posted 23 March 2019 - 05:01 PM

You could just switch the code.  The AFAIK is the choice of API that was used.  The API used by the current Emby plugin isn't going to be supported moving forward with Next PVR.

 

I'd be interested in the plugin.

 

Are you saying that Emby is dropping support for NextPVR as in integrated plugin and users will have to suffer with the problems of using the m3u interface to NextPVR?  If so I certainly don't want to waste my time.

 

I probably am misreading since you probably mean the NextPVR API is changing which is obviously the change that I am planning to make.

 

Martin


Edited by emveepee, 23 March 2019 - 05:30 PM.


#39 arrbee99 ONLINE  

arrbee99

    Advanced Member

  • Members
  • 2545 posts
  • Local time: 11:18 AM
  • LocationNew Zealand

Posted 23 March 2019 - 05:24 PM

Personally, am hoping post #2 applies, which sounds like Emby will use NextPVR if someone will kindly contribute a plugin. Maybe there could there be two plugins, at least for a while, depending on which version of NPVR you have.



#40 emveepee OFFLINE  

emveepee

    Advanced Member

  • Members
  • 114 posts
  • Local time: 07:18 PM

Posted 23 March 2019 - 05:48 PM

Personally, am hoping post #2 applies, which sounds like Emby will use NextPVR if someone will kindly contribute a plugin. Maybe there could there be two plugins, at least for a while, depending on which version of NPVR you have.

 

Changing to sub's API will not be a huge undertaking although it may involve some changes from what exists in v5 today, it it too early to say.  I am also really hoping that sub backports the required changes to v4 but I have asked for some small changes for Kodi and he wasn't willing to do that so 2 plugins may be possible.

 

As an example sub's v4 EPG call is limited and there are some useful v5 fields the Emby plugin even doesn't currently use (Season#, Episode#, Movie Year, Significance (Season/Series Premier/Finale)) which I would like to see in v4 but the importance depends if Emby supports these fields, it has been a long time since I looked at this plugin.

 

Right now the original air date and star ratings will also be lost in v5

 

Martin


Edited by emveepee, 23 March 2019 - 06:06 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users