mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-23 06:25:24 -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();
|
return new ProviderId();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetPlexMediaUrl(string machineId, int mediaId)
|
public static string GetPlexMediaUrl(string machineId, int mediaId, string plexHost)
|
||||||
{
|
{
|
||||||
var url =
|
var url =
|
||||||
$"web/#!/server/{machineId}/details?key=%2flibrary%2Fmetadata%2F{mediaId}";
|
$"web/#!/server/{machineId}/details?key=%2flibrary%2Fmetadata%2F{mediaId}";
|
||||||
return url;
|
return BuildPlexMediaUrl(url, plexHost);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string BuildPlexMediaUrl(string savedUrl, string plexHost)
|
public static string BuildPlexMediaUrl(string savedUrl, string plexHost)
|
||||||
|
|
|
@ -351,7 +351,7 @@ namespace Ombi.Schedule.Jobs.Plex
|
||||||
ReleaseYear = movie.year.ToString(),
|
ReleaseYear = movie.year.ToString(),
|
||||||
Type = MediaType.Movie,
|
Type = MediaType.Movie,
|
||||||
Title = movie.title,
|
Title = movie.title,
|
||||||
Url = PlexHelper.GetPlexMediaUrl(servers.MachineIdentifier, movie.ratingKey),
|
Url = PlexHelper.GetPlexMediaUrl(servers.MachineIdentifier, movie.ratingKey, servers.ServerHostname),
|
||||||
Seasons = new List<PlexSeasonsContent>(),
|
Seasons = new List<PlexSeasonsContent>(),
|
||||||
Quality = movie.Media?.FirstOrDefault()?.videoResolution ?? string.Empty
|
Quality = movie.Media?.FirstOrDefault()?.videoResolution ?? string.Empty
|
||||||
};
|
};
|
||||||
|
@ -555,7 +555,7 @@ namespace Ombi.Schedule.Jobs.Plex
|
||||||
ReleaseYear = show.year.ToString(),
|
ReleaseYear = show.year.ToString(),
|
||||||
Type = MediaType.Series,
|
Type = MediaType.Series,
|
||||||
Title = show.title,
|
Title = show.title,
|
||||||
Url = PlexHelper.GetPlexMediaUrl(servers.MachineIdentifier, show.ratingKey),
|
Url = PlexHelper.GetPlexMediaUrl(servers.MachineIdentifier, show.ratingKey, servers.ServerHostname),
|
||||||
Seasons = new List<PlexSeasonsContent>()
|
Seasons = new List<PlexSeasonsContent>()
|
||||||
};
|
};
|
||||||
await GetProviderIds(showMetadata, item);
|
await GetProviderIds(showMetadata, item);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue