Jump to content

Demand loading


Damstas

Recommended Posts

Damstas

Does NPVR plugin use demand loading?

According to NPVR dev, this API should do it: /service?method=channel.show.artwork&event_id=x and /service?method=channel.show.artwork&recording_id=x 

Link to comment
Share on other sites

Damstas

No...

Is it possible to make the plugin use it? Now artwork is only comes through if it's manually pressed on shows. Demand loading would allow it to automatically get the artwork, without having to press them.

Edited by Damstas
Link to comment
Share on other sites

Damstas

As of today 25th of April, NextPVR downloads artwork automatically from Schedules Direct. It would be very welcome addition that Emby would get these artworks without manually pressing on them.

 

EDIT: Here you can see. It doesn't load the image from NPVR, unless I click it in NPVR and manually refresh guide data. 

post-14107-0-79282900-1429972886_thumb.png

Edited by Damstas
Link to comment
Share on other sites

Damstas

We need to check that...

Sure thing and thanks if it's possible of making it to automatically get new data, without interacting with NPVR. Upcoming programs and Whats On sections, etc :)

I don't know how but WMCPlugin does it automatically with WMC.

Edited by Damstas
Link to comment
Share on other sites

  • 5 months later...

@@Luke

 

Why do we need on demand loading?

{
        "epgEventJSONObject": {
          "epgEvent": {
            "OID": 1026790,
            "UniqueId": "EP019576350015",
            "ChannelOid": 7162,
            "FormattedChannelNumber": "17",
            "ChannelName": "Iskelmä/Harju&Pöntinen",
            "StartTime": "2015-08-27T19:50:00Z",
            "EndTime": "2015-08-27T20:50:00Z",
            "Title": "Silta",
            "Subtitle": "",
            "Desc": "Neljän ekoterroristin uusi ryhmä julkaisee netissä videon, ja Saga yrittää saada tietoja juuri heränneeltä, muistinsa menettäneeltä todistajalta.",
            "Rating": "",
            "Quality": "HDTV",
            "StarRating": "",
            "Aspect": "",
            "Audio": "",
            "Season": 2,
            "Episode": 5,
            "OriginalAirdate": "2013-10-20T00:00:00",
            "FanArt": "public/download.aspx?rid=_wEC9f___w8*&path=_wEFKkM6XFVzZXJzXFB1YmxpY1xOUFZSXE1lZGlhXFNob3dzXFNpbHRhLmpwZw**&mode=1",
            "Genres": [
              "Crime drama"
            ],
            "FirstRun": false,
            "HasSchedule": true,
            "ScheduleIsRecurring": false,
            "ScheduleHasConflict": false
          }
}

And when we get the programs we do the following....

ImageUrl = string.IsNullOrEmpty(epg.FanArt) ? null : (_baseUrl + "/" + epg.FanArt),
HasImage = !string.IsNullOrEmpty(epg.FanArt),

So this should work no? Or am i missing something in the implementation to get the fanart?

​This is the implementation on the plugin itself..

        public Task<ImageStream> GetProgramImageAsync(string programId, string channelId, CancellationToken cancellationToken)
        {
            // Leave as is. This is handled by supplying image url to ProgramInfo
            throw new NotImplementedException();
        }
Link to comment
Share on other sites

But he gets the fanart only when he clicks on the item. So not when we get the Programs information....

What could be wrong? I don't have any fanart on my system, so i can't test it myself 

Link to comment
Share on other sites

arrbee99

Just wondering if anyone thinks this would work at some point in New Zealand. Don't think we get Schedules Direct here, but I do get an OTA schedule via DVB-S (I presume that's were it comes from). Thanks.

Link to comment
Share on other sites

But he gets the fanart only when he clicks on the item. So not when we get the Programs information....

What could be wrong? I don't have any fanart on my system, so i can't test it myself 

Yeah, I get it only when I press the item in NPVR and refresh the guide data. Sub once said this would work: The /service?method=channel.show.artwork&event_id=x and /service?method=channel.show.artwork&recording_id=x will demand load artwork. "

Link to comment
Share on other sites

That's for seperate calls, but we should get the information also with the other option...

