Jump to content

Getting provider ids of a Serie in ISubtitleProvider


NormSwarm

Recommended Posts

NormSwarm

Hello,

On a SubtitleSearchRequest we can get the ProviderIds of the episode, that's great. But I can't find a way to get the same for the Serie.

Could the SubtitleSearchRequest also contains the ProviderIds of the serie it comes from ?

I'm rewritting the Addicted subtitle plugin to use my service: https://www.gestdown.info/Api and I need to get the tvdbId of the Serie not the one of the episode.

 

Link to comment
Share on other sites

You can use ILibraryManager and call GetItems. In the query (InternalItemsQuery), specify the series name and for IncludeITemTypes, specify 'series'. This way, you should get the series item.

This returns a collection of BaseItem and you can the get the provider ids from the ProviderIds property.

Edited by softworkz
  • Thanks 1
Link to comment
Share on other sites

NormSwarm

Thanks, done exactly that, it works.

Quick question though, how does it work when you have two Series with the same name ? How to know which one is the right one ?
Like The Office where we have US and UK version.

Or Doctor Who, etc ... would that give the wrong series if the users have both in their library ?

If we would have the SeriesItemId inside the SubtitleRequest, that would solve this.

Edited by NormSwarm
Link to comment
Share on other sites

19 minutes ago, NormSwarm said:

Quick question though, how does it work when you have two Series with the same name ? How to know which one is the right one ?
Like The Office where we have US and UK version.

There's no elegant solution for this. When you get more than one series from GetItems, you only can lookup the season and the episode in the season and see where the episode name is the same.

The SubtitleSearchRequest gives you the episode number as IndexNumber and the season number as ParentIndexNumber.

  • Agree 1
Link to comment
Share on other sites

Actually I came across this requirement as well, and a SeriesProviderIds object has been added to SubtitleSearchReques in the upcoming 4.8 server release. 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

NormSwarm

@Lukethat's great to hear!

I'm already running 4.8 beta, is it available in it ?

Is the public lib already updated with it ?

Link to comment
Share on other sites

2 minutes ago, NormSwarm said:

@Lukethat's great to hear!

I'm already running 4.8 beta, is it available in it ?

Is the public lib already updated with it ?

Not yet but soon.

  • Thanks 1
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...