From 1f5d5026da9396c3ab67db73a3d71e394a5fcd59 Mon Sep 17 00:00:00 2001 From: Florian Dupret <34862846+sephrat@users.noreply.github.com> Date: Mon, 24 Jan 2022 14:23:12 +0100 Subject: [PATCH] Retro-compatibility for Plex content URL Solves URL for media synced before absolute URL was saved in PlexServerContent --- .../Rule/Rules/Search/PlexAvailabilityRule.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Ombi.Core/Rule/Rules/Search/PlexAvailabilityRule.cs b/src/Ombi.Core/Rule/Rules/Search/PlexAvailabilityRule.cs index 13bdb45e4..4c05e0fe1 100644 --- a/src/Ombi.Core/Rule/Rules/Search/PlexAvailabilityRule.cs +++ b/src/Ombi.Core/Rule/Rules/Search/PlexAvailabilityRule.cs @@ -90,9 +90,17 @@ namespace Ombi.Core.Rule.Rules.Search useTheMovieDb = true; } obj.Available = true; - obj.PlexUrl = item.Url; + if (item.Url.StartsWith("http")) + { + obj.PlexUrl = item.Url; + } + else + { + // legacy content + obj.PlexUrl = PlexHelper.BuildPlexMediaUrl(item.Url, host); + } obj.Quality = item.Quality; - + if (obj.Type == RequestType.TvShow) { var search = (SearchTvShowViewModel)obj;