mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-22 22:23:34 -07:00
Save absolute URL for Plex content
Let's be consistent with Emby and Jellyfin
This commit is contained in:
parent
71a50ca6f1
commit
3fd43a9845
2 changed files with 4 additions and 4 deletions
|
@ -104,11 +104,11 @@ namespace Ombi.Helpers
|
|||
return new ProviderId();
|
||||
}
|
||||
|
||||
public static string GetPlexMediaUrl(string machineId, int mediaId)
|
||||
public static string GetPlexMediaUrl(string machineId, int mediaId, string plexHost)
|
||||
{
|
||||
var url =
|
||||
$"web/#!/server/{machineId}/details?key=%2flibrary%2Fmetadata%2F{mediaId}";
|
||||
return url;
|
||||
return BuildPlexMediaUrl(url, plexHost);
|
||||
}
|
||||
|
||||
public static string BuildPlexMediaUrl(string savedUrl, string plexHost)
|
||||
|
|
|
@ -351,7 +351,7 @@ namespace Ombi.Schedule.Jobs.Plex
|
|||
ReleaseYear = movie.year.ToString(),
|
||||
Type = MediaType.Movie,
|
||||
Title = movie.title,
|
||||
Url = PlexHelper.GetPlexMediaUrl(servers.MachineIdentifier, movie.ratingKey),
|
||||
Url = PlexHelper.GetPlexMediaUrl(servers.MachineIdentifier, movie.ratingKey, servers.ServerHostname),
|
||||
Seasons = new List<PlexSeasonsContent>(),
|
||||
Quality = movie.Media?.FirstOrDefault()?.videoResolution ?? string.Empty
|
||||
};
|
||||
|
@ -555,7 +555,7 @@ namespace Ombi.Schedule.Jobs.Plex
|
|||
ReleaseYear = show.year.ToString(),
|
||||
Type = MediaType.Series,
|
||||
Title = show.title,
|
||||
Url = PlexHelper.GetPlexMediaUrl(servers.MachineIdentifier, show.ratingKey),
|
||||
Url = PlexHelper.GetPlexMediaUrl(servers.MachineIdentifier, show.ratingKey, servers.ServerHostname),
|
||||
Seasons = new List<PlexSeasonsContent>()
|
||||
};
|
||||
await GetProviderIds(showMetadata, item);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue