Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added: Remote poster and fanart references to Kodi metadata file (#2837) #3302

Merged
merged 2 commits into from
Apr 27, 2019

Conversation

RobinQ124274
Copy link
Contributor

@RobinQ124274 RobinQ124274 commented Jan 11, 2019

Database Migration

NO

Description

Added remote poster and fanart references to the output of Kodi metadata files. Including these tags allows Kodi to properly differentiate video thumbnails from posters and fixes the issue that some skins would show a video thumbnail instead of the poster because of the empty <thumb> tag. Fanart entries were included as an extra for completeness.

Notes

The metadata file now refers to the remote images from TheMovieDB. Therefore, this solution will not provide the intended result (i.e., using the local image files), but does fix the issue that no posters or fanart are shown in Kodi.

Issues Fixed or Closed by this PR

details.Add(new XElement("thumb", thumbnail.Url));
}

foreach (var poster in posters)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn’t appear multiple entries are supported for posters like fanart? Should we just choose first like is done for screenshots above? Also this needs to be null checked.

Copy link
Contributor Author

@RobinQ124274 RobinQ124274 Jan 26, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Referring to https://kodi.wiki/view/NFO_files/Movies#Movie_nfo_Tags.

NFO (xml) Tag Required Multiple Notes
<thumb aspect="poster" preview=""></thumb> No Yes Path to Movie Posters

This page seems to indicate that multiple movie poster entries are possible in the NFO file. I suspect they are used when the user wants to select an alternative poster in the movie info section. You are right about the null checks; I will add them as soon as I find some tme for it.

@Qstick
Copy link
Member

Qstick commented Feb 24, 2019

@RobinQ124274 were you able to add the null checks on this? Might also be able to tack on fix for #3001 while we are working on these files?

@RobinQ124274
Copy link
Contributor Author

RobinQ124274 commented Feb 24, 2019

@Qstick I added the null checks in the latest commit from my forked repo. However, I got an issue from CodeFactor stating that the method is too complex (i.e. too many code lines)? I am not really comfortable in resolving this CodeFactor issue without any approval, since it would require breaking up the method in several submethods...

@galli-leo
Copy link
Contributor

@RobinQ124274 Codefactor should be fine, it's probably already an existing issue (you can also try to use c# nullable types, e.g. myMaybeNullObject?.Method();

@Qstick
Copy link
Member

Qstick commented Feb 24, 2019

@RobinQ124274 does the preview="" parameter need to be part of the fanart and poster entries as shown on kodi docs?

@RobinQ124274
Copy link
Contributor Author

RobinQ124274 commented Feb 24, 2019

@RobinQ124274 does the preview="" parameter need to be part of the fanart and poster entries as shown on kodi docs?

@Qstick
Tested this on Kodi 18.1. The preview attribute can be omitted as it will not affect the poster thumb lookup process of Kodi. Not sure what should be preferred though, as an empty string for the preview attribute would be more conform with Kodis documentation, though it is not required.

Copy link
Member

@Qstick Qstick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m good with it

@stale
Copy link

stale bot commented Apr 26, 2019

This issue has been automatically marked as stale because it has not had recent activity. Please verify that this is still an issue with the latest version of Radarr and report back. Otherwise this issue will be closed.

@stale stale bot added the stale label Apr 26, 2019
@Qstick Qstick removed the stale label Apr 27, 2019
@Qstick Qstick merged commit c79578e into Radarr:develop Apr 27, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Empty thumb tag in nfo causes Kodi poster search to skip local files
3 participants