diff --git a/src/Ombi.Helpers.Tests/PlexHelperTests.cs b/src/Ombi.Helpers.Tests/PlexHelperTests.cs index e54df6644..3094f9a49 100644 --- a/src/Ombi.Helpers.Tests/PlexHelperTests.cs +++ b/src/Ombi.Helpers.Tests/PlexHelperTests.cs @@ -86,15 +86,15 @@ namespace Ombi.Helpers.Tests { get { - yield return new TestCaseData("web/app#!/server/df5", "https://myhost.com/").Returns("https://myhost.com/web/app#!/server/df5"); - yield return new TestCaseData("web/app#!/server/df5", "").Returns("https://app.plex.tv/web/app#!/server/df5"); - yield return new TestCaseData("web/app#!/server/df5", "https://myhost.com").Returns("https://myhost.com/web/app#!/server/df5"); - yield return new TestCaseData("web/app#!/server/df5", "http://myhost.com").Returns("http://myhost.com/web/app#!/server/df5"); - yield return new TestCaseData("web/app#!/server/df5", "http://www.myhost.com").Returns("http://www.myhost.com/web/app#!/server/df5"); - yield return new TestCaseData("web/app#!/server/df5", "http://www.myhost.com:3456").Returns("http://www.myhost.com:3456/web/app#!/server/df5").SetName("PortTest"); - yield return new TestCaseData("https://app.plex.tv/web/app#!/server/df5", "http://www.myhost.com:3456").Returns("http://www.myhost.com:3456/web/app#!/server/df5"); - yield return new TestCaseData("https://app.plex.tv/web/app#!/server/df5", "https://tidusjar.com:3456").Returns("https://tidusjar.com:3456/web/app#!/server/df5"); - yield return new TestCaseData("https://app.plex.tv/web/app#!/server/df5", "").Returns("https://app.plex.tv/web/app#!/server/df5").SetName("OldUrl_BlankHost"); + yield return new TestCaseData("web/#!/server/df5", "https://myhost.com/").Returns("https://myhost.com/web/#!/server/df5"); + yield return new TestCaseData("web/#!/server/df5", "").Returns("https://app.plex.tv/web/#!/server/df5"); + yield return new TestCaseData("web/#!/server/df5", "https://myhost.com").Returns("https://myhost.com/web/#!/server/df5"); + yield return new TestCaseData("web/#!/server/df5", "http://myhost.com").Returns("http://myhost.com/web/#!/server/df5"); + yield return new TestCaseData("web/#!/server/df5", "http://www.myhost.com").Returns("http://www.myhost.com/web/#!/server/df5"); + yield return new TestCaseData("web/#!/server/df5", "http://www.myhost.com:3456").Returns("http://www.myhost.com:3456/web/#!/server/df5").SetName("PortTest"); + yield return new TestCaseData("https://app.plex.tv/web/#!/server/df5", "http://www.myhost.com:3456").Returns("http://www.myhost.com:3456/web/#!/server/df5"); + yield return new TestCaseData("https://app.plex.tv/web/#!/server/df5", "https://tidusjar.com:3456").Returns("https://tidusjar.com:3456/web/#!/server/df5"); + yield return new TestCaseData("https://app.plex.tv/web/#!/server/df5", "").Returns("https://app.plex.tv/web/#!/server/df5").SetName("OldUrl_BlankHost"); } } diff --git a/src/Ombi.Helpers/PlexHelper.cs b/src/Ombi.Helpers/PlexHelper.cs index 37579d0d0..3e5aeff70 100644 --- a/src/Ombi.Helpers/PlexHelper.cs +++ b/src/Ombi.Helpers/PlexHelper.cs @@ -107,7 +107,7 @@ namespace Ombi.Helpers public static string GetPlexMediaUrl(string machineId, int mediaId) { var url = - $"web/app#!/server/{machineId}/details?key=%2flibrary%2Fmetadata%2F{mediaId}"; + $"web/#!/server/{machineId}/details?key=%2flibrary%2Fmetadata%2F{mediaId}"; return url; }