Jump to content


Photo

Accessing existing Series Metadata from within IRemoteMetadataProvider<Season, SeasonInfo>

IRemoteMetadataProvider

Best Answer Luke , 15 October 2019 - 05:43 PM

Ok, i can add SeriesName to SeasonInfo for the next release. Thanks.

Go to the full post


  • Please log in to reply
11 replies to this topic

#1 Tobi Uchiha OFFLINE  

Tobi Uchiha

    Newbie

  • Members
  • 7 posts
  • Local time: 04:49 AM

Posted 13 October 2019 - 07:40 AM

Hello,

 

I was wondering how I would access existing Series Metadata from within a class that implements  IRemoteMetadataProvider<Season, SeasonInfo>.

I need the series name in order to search for related seasons.

I can get the Series Id from info.SeriesProviderIds, but to get the name I would have to once again query the API, which is unneeded, since the series metadata is already present at the time the RemoteMetadataProvider of the Season is called.

Is there any Metadata store i can query or something of the likes?

 

Thanks in advance!



#2 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139859 posts
  • Local time: 10:49 PM

Posted 13 October 2019 - 08:23 PM

Hi, you can't. Why do you need the name?

 

Remember that these same methods are also used by the Identify feature. The user could try to identify using a series provider Id without any name, so how would your provider handle that if it has to rely on having the name?



#3 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139859 posts
  • Local time: 10:49 PM

Posted 13 October 2019 - 08:29 PM

Ah, sorry, I misread this. You're asking about Season lookups, and you want SeriesName.

 

Yes this could be added to SeasonInfo, I suppose. But I'm curious, what do you need it for?



#4 Tobi Uchiha OFFLINE  

Tobi Uchiha

    Newbie

  • Members
  • 7 posts
  • Local time: 04:49 AM

Posted 14 October 2019 - 12:40 AM

I partially can infer related seasons via my provider, but in some instances I would need something like a fallback method where I would search for a Series name + Season number combo.

I tested it via the search feature manually and in 90% of the cases this would allow me to correctly "guess" the season and download its metadata.

This "guess" mechanism would be great for metadata providers where the API presents no seasonal connection and rather stores continuing seasons as their own series (e.g. "One Punch Man", "One Punch Man 2").



#5 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139859 posts
  • Local time: 10:49 PM

Posted 15 October 2019 - 05:43 PM   Best Answer

Ok, i can add SeriesName to SeasonInfo for the next release. Thanks.


  • Tobi Uchiha likes this

#6 Tobi Uchiha OFFLINE  

Tobi Uchiha

    Newbie

  • Members
  • 7 posts
  • Local time: 04:49 AM

Posted 16 October 2019 - 11:02 AM

Ok, i can add SeriesName to SeasonInfo for the next release. Thanks.

Thank you. Much appreciated!

But if you can expose the series name wouldn't it make sense to either expose all of the Metadata in form of a SeriesInfo object on SeasonInfo or have an extension method for SeasonInfo that returns SeriesInfo, if available!?

Just the SeriesName might be fine for my case, but I can image that somebody might need access to another property like ProductionYear, if the series has two versions from different years.

You could of course then add this as SeriesProductionYear as well, but I think it would make more sense to group the existing SeriesProviderIds, the hopefully upcoming SeriesName and other Metadata on a single Series property.

I haven't looked extensively at the original source code, but if an SeriesInfo object is already present for the Season you're resolving you could just include it on SeasonInfo and avoid cluttering the SeasonInfo object with Properties.



#7 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139859 posts
  • Local time: 10:49 PM

Posted 16 October 2019 - 11:10 AM

Let's just start with SeriesName and we can always add more. Thanks.



#8 Tobi Uchiha OFFLINE  

Tobi Uchiha

    Newbie

  • Members
  • 7 posts
  • Local time: 04:49 AM

Posted 17 October 2019 - 02:11 PM

Let's just start with SeriesName and we can always add more. Thanks.

Is the MediaBrowser.Server.Core package open source? I can't find it on GitHub and the NuGet repository Link just redirects to the main repository, where I can't make out the package. :/

I'd love being able to contribute and maybe implement it myself! :)



#9 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139859 posts
  • Local time: 10:49 PM

Posted 18 October 2019 - 12:48 AM

Not currently but it's possible for the future. Are you a full time software developer?



#10 Tobi Uchiha OFFLINE  

Tobi Uchiha

    Newbie

  • Members
  • 7 posts
  • Local time: 04:49 AM

Posted 19 October 2019 - 04:25 PM

Not currently but it's possible for the future. Are you a full time software developer?

Yes, but currently "only" a junior developer.



#11 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 139859 posts
  • Local time: 10:49 PM

Posted 19 October 2019 - 06:21 PM

What tech do you work with?



#12 Tobi Uchiha OFFLINE  

Tobi Uchiha

    Newbie

  • Members
  • 7 posts
  • Local time: 04:49 AM

Posted 20 October 2019 - 04:04 AM

What tech do you work with?

.NET Core (mostly ASP.NET Core), Docker and Azure / Azure DevOps (if you can count those as tech)






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users