Retro-compatibility for Plex content URL

Solves URL for media synced before absolute URL was saved in PlexServerContent
This commit is contained in:
Florian Dupret 2022-01-24 14:23:12 +01:00
commit 1f5d5026da

View file

@ -90,7 +90,15 @@ namespace Ombi.Core.Rule.Rules.Search
useTheMovieDb = true; useTheMovieDb = true;
} }
obj.Available = 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; obj.Quality = item.Quality;
if (obj.Type == RequestType.TvShow) if (obj.Type == RequestType.TvShow)