Jump to content


Photo

New plugin for NextPVR


  • Please log in to reply
106 replies to this topic

#101 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 136081 posts
  • Local time: 07:57 AM

Posted 24 July 2019 - 01:50 PM

Just the series part.



#102 emveepee OFFLINE  

emveepee

    Advanced Member

  • Members
  • 262 posts
  • Local time: 07:57 AM

Posted 27 July 2019 - 04:53 PM

Unfortunately sub does not want to provide the field with the zap2it id via his api.  Can I provide a custom provider,  could I provide just the series name as the ID if the data has season/episode information?  I understand for some shows with new casts and years or different countries (Shameless, Love Island) it will be a small issue.

 

Martin



#103 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 136081 posts
  • Local time: 07:57 AM

Posted 27 July 2019 - 05:08 PM

When i tried to match by name before, there was enough troubleshooting related to incorrect that i had to remove it to make it go away. some from our very own @arrbee99 if i recall.

 

So i don't want to go back to that, however, in theory, you could do something like this.

 

Give it some proprietary provider id value, 

program.SeriesProviderIds["nextPvrSeriesId"] = id; 

Make sure this is some kind of id-like value, and not a name. if you want to base it on the name, then hash it first.

 

Then you could write a series provider and attach the same to the series object in their library:

using MediaBrowser.Common.Configuration;
using MediaBrowser.Common.Net;
using MediaBrowser.Controller.Configuration;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Configuration;
using MediaBrowser.Model.Entities;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Logging;
using MediaBrowser.Model.Net;
using MediaBrowser.Model.Providers;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.Serialization;

namespace NextPvr
{	public class NextPvrSeriesProvider : IRemoteMetadataProvider<Series, SeriesInfo>
    {
        public NextPvrSeriesProvider()
        {
            
        }

        public async Task<IEnumerable<RemoteSearchResult>> GetSearchResults(SeriesInfo searchInfo, CancellationToken cancellationToken)
        {
            return Array.Empty<RemoteSearchResult>();
        }

        public async Task<MetadataResult<Series>> GetMetadata(SeriesInfo itemId, CancellationToken cancellationToken)
        {
            var result = new MetadataResult<Series>();

            result.Item = new Series();
            result.HasMetadata = true;
			
			result.Item.ProviderIds["nextPvrSeriesId"] = id; 

            return result;
        }

        public string Name
        {
            get { return "Next PVR Series"; }
        }

        public Task<HttpResponseInfo> GetImageResponse(string url, CancellationToken cancellationToken)
        {
            throw new NotImplementedException();
        }
    }
}

I just whipped that up, it might not compile.



#104 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 136081 posts
  • Local time: 07:57 AM

Posted 27 July 2019 - 05:09 PM

The only thing with that approach is the user will have to enable the series provider in their library settings.



#105 arrbee99 OFFLINE  

arrbee99

    Advanced Member

  • Members
  • 2888 posts
  • Local time: 11:57 PM
  • LocationNew Zealand

Posted 27 July 2019 - 05:34 PM

Could someone possibly briefly explain the object of the exercise, preferably using really small words ? Doesn't NPVR provide info and art about programs which you access at the moment, or is this something completely different ?



#106 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 136081 posts
  • Local time: 07:57 AM

Posted 27 July 2019 - 05:34 PM

I personally wouldn't do the series provider though. Users will have to enable it, then refresh metadata on series. It will be somewhat manual.

 

If you don't want to provide zap2it, why not provide the moviedb or tvdb id's instead? Doesn't next pvr do lookups with them?



#107 emveepee OFFLINE  

emveepee

    Advanced Member

  • Members
  • 262 posts
  • Local time: 07:57 AM

Posted 27 July 2019 - 05:49 PM

@arrbee99 the reason I want to do this is for users who have rich guide data (unfortunately not you) to be able to view upcoming shows in a series.  I haven't seen it but I use this feature on the zap2it website.

 

@Luke, sub doesn't store the standard id's, only the zap2it ID would be possible for SD or zap2xml users.  The NextPVR  storage key for metadata is the title once there's a hit that is what is retrieved.  It can be changed by the user if the autodetection was off.   Unfortunately there is no way to retrieve image by this key since it is more persistent then the episode id for guide data art.

 

Martin


Edited by emveepee, 27 July 2019 - 05:57 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users