From 1095d524962648a1e427f0bcd8105fa734dd5b60 Mon Sep 17 00:00:00 2001 From: Jamie Date: Tue, 19 Oct 2021 10:47:47 +0100 Subject: [PATCH 1/5] =?UTF-8?q?fix(translations):=20=F0=9F=8C=90=20New=20t?= =?UTF-8?q?ranslations=20en.json=20from=20Crowdin=20[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Ombi/wwwroot/translations/fr.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Ombi/wwwroot/translations/fr.json b/src/Ombi/wwwroot/translations/fr.json index 2d3bbb8a3..e751e1272 100644 --- a/src/Ombi/wwwroot/translations/fr.json +++ b/src/Ombi/wwwroot/translations/fr.json @@ -90,7 +90,7 @@ "TvTab": "Séries", "MusicTab": "Musique", "AdvancedSearch": "Vous pouvez remplir l'un des éléments ci-dessous pour découvrir de nouveaux médias. Tous les résultats sont triés par popularité", - "AdvancedSearchHeader": "Advanced Search", + "AdvancedSearchHeader": "Recherche avancée", "Suggestions": "Suggestions", "NoResults": "Désolé, nous n'avons trouvé aucun résultat !", "DigitalDate": "Sortie numérique: {{date}}", @@ -125,9 +125,9 @@ "Season": "Saison {{seasonNumber}}", "SelectAllInSeason": "Tout sélectionner dans la saison {{seasonNumber}}" }, - "AdvancedSearchInstructions": "Please choose what type of media you are searching for:", - "YearOfRelease": "Year of Release", - "KeywordSearchingDisclaimer": "Please note that Keyword Searching is very hit and miss due to the inconsistent data in TheMovieDb" + "AdvancedSearchInstructions": "Veuillez choisir le type de média que vous recherchez :", + "YearOfRelease": "Année de sortie", + "KeywordSearchingDisclaimer": "Veuillez noter que la recherche de mots-clés n'est pas très fiable en raison de données incohérentes dans TheMovieDb" }, "Requests": { "Title": "Demandes", @@ -218,7 +218,7 @@ "DescriptionPlaceholder": "Veuillez décrire le problème rencontré", "TitlePlaceholder": "Titre court de votre problème", "SelectCategory": "Sélectionner une catégorie", - "IssueCreated": "Votre rapport d'erreur a été créée" + "IssueCreated": "Votre rapport d'erreur a été créé" }, "Outstanding": "Des rapports d'erreurs sont en attente", "ResolvedDate": "Date de résolution", @@ -236,8 +236,8 @@ "FilterHeaderRequestStatus": "Statut", "Approved": "Validée", "PendingApproval": "En attente de validation", - "WatchProviders": "Watch Providers", - "Keywords": "Keywords" + "WatchProviders": "Fournisseurs de contenu", + "Keywords": "Mots-clés" }, "UserManagment": { "TvRemaining": "TV : {{remaining}}/{{total}} restant(s)", From 52eda6ab917a73842bc02b0d8e0c442e564ca8f0 Mon Sep 17 00:00:00 2001 From: Jamie Date: Tue, 19 Oct 2021 11:45:14 +0100 Subject: [PATCH 2/5] =?UTF-8?q?fix(translations):=20=F0=9F=8C=90=20New=20t?= =?UTF-8?q?ranslations=20en.json=20from=20Crowdin=20[skip=20ci]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Ombi/wwwroot/translations/fr.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Ombi/wwwroot/translations/fr.json b/src/Ombi/wwwroot/translations/fr.json index e751e1272..3596c65fb 100644 --- a/src/Ombi/wwwroot/translations/fr.json +++ b/src/Ombi/wwwroot/translations/fr.json @@ -163,7 +163,7 @@ "ReportIssue": "Signaler un problème", "Filter": "Filtre", "Sort": "Trier", - "SeasonNumberHeading": "Saison: {seasonNumber}", + "SeasonNumberHeading": "Saison : {seasonNumber}", "SortTitleAsc": "Titre ▲", "SortTitleDesc": "Titre ▼", "SortRequestDateAsc": "Date de la demande ▲", From f72b47a3fb2493e86375c225a6d2debf0d01abaa Mon Sep 17 00:00:00 2001 From: Jamie Date: Tue, 19 Oct 2021 16:07:41 +0100 Subject: [PATCH 3/5] chore: updated crowdin config [skip ci] --- crowdin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crowdin.yml b/crowdin.yml index 67f8e4368..84db0b7c0 100644 --- a/crowdin.yml +++ b/crowdin.yml @@ -1,5 +1,5 @@ -commit_message: "fix(translations): 🌐 New translations %original_file_name% from Crowdin [skip ci]" +commit_message: "fix(translations): 🌐 New translations %two_letters_code% from Crowdin [skip ci]" append_commit_message: false pull_request_title: "🌐 Translations Update" pull_request_labels: From 21dba4c524b98b9f2b883d97e7e13329425a8762 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Wed, 20 Oct 2021 11:59:10 +0100 Subject: [PATCH 4/5] fix(newsletter): :bug: Fixed a few small bugs in the newsletter Fixed an issue where if you only had external users, it wouldn't send. Fixed another issue where it didn't cater for potential duplicate email addresses --- .../NewsletterUnsubscribeTests.cs | 2 ++ src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs | 31 ++++++++++--------- src/Ombi/.vscode/settings.json | 3 +- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/Ombi.Schedule.Tests/NewsletterUnsubscribeTests.cs b/src/Ombi.Schedule.Tests/NewsletterUnsubscribeTests.cs index 0fc961058..0ed9cf163 100644 --- a/src/Ombi.Schedule.Tests/NewsletterUnsubscribeTests.cs +++ b/src/Ombi.Schedule.Tests/NewsletterUnsubscribeTests.cs @@ -29,6 +29,8 @@ namespace Ombi.Schedule.Tests yield return new TestCaseData("https://google.com:3577/", "1").Returns("https://google.com:3577/unsubscribe/1").SetName("Port With Slash"); yield return new TestCaseData("", "1").Returns(string.Empty).SetName("Missing App URL empty"); yield return new TestCaseData(null, "1").Returns(string.Empty).SetName("Missing App URL null"); + yield return new TestCaseData("hty", string.Empty).Returns(string.Empty).SetName("Missing ID empty"); + yield return new TestCaseData("hty", null).Returns(string.Empty).SetName("Missing ID null"); } } } diff --git a/src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs b/src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs index 0088e00fd..cd24cda8b 100644 --- a/src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs +++ b/src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs @@ -208,13 +208,7 @@ namespace Ombi.Schedule.Jobs.Ombi if (!test) { - // Get the users to send it to - var users = await _userManager.GetUsersInRoleAsync(OmbiRoles.ReceivesNewsletter); - if (!users.Any()) - { - return; - } - + var users = new List(); foreach (var emails in settings.ExternalEmails) { users.Add(new OmbiUser @@ -224,11 +218,23 @@ namespace Ombi.Schedule.Jobs.Ombi }); } + // Get the users to send it to + users.AddRange(await _userManager.GetUsersInRoleAsync(OmbiRoles.ReceivesNewsletter)); + if (!users.Any()) + { + return; + } + var messageContent = ParseTemplate(template, customization); var email = new NewsletterTemplate(); - foreach (var user in users) - { + foreach (var user in users.DistinctBy(x => x.Email)) + { // Get the users to send it to + if (user.Email.IsNullOrEmpty()) + { + continue; + } + var url = GenerateUnsubscribeLink(customization.ApplicationUrl, user.Id); var html = email.LoadTemplate(messageContent.Subject, messageContent.Message, body, customization.Logo, url); @@ -243,11 +249,6 @@ namespace Ombi.Schedule.Jobs.Ombi Subject = messageContent.Subject }; - // Get the users to send it to - if (user.Email.IsNullOrEmpty()) - { - continue; - } // Send the message to the user message.To.Add(new MailboxAddress(user.Email.Trim(), user.Email.Trim())); @@ -391,7 +392,7 @@ namespace Ombi.Schedule.Jobs.Ombi public static string GenerateUnsubscribeLink(string applicationUrl, string id) { - if (!applicationUrl.HasValue()) + if (!applicationUrl.HasValue() || !id.HasValue()) { return string.Empty; } diff --git a/src/Ombi/.vscode/settings.json b/src/Ombi/.vscode/settings.json index f7b75c335..89d2dbd93 100644 --- a/src/Ombi/.vscode/settings.json +++ b/src/Ombi/.vscode/settings.json @@ -16,6 +16,7 @@ "request-limits", "notifications", "settings", - "user-management" + "user-management", + "newsletter" ] } From c601e7f83f70d8109b0d31e3e3dbfc05e06585c2 Mon Sep 17 00:00:00 2001 From: Conventional Changelog Action Date: Wed, 20 Oct 2021 12:53:44 +0000 Subject: [PATCH 5/5] chore(release): :rocket: v4.2.12 --- CHANGELOG.md | 20 +++++++++++--------- version.json | 2 +- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a3168617..781542dcd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +## [4.2.12](https://github.com/Ombi-app/Ombi/compare/v4.2.11...v4.2.12) (2021-10-20) + + +### Bug Fixes + +* **newsletter:** :bug: Fixed a few small bugs in the newsletter ([21dba4c](https://github.com/Ombi-app/Ombi/commit/21dba4c524b98b9f2b883d97e7e13329425a8762)) +* **translations:** 🌐 New translations en.json from Crowdin [skip ci] ([52eda6a](https://github.com/Ombi-app/Ombi/commit/52eda6ab917a73842bc02b0d8e0c442e564ca8f0)) +* **translations:** 🌐 New translations en.json from Crowdin [skip ci] ([1095d52](https://github.com/Ombi-app/Ombi/commit/1095d524962648a1e427f0bcd8105fa734dd5b60)) + + + ## [4.2.11](https://github.com/Ombi-app/Ombi/compare/v4.2.10...v4.2.11) (2021-10-18) @@ -30,12 +41,3 @@ -## [4.2.7](https://github.com/Ombi-app/Ombi/compare/v4.2.6...v4.2.7) (2021-10-14) - - -### Bug Fixes - -* :bug: Fixed the issue parsing TheMovieDB dates. They have broken something... ([6e397e0](https://github.com/Ombi-app/Ombi/commit/6e397e02e95f894a92e8bf02428efdcac1275b31)) - - - diff --git a/version.json b/version.json index 3851ec1a5..eb8e279ee 100644 --- a/version.json +++ b/version.json @@ -1,3 +1,3 @@ { - "version": "4.2.11" + "version": "4.2.12" } \ No newline at end of file