Added the ability to change where the View on Emby link goes to #2730

This commit is contained in:
TidusJar 2019-01-21 13:53:46 +00:00
commit 1f59693c7e
6 changed files with 29 additions and 9 deletions

View file

@ -7,11 +7,16 @@ namespace Ombi.Helpers
{
public class EmbyHelper
{
public static string GetEmbyMediaUrl(string mediaId)
public static string GetEmbyMediaUrl(string mediaId, string customerServerUrl = null)
{
var url =
$"http://app.emby.media/#!/itemdetails.html?id={mediaId}";
return url;
if (customerServerUrl.HasValue())
{
return $"{customerServerUrl}#!/itemdetails.html?id={mediaId}";
}
else
{
return $"https://app.emby.media/#!/itemdetails.html?id={mediaId}";
}
}
}
}