MediaBrowser.Api.Library.LibraryServices.cs bug?

I’ve been trying to trace a bug that i’m encountering and have come across what could be another. (I may be wrong, as i’m still learning the code).

It’s in the MediaBrowser.Api.Library.LibraryServices.cs code in the function

public object Get(GetSimilarItems request)

If i’m understanding the code correctly, this function returns similar items to the one passed to it.(???)

However, it will never return similar series as MediaBrowser.Controller.Entities.TV.Series.cs does not implement the IHasProgramAttributes interface. Thus the code will always fail to return tv series.

changing line 559 in the function from

If (program != null && program.IsSeries)
to
if (item is Series || (program != null && program.IsSeries))

would seem to solve the issue, if it is indeed one.

Like i said i’m a newbie to the code - so please ignore/delete if the functionality isn’t supposed to work that that.

I’m not sure myself, but I’ll ask the backend folks to look at it. A lot of stuff is still cleanup from inherited code, even after a year. A bunch of contributors/developers hang out in the chat channels we have, so that’s a good place to check (and that’s where I’ll share this question).