fix: 🐛 Small change to the URL we generate for the Play on Plex link

feature/music-rework v4.0.1476
tidusjar 3 years ago
parent 6c6b7bb498
commit e8810e82b1

@ -86,15 +86,15 @@ namespace Ombi.Helpers.Tests
{ {
get 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/#!/server/df5", "https://myhost.com/").Returns("https://myhost.com/web/#!/server/df5");
yield return new TestCaseData("web/app#!/server/df5", "").Returns("https://app.plex.tv/web/app#!/server/df5"); yield return new TestCaseData("web/#!/server/df5", "").Returns("https://app.plex.tv/web/#!/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/#!/server/df5", "https://myhost.com").Returns("https://myhost.com/web/#!/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/#!/server/df5", "http://myhost.com").Returns("http://myhost.com/web/#!/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/#!/server/df5", "http://www.myhost.com").Returns("http://www.myhost.com/web/#!/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("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/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/#!/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/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/#!/server/df5", "https://tidusjar.com:3456").Returns("https://tidusjar.com:3456/web/#!/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("https://app.plex.tv/web/#!/server/df5", "").Returns("https://app.plex.tv/web/#!/server/df5").SetName("OldUrl_BlankHost");
} }
} }

@ -107,7 +107,7 @@ namespace Ombi.Helpers
public static string GetPlexMediaUrl(string machineId, int mediaId) public static string GetPlexMediaUrl(string machineId, int mediaId)
{ {
var url = var url =
$"web/app#!/server/{machineId}/details?key=%2flibrary%2Fmetadata%2F{mediaId}"; $"web/#!/server/{machineId}/details?key=%2flibrary%2Fmetadata%2F{mediaId}";
return url; return url;
} }

Loading…
Cancel
Save