Aah ok, but basically the only way right now is to individually click each and every show in the NPVR software and then do a guide refresh. It doesn't populate the images (from NPVR), like Emby does with movies (from TMDB).

Link to comment
Share on other sites

This method isn't able to demand load artwork. It only retrieves artwork that is already present.

 

I'm talking with UBJ (the author of NEWA), about updating this mechanism to handle demand loading artwork.

Edited by sub3
Link to comment
Share on other sites

This method isn't able to demand load artwork. It only retrieves artwork that is already present.

 

I'm talking with UBJ (the author of NEWA), about updating this mechanism to handle demand loading artwork.

 

So then it wil work like in this post?

Link to comment
Share on other sites

That current URL will only currently download artwork already on the machine. I'm talking with UJB about changing the epgEvent to always have a URL specified, and for that URL to support demand loading (ie, looking up the artwork from the internet if we don't have it already).

 

We already have other URLs that do this, as used by Kodi, but it'd be nice for Emby to be able to do that too. If it all goes smoothly, nothing will need to be changed in Emby.

Edited by sub3
Link to comment
Share on other sites

emveepee

Seems like overkill to post the url to sub's api in returned json, when all the values are known to populate what the OP wrote.

 

 

    Url = string.Format("{0}/service?method=recording.artwork&sid={1}&recording_id={2}", baseUrl,Sid,recordingId);

 

or for guide

 

    Url = string.Format("{0}/service?method=channel.show.artwork&sid={1}&event_id={2}", baseUrl,Sid,info.ProgramId);

 

 

Martin

Edited by emveepee
Link to comment
Share on other sites

Seems like overkill to post the url to sub's api in returned json, when all the values are known to populate what the OP wrote.

 

 

    Url = string.Format("{0}/service?method=recording.artwork&sid={1}&recording_id={2}", baseUrl,Sid,recordingId);

 

or for guide

 

    Url = string.Format("{0}/service?method=channel.show.artwork&sid={1}&event_id={2}", baseUrl,Sid,info.ProgramId);

 

 

Martin

That's pretty much what we're doing. ie changing the NEWA epg api to specify these other URLs capable of doing the demand loading, so that we didn't need any changes in Emby to get this working.

Edited by sub3
Link to comment
Share on other sites

emveepee

I really hope the url isn't embedded in the EPG data, it is already too much data for lessor machines storing the sid seems like a bad idea. Still demand based dynamically created url's seem smarter.

 

Another issue is I hope that user that don't have metadata downloading enabled (like me) can still use url will still return local saved art.

 

Martin

Link to comment
Share on other sites

UncleJohnsBand

I really hope the url isn't embedded in the EPG data, it is already too much data for lessor machines storing the sid seems like a bad idea. Still demand based dynamically created url's seem smarter. Another issue is I hope that user that don't have metadata downloading enabled (like me) can still use url will still return local saved art. Martin

 

The intent will be that the value in the property of the epgevent object for fanArt would be replaced with a working url.  I need to discuss some things with sub to see if we can get this working.

Edited by UncleJohnsBand
Link to comment
Share on other sites

emveepee

Surely anyone developing for the JSON api doesn't need this built server-side. Sub builds it in the Kodi client.

 

Martin

Link to comment
Share on other sites

UncleJohnsBand

Surely anyone developing for the JSON api doesn't need this built server-side. Sub builds it in the Kodi client. Martin

 

Probably true.... but if it is a simple thing on my end...then nothing changes in emby and it shifts to the on-demand model without any effort and any other client using the NEWA JSON API would benefit from the change as well.

Link to comment
Share on other sites

emveepee

My client won't benefit loading the EPG guide through JSON is significantly slower than sub's interface and adding to it won't help. Including the sid means I can't even cache it.

 

Martin

Link to comment
Share on other sites

Surely anyone developing for the JSON api doesn't need this built server-side. Sub builds it in the Kodi client. Martin

The JSON api already has this artwork URL, and Emby is already using it if present. The current URL can't dynamically download the artwork. We're going to change the URL to a different one, capable of dynamically downloading the artwork (and always include it).

 

In theory the change could also have been made in Emby addon instead, but no one on the Emby side seemed interested in making that change, so we're making the change in NextPVR instead.

Edited by sub3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...