From 4b1576398c392de5e4d10915a26fd3faa9abf761 Mon Sep 17 00:00:00 2001 From: Jamie Date: Wed, 13 Nov 2019 08:39:03 +0000 Subject: [PATCH 01/13] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6febb6683..8e5971c06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## (unreleased) +## v3.0.4880 (2019-11-13) ### **New Features** From f0bd5c737609be685bf3f03a87d95d784b760b83 Mon Sep 17 00:00:00 2001 From: Jamie Date: Wed, 13 Nov 2019 22:28:52 +0000 Subject: [PATCH 02/13] Update CHANGELOG.md --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e5971c06..e8b58c9c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## v3.0.4887 (2019-11-13) + +### **Fixes** + +- Fixed issues with the RequestId Migration #3244 #3253 #3249 + ## v3.0.4880 (2019-11-13) ### **New Features** From 2dbac003acf4d7b8a1a8840f6dd7329ee247f11c Mon Sep 17 00:00:00 2001 From: Jamie Date: Sat, 16 Nov 2019 00:34:06 +0000 Subject: [PATCH 03/13] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8b58c9c5..1984a6898 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v3.0.4892 (2019-11-16) + +- Fixed an issue where some users couldn't start Ombi + ## v3.0.4887 (2019-11-13) ### **Fixes** From e08fbb5298d0aef2b2b977bf32dc97909ba04672 Mon Sep 17 00:00:00 2001 From: Jamie Date: Sat, 16 Nov 2019 00:34:17 +0000 Subject: [PATCH 04/13] Update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1984a6898..b5e9481d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## v3.0.4892 (2019-11-16) +### **Fixes** + - Fixed an issue where some users couldn't start Ombi ## v3.0.4887 (2019-11-13) From 102d6ea1395777facb3a956ed86e3f36c1041edf Mon Sep 17 00:00:00 2001 From: Javier Pastor Date: Sat, 16 Nov 2019 13:02:40 +0100 Subject: [PATCH 05/13] Update GenericEmailProvider.cs Fix #3267 --- src/Ombi.Notifications/GenericEmailProvider.cs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/Ombi.Notifications/GenericEmailProvider.cs b/src/Ombi.Notifications/GenericEmailProvider.cs index 15f17af92..49bdb1fa9 100644 --- a/src/Ombi.Notifications/GenericEmailProvider.cs +++ b/src/Ombi.Notifications/GenericEmailProvider.cs @@ -96,7 +96,21 @@ namespace Ombi.Notifications client.Authenticate(settings.Username, settings.Password); } _log.LogDebug("sending message to {0} \r\n from: {1}\r\n Are we authenticated: {2}", message.To, message.From, client.IsAuthenticated); - await client.SendAsync(message); + try + { + await client.SendAsync(message); + } + catch (MailKit.Net.Smtp.SmtpCommandException e) when (e.ErrorCode.Equals(MailKit.Net.Smtp.SmtpErrorCode.RecipientNotAccepted)) + { + if (e.StatusCode.Equals(MailKit.Net.Smtp.SmtpStatusCode.MailboxUnavailable)) + { + _log.LogError("Could not send email '{0}', address <{1}> does not exist.", message.Subject, model.To); + } + else + { + throw; + } + } await client.DisconnectAsync(true); } } @@ -178,4 +192,4 @@ namespace Ombi.Notifications } } } -} \ No newline at end of file +} From 9a4386e28efa449d53e7d64bc994c867959aef3d Mon Sep 17 00:00:00 2001 From: Javier Pastor Date: Sat, 16 Nov 2019 22:05:16 +0100 Subject: [PATCH 06/13] Update GenericEmailProvider.cs Add the two checks in when inside catch. --- src/Ombi.Notifications/GenericEmailProvider.cs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/Ombi.Notifications/GenericEmailProvider.cs b/src/Ombi.Notifications/GenericEmailProvider.cs index 49bdb1fa9..90033e385 100644 --- a/src/Ombi.Notifications/GenericEmailProvider.cs +++ b/src/Ombi.Notifications/GenericEmailProvider.cs @@ -100,16 +100,9 @@ namespace Ombi.Notifications { await client.SendAsync(message); } - catch (MailKit.Net.Smtp.SmtpCommandException e) when (e.ErrorCode.Equals(MailKit.Net.Smtp.SmtpErrorCode.RecipientNotAccepted)) + catch (MailKit.Net.Smtp.SmtpCommandException e) when (e.ErrorCode.Equals(MailKit.Net.Smtp.SmtpErrorCode.RecipientNotAccepted) && e.StatusCode.Equals(MailKit.Net.Smtp.SmtpStatusCode.MailboxUnavailable)) { - if (e.StatusCode.Equals(MailKit.Net.Smtp.SmtpStatusCode.MailboxUnavailable)) - { - _log.LogError("Could not send email '{0}', address <{1}> does not exist.", message.Subject, model.To); - } - else - { - throw; - } + _log.LogError("Could not send email '{0}', address <{1}> does not exist.", message.Subject, model.To); } await client.DisconnectAsync(true); } From f73d2fa52bd35cdbadae0cd0fa0647da5ba23677 Mon Sep 17 00:00:00 2001 From: zobe123 Date: Mon, 30 Dec 2019 10:08:15 +0100 Subject: [PATCH 07/13] Update README.md Update integration section --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e8e269e7f..7c75a12e8 100644 --- a/README.md +++ b/README.md @@ -56,12 +56,13 @@ Here are some of the features Ombi V3 has: ### Integration We integrate with the following applications: * Plex Media Server -* Emby +* Emby/Jellyfin Media Server * Sonarr * Radarr * Lidarr * DogNzb * Couch Potato +* SickRage/SickChill ### Notifications From 7d53050fbaeb1684ba8f24b99f8b036664f90fb6 Mon Sep 17 00:00:00 2001 From: Jamie Date: Sat, 25 Jan 2020 23:46:13 +0000 Subject: [PATCH 08/13] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7c75a12e8..b33146f90 100644 --- a/README.md +++ b/README.md @@ -33,10 +33,10 @@ We also now have merch up on Teespring! ___ -| Service | Stable | Develop | -|----------|:---------------------------:|:----------------------------:| -| AppVeyor | [![Build status](https://ci.appveyor.com/api/projects/status/hgj8j6lcea7j0yhn/branch/master?svg=true)](https://ci.appveyor.com/project/tidusjar/requestplex/branch/master) | [![Build status](https://ci.appveyor.com/api/projects/status/hgj8j6lcea7j0yhn/branch/develop?svg=true)](https://ci.appveyor.com/project/tidusjar/requestplex/branch/develop) | -| Download |[![Download](http://i.imgur.com/odToka3.png)](https://github.com/tidusjar/Ombi/releases) | [![Download](http://i.imgur.com/odToka3.png)](https://ci.appveyor.com/project/tidusjar/requestplex/branch/develop/artifacts) | +| Service | Stable | Develop | V4 | +|----------|:---------------------------:|:----------------------------:|:----------------------------:| +| Build Status | [![Build status](https://ci.appveyor.com/api/projects/status/hgj8j6lcea7j0yhn/branch/master?svg=true)](https://ci.appveyor.com/project/tidusjar/requestplex/branch/master) | [![Build status](https://ci.appveyor.com/api/projects/status/hgj8j6lcea7j0yhn/branch/develop?svg=true)](https://ci.appveyor.com/project/tidusjar/requestplex/branch/develop) | [![Build Status](https://dev.azure.com/tidusjar/Ombi/_apis/build/status/Ombi%20CI%20Build?branchName=feature%2Fv4)](https://dev.azure.com/tidusjar/Ombi/_build/latest?definitionId=15&branchName=feature%2Fv4) +| Download |[![Download](http://i.imgur.com/odToka3.png)](https://github.com/tidusjar/Ombi/releases) | [![Download](http://i.imgur.com/odToka3.png)](https://ci.appveyor.com/project/tidusjar/requestplex/branch/develop/artifacts) | [![Download](http://i.imgur.com/odToka3.png)](https://github.com/tidusjar/ombi.releases/releases) | # Features Here are some of the features Ombi V3 has: * Now working without crashes on Linux. From eb9e77542d334a4492e880ebe214f9e0c310924b Mon Sep 17 00:00:00 2001 From: Jamie Date: Sat, 22 Feb 2020 22:56:49 +0000 Subject: [PATCH 09/13] Delete test.workflow --- .github/workflows/test.workflow | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 .github/workflows/test.workflow diff --git a/.github/workflows/test.workflow b/.github/workflows/test.workflow deleted file mode 100644 index 7c88813d1..000000000 --- a/.github/workflows/test.workflow +++ /dev/null @@ -1,9 +0,0 @@ -workflow "New workflow" { - on = "push" - resolves = [".NET Core CLI"] -} - -action ".NET Core CLI" { - uses = "baruchiro/github-actions@0.0.1" - args = "build src/Ombi.sln" -} From fc108fcba4a55415c541f308bbb3eba84665aa92 Mon Sep 17 00:00:00 2001 From: Jamie Date: Sat, 22 Feb 2020 22:56:54 +0000 Subject: [PATCH 10/13] Delete aspnetcore.yml --- .github/workflows/aspnetcore.yml | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 .github/workflows/aspnetcore.yml diff --git a/.github/workflows/aspnetcore.yml b/.github/workflows/aspnetcore.yml deleted file mode 100644 index e562216cc..000000000 --- a/.github/workflows/aspnetcore.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: ASP.NET Core CI - -on: [push, pull_request] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 - with: - dotnet-version: 2.2.108 - - - name: Build Backend - run: ./build.sh --settings_skipverification=true From 76144d3ee22a2fc2f1de7703236099c0ba8f130b Mon Sep 17 00:00:00 2001 From: Jamie Date: Fri, 13 Mar 2020 09:33:42 +0000 Subject: [PATCH 11/13] Fixed the exception in the newsletter job #3421 --- src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs b/src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs index 32254f09a..6893cb585 100644 --- a/src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs +++ b/src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs @@ -730,7 +730,7 @@ namespace Ombi.Schedule.Jobs.Ombi finalsb.Append("
"); } - var summary = info.summary; + var summary = info?.summary ?? string.Empty; if (summary.Length > 280) { summary = summary.Remove(280); @@ -946,4 +946,4 @@ namespace Ombi.Schedule.Jobs.Ombi GC.SuppressFinalize(this); } } -} \ No newline at end of file +} From a110be83fe99cc2c4ead8753ca629b241606b78a Mon Sep 17 00:00:00 2001 From: stcbus Date: Sat, 21 Mar 2020 18:22:31 -0400 Subject: [PATCH 12/13] minor language and grammar changes. --- src/Ombi.Store/Context/OmbiContext.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Ombi.Store/Context/OmbiContext.cs b/src/Ombi.Store/Context/OmbiContext.cs index 4694f1151..c1f2e9251 100644 --- a/src/Ombi.Store/Context/OmbiContext.cs +++ b/src/Ombi.Store/Context/OmbiContext.cs @@ -116,7 +116,7 @@ namespace Ombi.Store.Context notificationToAdd = new NotificationTemplates { NotificationType = notificationType, - Message = "Hello! Your request for {Title} on {ApplicationName}! This is now available! :)", + Message = "Hello! Your request for {Title} on {ApplicationName} is now available.", Subject = "{ApplicationName}: {Title} is now available!", Agent = agent, Enabled = true, @@ -138,7 +138,7 @@ namespace Ombi.Store.Context notificationToAdd = new NotificationTemplates { NotificationType = notificationType, - Message = "Hello! Your request for {Title} has been declined, Sorry!", + Message = "Hello! Your request for {Title} has been declined.", Subject = "{ApplicationName}: your request has been declined", Agent = agent, Enabled = true, @@ -148,7 +148,7 @@ namespace Ombi.Store.Context notificationToAdd = new NotificationTemplates { NotificationType = notificationType, - Message = "Hello! The user '{UserName}' has requested {Title} but it could not be added. This has been added into the requests queue and will keep retrying", + Message = "Hello! The user '{UserName}' has requested {Title} but it could not be added. This has been added into the requests queue and it will keep retrying", Subject = "Item Added To Retry Queue", Agent = agent, Enabled = true, @@ -158,7 +158,7 @@ namespace Ombi.Store.Context notificationToAdd = new NotificationTemplates { NotificationType = notificationType, - Message = "Hello! You have been invited to use {ApplicationName}! You can login here: {ApplicationUrl}", + Message = "Hello! You have been invited to use {ApplicationName}. You can login here: {ApplicationUrl}", Subject = "Invite to {ApplicationName}", Agent = agent, Enabled = true, @@ -168,7 +168,7 @@ namespace Ombi.Store.Context notificationToAdd = new NotificationTemplates { NotificationType = notificationType, - Message = "Hello {UserName} Your issue for {Title} has now been resolved.", + Message = "Hello {UserName}, your issue for {Title} has now been resolved.", Subject = "{ApplicationName}: Issue has been resolved for {Title}!", Agent = agent, Enabled = true, @@ -179,7 +179,7 @@ namespace Ombi.Store.Context notificationToAdd = new NotificationTemplates { NotificationType = notificationType, - Message = "Hello, There is a new comment on your issue {IssueSubject}, The comment is: {NewIssueComment}", + Message = "Hello, There is a new comment on your issue {IssueSubject}. The comment is: {NewIssueComment}", Subject = "{ApplicationName}: New comment on issue {IssueSubject}!", Agent = agent, Enabled = true, @@ -191,7 +191,7 @@ namespace Ombi.Store.Context notificationToAdd = new NotificationTemplates { NotificationType = notificationType, - Message = "Here is a list of Movies and TV Shows that have recently been added!", + Message = "Here is a list of Movies and TV Shows that have recently been added:", Subject = "{ApplicationName}: Recently Added Content!", Agent = agent, Enabled = true, @@ -215,4 +215,4 @@ namespace Ombi.Store.Context } } } -} \ No newline at end of file +} From 2c788cc0c3e024baeaff949d8261545a18053507 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Tue, 31 Mar 2020 15:56:37 +0100 Subject: [PATCH 13/13] Fixed #3455 --- src/Ombi.Helpers.Tests/EmbyHelperTests.cs | 46 +++++++++++++++++++++++ src/Ombi.Helpers/EmbyHelper.cs | 12 ++++-- 2 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 src/Ombi.Helpers.Tests/EmbyHelperTests.cs diff --git a/src/Ombi.Helpers.Tests/EmbyHelperTests.cs b/src/Ombi.Helpers.Tests/EmbyHelperTests.cs new file mode 100644 index 000000000..746bd1d5f --- /dev/null +++ b/src/Ombi.Helpers.Tests/EmbyHelperTests.cs @@ -0,0 +1,46 @@ +using NUnit.Framework; +using System; +using System.Collections.Generic; +using System.Text; + +namespace Ombi.Helpers.Tests +{ + [TestFixture] + public class EmbyHelperTests + { + [TestCaseSource(nameof(UrlData))] + public string TestUrl(string mediaId, string url) + { + return EmbyHelper.GetEmbyMediaUrl(mediaId, url); + } + + [TestCaseSource(nameof(JellyfinUrlData))] + public string TestJellyfinUrl(string mediaId, string url) + { + return EmbyHelper.GetEmbyMediaUrl(mediaId, url, true); + } + + public static IEnumerable UrlData + { + get + { + var mediaId = 1; + yield return new TestCaseData(mediaId.ToString(), "http://google.com").Returns($"http://google.com/#!/item?id={mediaId}").SetName("EmbyHelper_GetMediaUrl_WithCustomDomain_WithoutTrailingSlash"); + yield return new TestCaseData(mediaId.ToString(), "http://google.com/").Returns($"http://google.com/#!/item?id={mediaId}").SetName("EmbyHelper_GetMediaUrl_WithCustomDomain"); + yield return new TestCaseData(mediaId.ToString(), "https://google.com/").Returns($"https://google.com/#!/item?id={mediaId}").SetName("EmbyHelper_GetMediaUrl_WithCustomDomain_Https"); + yield return new TestCaseData(mediaId.ToString(), string.Empty).Returns($"https://app.emby.media/#!/item?id={mediaId}").SetName("EmbyHelper_GetMediaUrl_WithOutCustomDomain"); + } + } + + public static IEnumerable JellyfinUrlData + { + get + { + var mediaId = 1; + yield return new TestCaseData(mediaId.ToString(), "http://google.com").Returns($"http://google.com/#!/itemdetails.html?id={mediaId}").SetName("EmbyHelperJellyfin_GetMediaUrl_WithCustomDomain_WithoutTrailingSlash"); + yield return new TestCaseData(mediaId.ToString(), "http://google.com/").Returns($"http://google.com/#!/itemdetails.html?id={mediaId}").SetName("EmbyHelperJellyfin_GetMediaUrl_WithCustomDomain"); + yield return new TestCaseData(mediaId.ToString(), "https://google.com/").Returns($"https://google.com/#!/itemdetails.html?id={mediaId}").SetName("EmbyHelperJellyfin_GetMediaUrl_WithCustomDomain_Https"); + } + } + } +} diff --git a/src/Ombi.Helpers/EmbyHelper.cs b/src/Ombi.Helpers/EmbyHelper.cs index e22bb1d99..61716cd4b 100644 --- a/src/Ombi.Helpers/EmbyHelper.cs +++ b/src/Ombi.Helpers/EmbyHelper.cs @@ -4,18 +4,22 @@ { public static string GetEmbyMediaUrl(string mediaId, string customerServerUrl = null, bool isJellyfin = false) { - string path = "item/item"; + string path = "item"; if (isJellyfin) { - path = "itemdetails"; + path = "itemdetails.html"; } if (customerServerUrl.HasValue()) { - return $"{customerServerUrl}#!/{path}.html?id={mediaId}"; + if (!customerServerUrl.EndsWith("/")) + { + return $"{customerServerUrl}/#!/{path}?id={mediaId}"; + } + return $"{customerServerUrl}#!/{path}?id={mediaId}"; } else { - return $"https://app.emby.media/#!/{path}.html?id={mediaId}"; + return $"https://app.emby.media/#!/{path}?id={mediaId}"; } } }