NormSwarm 13 Posted March 18, 2023 Posted March 18, 2023 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.
softworkz 5066 Posted March 18, 2023 Posted March 18, 2023 (edited) 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 March 18, 2023 by softworkz 1
NormSwarm 13 Posted March 18, 2023 Author Posted March 18, 2023 (edited) 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 March 18, 2023 by NormSwarm
softworkz 5066 Posted March 18, 2023 Posted March 18, 2023 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. 1
Luke 42077 Posted March 19, 2023 Posted March 19, 2023 Actually I came across this requirement as well, and a SeriesProviderIds object has been added to SubtitleSearchReques in the upcoming 4.8 server release. 1 1
NormSwarm 13 Posted March 19, 2023 Author Posted March 19, 2023 @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 ?
Luke 42077 Posted March 19, 2023 Posted March 19, 2023 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. 1
NormSwarm 13 Posted March 19, 2023 Author Posted March 19, 2023 Until we have the new API, I've opened a PR for using my service in the Addic7ed plugin that use ILibraryManager as suggested by @softworkz https://github.com/MediaBrowser/Addic7ed/pull/6 1
Luke 42077 Posted March 19, 2023 Posted March 19, 2023 19 minutes ago, NormSwarm said: Until we have the new API, I've opened a PR for using my service in the Addic7ed plugin that use ILibraryManager as suggested by @softworkz https://github.com/MediaBrowser/Addic7ed/pull/6 I will check it out. Thanks !
NormSwarm 13 Posted March 25, 2023 Author Posted March 25, 2023 Thanks for your help guys ! Plugin released: 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now