mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-19 21:03:17 -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)
|
## [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
|
append_commit_message: false
|
||||||
pull_request_title: "🌐 Translations Update"
|
pull_request_title: "🌐 Translations Update"
|
||||||
pull_request_labels:
|
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("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("", "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(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)
|
if (!test)
|
||||||
{
|
{
|
||||||
// Get the users to send it to
|
var users = new List<OmbiUser>();
|
||||||
var users = await _userManager.GetUsersInRoleAsync(OmbiRoles.ReceivesNewsletter);
|
|
||||||
if (!users.Any())
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var emails in settings.ExternalEmails)
|
foreach (var emails in settings.ExternalEmails)
|
||||||
{
|
{
|
||||||
users.Add(new OmbiUser
|
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 messageContent = ParseTemplate(template, customization);
|
||||||
var email = new NewsletterTemplate();
|
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 url = GenerateUnsubscribeLink(customization.ApplicationUrl, user.Id);
|
||||||
var html = email.LoadTemplate(messageContent.Subject, messageContent.Message, body, customization.Logo, url);
|
var html = email.LoadTemplate(messageContent.Subject, messageContent.Message, body, customization.Logo, url);
|
||||||
|
|
||||||
|
@ -243,11 +249,6 @@ namespace Ombi.Schedule.Jobs.Ombi
|
||||||
Subject = messageContent.Subject
|
Subject = messageContent.Subject
|
||||||
};
|
};
|
||||||
|
|
||||||
// Get the users to send it to
|
|
||||||
if (user.Email.IsNullOrEmpty())
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
// Send the message to the user
|
// Send the message to the user
|
||||||
message.To.Add(new MailboxAddress(user.Email.Trim(), user.Email.Trim()));
|
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)
|
public static string GenerateUnsubscribeLink(string applicationUrl, string id)
|
||||||
{
|
{
|
||||||
if (!applicationUrl.HasValue())
|
if (!applicationUrl.HasValue() || !id.HasValue())
|
||||||
{
|
{
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
|
|
3
src/Ombi/.vscode/settings.json
vendored
3
src/Ombi/.vscode/settings.json
vendored
|
@ -16,6 +16,7 @@
|
||||||
"request-limits",
|
"request-limits",
|
||||||
"notifications",
|
"notifications",
|
||||||
"settings",
|
"settings",
|
||||||
"user-management"
|
"user-management",
|
||||||
|
"newsletter"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
"TvTab": "Séries",
|
"TvTab": "Séries",
|
||||||
"MusicTab": "Musique",
|
"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é",
|
"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",
|
"Suggestions": "Suggestions",
|
||||||
"NoResults": "Désolé, nous n'avons trouvé aucun résultat !",
|
"NoResults": "Désolé, nous n'avons trouvé aucun résultat !",
|
||||||
"DigitalDate": "Sortie numérique: {{date}}",
|
"DigitalDate": "Sortie numérique: {{date}}",
|
||||||
|
@ -125,9 +125,9 @@
|
||||||
"Season": "Saison {{seasonNumber}}",
|
"Season": "Saison {{seasonNumber}}",
|
||||||
"SelectAllInSeason": "Tout sélectionner dans la saison {{seasonNumber}}"
|
"SelectAllInSeason": "Tout sélectionner dans la saison {{seasonNumber}}"
|
||||||
},
|
},
|
||||||
"AdvancedSearchInstructions": "Please choose what type of media you are searching for:",
|
"AdvancedSearchInstructions": "Veuillez choisir le type de média que vous recherchez :",
|
||||||
"YearOfRelease": "Year of Release",
|
"YearOfRelease": "Année de sortie",
|
||||||
"KeywordSearchingDisclaimer": "Please note that Keyword Searching is very hit and miss due to the inconsistent data in TheMovieDb"
|
"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": {
|
"Requests": {
|
||||||
"Title": "Demandes",
|
"Title": "Demandes",
|
||||||
|
@ -218,7 +218,7 @@
|
||||||
"DescriptionPlaceholder": "Veuillez décrire le problème rencontré",
|
"DescriptionPlaceholder": "Veuillez décrire le problème rencontré",
|
||||||
"TitlePlaceholder": "Titre court de votre problème",
|
"TitlePlaceholder": "Titre court de votre problème",
|
||||||
"SelectCategory": "Sélectionner une catégorie",
|
"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",
|
"Outstanding": "Des rapports d'erreurs sont en attente",
|
||||||
"ResolvedDate": "Date de résolution",
|
"ResolvedDate": "Date de résolution",
|
||||||
|
@ -236,8 +236,8 @@
|
||||||
"FilterHeaderRequestStatus": "Statut",
|
"FilterHeaderRequestStatus": "Statut",
|
||||||
"Approved": "Validée",
|
"Approved": "Validée",
|
||||||
"PendingApproval": "En attente de validation",
|
"PendingApproval": "En attente de validation",
|
||||||
"WatchProviders": "Watch Providers",
|
"WatchProviders": "Fournisseurs de contenu",
|
||||||
"Keywords": "Keywords"
|
"Keywords": "Mots-clés"
|
||||||
},
|
},
|
||||||
"UserManagment": {
|
"UserManagment": {
|
||||||
"TvRemaining": "TV : {{remaining}}/{{total}} restant(s)",
|
"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