// The rating badge shows the IMDb score when we have one (rendered with the imdb.com link), // otherwise the Plex audience score (no IMDb link/branding) — so a non-IMDb score is never // mislabelled as IMDb. Shared by the media-info panel (PlexInfo) and the show hero // (PlexBrowse) so both surfaces agree. Returns null when neither score exists (no badge). export function pickRatingBadge( imdbRating?: number | null, audienceRating?: number | null, ): { score: number; isImdb: boolean } | null { const score = imdbRating ?? audienceRating; if (score == null) return null; return { score, isImdb: imdbRating != null }; }