mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 10:36:54 -07:00
Merge remote-tracking branch 'upstream/develop' into localization
This commit is contained in:
commit
49de3f530f
7 changed files with 41 additions and 35 deletions
20
CHANGELOG.md
20
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))
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<OmbiUser>();
|
||||
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;
|
||||
}
|
||||
|
|
3
src/Ombi/.vscode/settings.json
vendored
3
src/Ombi/.vscode/settings.json
vendored
|
@ -16,6 +16,7 @@
|
|||
"request-limits",
|
||||
"notifications",
|
||||
"settings",
|
||||
"user-management"
|
||||
"user-management",
|
||||
"newsletter"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -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",
|
||||
|
@ -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 ▲",
|
||||
|
@ -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)",
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"version": "4.2.11"
|
||||
"version": "4.2.12"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue