diff --git a/src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs b/src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs index 9f5e58482..88125b7c6 100644 --- a/src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs +++ b/src/Ombi.Schedule/Jobs/Ombi/NewsletterJob.cs @@ -98,7 +98,7 @@ namespace Ombi.Schedule.Jobs.Ombi // Get the Content var plexContent = _plex.GetAll().Include(x => x.Episodes).AsNoTracking(); var embyContent = _emby.GetAll().Include(x => x.Episodes).AsNoTracking(); - var lidarrContent = _lidarrAlbumRepository.GetAll().AsNoTracking(); + var lidarrContent = _lidarrAlbumRepository.GetAll().Where(x => x.FullyAvailable).AsNoTracking(); var addedLog = _recentlyAddedLog.GetAll(); var addedPlexMovieLogIds = addedLog.Where(x => x.Type == RecentlyAddedType.Plex && x.ContentType == ContentType.Parent).Select(x => x.ContentId); diff --git a/src/Ombi/ClientApp/app/app.component.html b/src/Ombi/ClientApp/app/app.component.html index 953e2a9a2..d695ac61c 100644 --- a/src/Ombi/ClientApp/app/app.component.html +++ b/src/Ombi/ClientApp/app/app.component.html @@ -117,37 +117,37 @@ diff --git a/src/Ombi/ClientApp/app/requests/movierequests.component.html b/src/Ombi/ClientApp/app/requests/movierequests.component.html index 6167fbac0..a1dd5cadc 100644 --- a/src/Ombi/ClientApp/app/requests/movierequests.component.html +++ b/src/Ombi/ClientApp/app/requests/movierequests.component.html @@ -129,7 +129,7 @@ -
+
@@ -145,7 +145,7 @@
-
+
@@ -166,11 +166,7 @@
-
- -
+
+
-
- -
+
+
+
+ +
diff --git a/src/Ombi/ClientApp/app/requests/tvrequest-children.component.ts b/src/Ombi/ClientApp/app/requests/tvrequest-children.component.ts index 19e941e9d..bc792a55b 100644 --- a/src/Ombi/ClientApp/app/requests/tvrequest-children.component.ts +++ b/src/Ombi/ClientApp/app/requests/tvrequest-children.component.ts @@ -10,6 +10,7 @@ import { NotificationService, RequestService } from "../services"; export class TvRequestChildrenComponent { @Input() public childRequests: IChildRequests[]; @Input() public isAdmin: boolean; + @Input() public currentUser: string; @Output() public requestDeleted = new EventEmitter(); @@ -110,10 +111,18 @@ export class TvRequestChildrenComponent { }); } + public isRequestUser(request: IChildRequests) { + if (request.requestedUser.userName === this.currentUser) { + return true; + } + return false; + } + private removeRequestFromUi(key: IChildRequests) { const index = this.childRequests.indexOf(key, 0); if (index > -1) { this.childRequests.splice(index, 1); } } + } diff --git a/src/Ombi/ClientApp/app/requests/tvrequests.component.html b/src/Ombi/ClientApp/app/requests/tvrequests.component.html index e4d10d72e..7c5e13479 100644 --- a/src/Ombi/ClientApp/app/requests/tvrequests.component.html +++ b/src/Ombi/ClientApp/app/requests/tvrequests.component.html @@ -50,7 +50,7 @@ View
-
+
@@ -66,7 +66,7 @@
-
+
@@ -99,7 +99,7 @@
- +

diff --git a/src/Ombi/ClientApp/app/requests/tvrequests.component.ts b/src/Ombi/ClientApp/app/requests/tvrequests.component.ts index 144de0206..924fccd1f 100644 --- a/src/Ombi/ClientApp/app/requests/tvrequests.component.ts +++ b/src/Ombi/ClientApp/app/requests/tvrequests.component.ts @@ -20,6 +20,7 @@ export class TvRequestsComponent implements OnInit { public searchChanged = new Subject(); public searchText: string; public isAdmin: boolean; + public currentUser: string; public showChildDialogue = false; // This is for the child modal popup public selectedSeason: ITvRequests; public defaultPoster: string; @@ -48,6 +49,7 @@ export class TvRequestsComponent implements OnInit { private readonly platformLocation: PlatformLocation) { this.isAdmin = this.auth.hasRole("admin") || this.auth.hasRole("poweruser"); + this.currentUser = this.auth.claims().name; if (this.isAdmin) { this.sonarrService.getQualityProfilesWithoutSettings() .subscribe(x => this.sonarrProfiles = x); diff --git a/src/Ombi/Controllers/External/RadarrController.cs b/src/Ombi/Controllers/External/RadarrController.cs index 128b1a9e2..623322704 100644 --- a/src/Ombi/Controllers/External/RadarrController.cs +++ b/src/Ombi/Controllers/External/RadarrController.cs @@ -3,7 +3,6 @@ using System.Collections.Generic; using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using Microsoft.Extensions.Caching.Memory; using Ombi.Api.Radarr; using Ombi.Api.Radarr.Models; using Ombi.Attributes; @@ -13,9 +12,9 @@ using Ombi.Settings.Settings.Models.External; namespace Ombi.Controllers.External { - [Authorize] - [ApiV1] - [Produces("application/json")] + [Authorize] + [ApiV1] + [Produces("application/json")] public class RadarrController : Controller { public RadarrController(IRadarrApi radarr, ISettingsService settings, @@ -24,6 +23,7 @@ namespace Ombi.Controllers.External RadarrApi = radarr; RadarrSettings = settings; Cache = mem; + RadarrSettings.ClearCache(); } private IRadarrApi RadarrApi { get; } @@ -59,17 +59,15 @@ namespace Ombi.Controllers.External /// /// [HttpGet("Profiles")] + [PowerUser] public async Task> GetProfiles() { - return await Cache.GetOrAdd(CacheKeys.RadarrQualityProfiles, async () => + var settings = await RadarrSettings.GetSettingsAsync(); + if (settings.Enabled) { - var settings = await RadarrSettings.GetSettingsAsync(); - if (settings.Enabled) - { - return await RadarrApi.GetProfiles(settings.ApiKey, settings.FullUri); - } - return null; - }, DateTime.Now.AddHours(1)); + return await RadarrApi.GetProfiles(settings.ApiKey, settings.FullUri); + } + return null; } /// @@ -78,17 +76,15 @@ namespace Ombi.Controllers.External /// /// [HttpGet("RootFolders")] + [PowerUser] public async Task> GetRootFolders() { - return await Cache.GetOrAdd(CacheKeys.RadarrRootProfiles, async () => + var settings = await RadarrSettings.GetSettingsAsync(); + if (settings.Enabled) { - var settings = await RadarrSettings.GetSettingsAsync(); - if (settings.Enabled) - { - return await RadarrApi.GetRootFolders(settings.ApiKey, settings.FullUri); - } - return null; - }, DateTime.Now.AddHours(1)); + return await RadarrApi.GetRootFolders(settings.ApiKey, settings.FullUri); + } + return null; } } } \ No newline at end of file diff --git a/src/Ombi/Controllers/External/SonarrController.cs b/src/Ombi/Controllers/External/SonarrController.cs index 94d1e3edf..c3401736d 100644 --- a/src/Ombi/Controllers/External/SonarrController.cs +++ b/src/Ombi/Controllers/External/SonarrController.cs @@ -20,6 +20,7 @@ namespace Ombi.Controllers.External { SonarrApi = sonarr; SonarrSettings = settings; + SonarrSettings.ClearCache(); } private ISonarrApi SonarrApi { get; } @@ -54,6 +55,7 @@ namespace Ombi.Controllers.External /// /// [HttpGet("Profiles")] + [PowerUser] public async Task> GetProfiles() { var settings = await SonarrSettings.GetSettingsAsync(); @@ -69,6 +71,7 @@ namespace Ombi.Controllers.External /// /// [HttpGet("RootFolders")] + [PowerUser] public async Task> GetRootFolders() { var settings = await SonarrSettings.GetSettingsAsync(); diff --git a/src/Ombi/wwwroot/translations/da.json b/src/Ombi/wwwroot/translations/da.json index 0229b3603..05214732e 100644 --- a/src/Ombi/wwwroot/translations/da.json +++ b/src/Ombi/wwwroot/translations/da.json @@ -12,8 +12,8 @@ "Common": { "ContinueButton": "Fortsæt", "Available": "Tilgængelig", - "PartiallyAvailable": "Partially Available", - "Monitored": "Monitored", + "PartiallyAvailable": "Delvist tilgængelig", + "Monitored": "Overvåget", "NotAvailable": "Ikke tilgængelig", "ProcessingRequest": "Behandler anmodning", "PendingApproval": "Afventer godkendelse", @@ -48,7 +48,7 @@ "Requests": "Anmodninger", "UserManagement": "Brugeradministration", "Issues": "Problemer", - "Vote": "Vote", + "Vote": "Stem", "Donate": "Donér!", "DonateLibraryMaintainer": "Donér til vedligeholder af bibliotek", "DonateTooltip": "Sådan overbeviser jeg min kone om, at jeg skal bruge min fritid på at udvikle Ombi :)", @@ -57,36 +57,23 @@ "Welcome": "Velkommen til {{username}}", "UpdateDetails": "Opdater loginoplysninger", "Logout": "Log af", - "Language": { - "English": "Engelsk", - "French": "Fransk", - "Spanish": "Spansk", - "German": "Tysk", - "Italian": "Italiensk", - "Danish": "Dansk", - "Dutch": "Hollandsk", - "Norwegian": "Norsk", - "BrazillianPortuguese": "Brazillian Portuguese", - "Polish": "Polish", - "Swedish": "Swedish" - }, "OpenMobileApp": "Åbn mobilapp", - "RecentlyAdded": "Recently Added" + "RecentlyAdded": "Senest tilføjet" }, "Search": { "Title": "Søg", "Paragraph": "Ønsker du at se noget, som er utilgængeligt? intet problem, bare søg efter det nedenfor og anmod om det!", "MoviesTab": "Film", "TvTab": "Tv-serier", - "MusicTab": "Music", + "MusicTab": "Musik", "Suggestions": "Forslag", "NoResults": "Beklager, vi fandt ingen resultater!", - "DigitalDate": "Digital Release: {{date}}", - "TheatricalRelease": "Theatrical Release: {{date}}", + "DigitalDate": "Digital udgivelse: {{date}}", + "TheatricalRelease": "Biografudgivelse: {{date}}", "ViewOnPlex": "Se på Plex", "ViewOnEmby": "Se på Emby", "RequestAdded": "{{title}} er anmodet med succes", - "Similar": "Similar", + "Similar": "Lignende", "Movies": { "PopularMovies": "Populære film", "UpcomingMovies": "Kommende film", @@ -116,15 +103,15 @@ "Paragraph": "Herunder kan du se dine og alle andre anmodninger, samt status for download og godkendelse.", "MoviesTab": "Film", "TvTab": "Tv-serier", - "MusicTab": "Music", + "MusicTab": "Musik", "RequestedBy": "Anmodet af:", "Status": "Status:", "RequestStatus": "Status for anmodning:", "Denied": " Afvist:", - "TheatricalRelease": "Theatrical Release: {{date}}", - "ReleaseDate": "Released: {{date}}", - "TheatricalReleaseSort": "Theatrical Release", - "DigitalRelease": "Digital Release: {{date}}", + "TheatricalRelease": "Biografudgivelse: {{date}}", + "ReleaseDate": "Udgivet: {{date}}", + "TheatricalReleaseSort": "Biografudgivelse", + "DigitalRelease": "Digital udgivelse: {{date}}", "RequestDate": "Dato for anmodning:", "QualityOverride": "Tilsidesæt kvalitet:", "RootFolderOverride": "Tilsidesæt rodmappe:", @@ -140,20 +127,20 @@ "GridStatus": "Status", "ReportIssue": "Rapportér problem", "Filter": "Filter", - "Sort": "Sort", + "Sort": "Sorter", "SeasonNumberHeading": "Sæson: {seasonNumber}", - "SortTitleAsc": "Title ▲", - "SortTitleDesc": "Title ▼", - "SortRequestDateAsc": "Request Date ▲", - "SortRequestDateDesc": "Request Date ▼", + "SortTitleAsc": "Titel ▲", + "SortTitleDesc": "Titel ▼", + "SortRequestDateAsc": "Dato for anmodning ▲", + "SortRequestDateDesc": "Dato for anmodning ▼", "SortStatusAsc": "Status ▲", "SortStatusDesc": "Status ▼", "Remaining": { - "Quota": "{{remaining}}/{{total}} requests remaining", - "NextDays": "Another request will be added in {{time}} days", - "NextHours": "Another request will be added in {{time}} hours", - "NextMinutes": "Another request will be added in {{time}} minutes", - "NextMinute": "Another request will be added in {{time}} minute" + "Quota": "{{remaining}}/{{total}} anmodninger, der er tilbage", + "NextDays": "En anden anmodning vil blive tilføjet i {{time}} Dage", + "NextHours": "En anden anmodning vil blive tilføjet i {{time}} Timer", + "NextMinutes": "En anden anmodning vil blive tilføjet i {{time}} Minutter", + "NextMinute": "En anden anmodning vil blive tilføjet i {{time}} Minut" } }, "Issues": { @@ -180,18 +167,18 @@ "FilterHeaderAvailability": "Tilgængelighed", "FilterHeaderRequestStatus": "Status", "Approved": "Godkendt", - "PendingApproval": "Pending Approval" + "PendingApproval": "Afventer godkendelse" }, "UserManagment": { - "TvRemaining": "TV: {{remaining}}/{{total}} remaining", - "MovieRemaining": "Movies: {{remaining}}/{{total}} remaining", - "MusicRemaining": "Music: {{remaining}}/{{total}} remaining", - "TvDue": "TV: {{date}}", - "MovieDue": "Movie: {{date}}", - "MusicDue": "Music: {{date}}" + "TvRemaining": "Tv: {{remaining}}/{{total}} Resterende", + "MovieRemaining": "Film: {{remaining}}/{{total}} Resterende", + "MusicRemaining": "Musik: {{remaining}}/{{total}} Resterende", + "TvDue": "Tv: {{date}}", + "MovieDue": "Film: {{date}}", + "MusicDue": "Musik: {{date}}" }, "Votes": { - "CompletedVotesTab": "Voted", - "VotesTab": "Votes Needed" + "CompletedVotesTab": "Stemt", + "VotesTab": "Nødvendige stemmer" } } \ No newline at end of file diff --git a/src/Ombi/wwwroot/translations/de.json b/src/Ombi/wwwroot/translations/de.json index c3646221d..2dccedb1f 100644 --- a/src/Ombi/wwwroot/translations/de.json +++ b/src/Ombi/wwwroot/translations/de.json @@ -57,19 +57,6 @@ "Welcome": "Willkommen {{username}}", "UpdateDetails": "Update-Details", "Logout": "Ausloggen", - "Language": { - "English": "Englisch", - "French": "Französisch", - "Spanish": "Spanisch", - "German": "Deutsch", - "Italian": "Italienisch", - "Danish": "Dänisch", - "Dutch": "Niederländisch", - "Norwegian": "Norwegisch", - "BrazillianPortuguese": "Portugiesisch (Brasilien)", - "Polish": "Polnisch", - "Swedish": "Schwedisch" - }, "OpenMobileApp": "Mobile App", "RecentlyAdded": "Kürzlich hinzugefügt" }, diff --git a/src/Ombi/wwwroot/translations/en.json b/src/Ombi/wwwroot/translations/en.json index 93f6c39f0..2d6d81e94 100644 --- a/src/Ombi/wwwroot/translations/en.json +++ b/src/Ombi/wwwroot/translations/en.json @@ -60,19 +60,6 @@ "Welcome": "Welcome {{username}}", "UpdateDetails": "Update Details", "Logout": "Logout", - "Language": { - "English": "English", - "French": "French", - "Spanish": "Spanish", - "German": "German", - "Italian": "Italian", - "Danish": "Danish", - "Dutch": "Dutch", - "Norwegian":"Norwegian", - "BrazillianPortuguese": "Brazillian Portuguese", - "Polish":"Polish", - "Swedish":"Swedish" - }, "OpenMobileApp":"Open Mobile App", "RecentlyAdded":"Recently Added" }, diff --git a/src/Ombi/wwwroot/translations/es.json b/src/Ombi/wwwroot/translations/es.json index dc7637e79..a9f8c2b5e 100644 --- a/src/Ombi/wwwroot/translations/es.json +++ b/src/Ombi/wwwroot/translations/es.json @@ -57,19 +57,6 @@ "Welcome": "Bienvenido {{username}}", "UpdateDetails": "Detalles de la actualización", "Logout": "Cerrar sesión", - "Language": { - "English": "Inglés", - "French": "Francés", - "Spanish": "Español", - "German": "Alemán", - "Italian": "Italiano", - "Danish": "Danés", - "Dutch": "Holandés", - "Norwegian": "Norwegian", - "BrazillianPortuguese": "Brazillian Portuguese", - "Polish": "Polish", - "Swedish": "Swedish" - }, "OpenMobileApp": "Open Mobile App", "RecentlyAdded": "Recently Added" }, diff --git a/src/Ombi/wwwroot/translations/fr.json b/src/Ombi/wwwroot/translations/fr.json index c20dffdb0..bf6e26a93 100644 --- a/src/Ombi/wwwroot/translations/fr.json +++ b/src/Ombi/wwwroot/translations/fr.json @@ -57,19 +57,6 @@ "Welcome": "Bienvenue {{username}}", "UpdateDetails": "Détails de la mise à jour", "Logout": "Déconnexion", - "Language": { - "English": "Anglais", - "French": "Français", - "Spanish": "Espagnol", - "German": "Allemand", - "Italian": "Italien", - "Danish": "Danois", - "Dutch": "Néerlandais", - "Norwegian": "Norvégien", - "BrazillianPortuguese": "Portuguais brésilien", - "Polish": "Polonais", - "Swedish": "Swedish" - }, "OpenMobileApp": "Ouvrir l'application mobile", "RecentlyAdded": "Ajouts récents" }, diff --git a/src/Ombi/wwwroot/translations/it.json b/src/Ombi/wwwroot/translations/it.json index 0ade93919..bfa026be0 100644 --- a/src/Ombi/wwwroot/translations/it.json +++ b/src/Ombi/wwwroot/translations/it.json @@ -57,19 +57,6 @@ "Welcome": "Benvenuto {{username}}", "UpdateDetails": "Aggiorna i tuoi dati", "Logout": "Logout", - "Language": { - "English": "Inglese", - "French": "Francese", - "Spanish": "Spagnolo", - "German": "Tedesco", - "Italian": "Italiano", - "Danish": "Danese", - "Dutch": "Olandese", - "Norwegian": "Norvegese", - "BrazillianPortuguese": "Brazillian Portuguese", - "Polish": "Polish", - "Swedish": "Swedish" - }, "OpenMobileApp": "Apri l'applicazione mobile", "RecentlyAdded": "Recently Added" }, diff --git a/src/Ombi/wwwroot/translations/nl.json b/src/Ombi/wwwroot/translations/nl.json index 18a1d319d..24ce67966 100644 --- a/src/Ombi/wwwroot/translations/nl.json +++ b/src/Ombi/wwwroot/translations/nl.json @@ -57,19 +57,6 @@ "Welcome": "Welkom {{username}}", "UpdateDetails": "Update gegevens", "Logout": "Logout", - "Language": { - "English": "Engels", - "French": "Frans", - "Spanish": "Spaans", - "German": "Duits", - "Italian": "Italiaans", - "Danish": "Deens", - "Dutch": "Nederlands", - "Norwegian": "Noors", - "BrazillianPortuguese": "Brazillian Portuguese", - "Polish": "Polish", - "Swedish": "Swedish" - }, "OpenMobileApp": "Open Mobiele App", "RecentlyAdded": "Recently Added" }, diff --git a/src/Ombi/wwwroot/translations/no.json b/src/Ombi/wwwroot/translations/no.json index 80cd9e31a..6f84943a8 100644 --- a/src/Ombi/wwwroot/translations/no.json +++ b/src/Ombi/wwwroot/translations/no.json @@ -57,19 +57,6 @@ "Welcome": "Velkommen {{username}}", "UpdateDetails": "Oppdater detaljer", "Logout": "Logg av", - "Language": { - "English": "Engelsk", - "French": "Fransk", - "Spanish": "Spansk", - "German": "Tysk", - "Italian": "Italiensk", - "Danish": "Dansk", - "Dutch": "Nederlandsk", - "Norwegian": "Norsk", - "BrazillianPortuguese": "Brazillian Portuguese", - "Polish": "Polish", - "Swedish": "Swedish" - }, "OpenMobileApp": "Åpne mobilapp", "RecentlyAdded": "Recently Added" }, diff --git a/src/Ombi/wwwroot/translations/pl.json b/src/Ombi/wwwroot/translations/pl.json index 3aba4da41..b53f7f1c1 100644 --- a/src/Ombi/wwwroot/translations/pl.json +++ b/src/Ombi/wwwroot/translations/pl.json @@ -57,19 +57,6 @@ "Welcome": "Witaj {{username}}", "UpdateDetails": "Podaj szczegóły", "Logout": "Wyloguj", - "Language": { - "English": "Angielski", - "French": "Francuski", - "Spanish": "Hiszpański", - "German": "Niemiecki", - "Italian": "Włoski", - "Danish": "Duński", - "Dutch": "Holenderski", - "Norwegian": "Norweski", - "BrazillianPortuguese": "Brazylijski portugalski", - "Polish": "Polski", - "Swedish": "Swedish" - }, "OpenMobileApp": "Otwórz aplikację mobilną", "RecentlyAdded": "Ostatnio dodane" }, diff --git a/src/Ombi/wwwroot/translations/pt.json b/src/Ombi/wwwroot/translations/pt.json index eaf45cac9..199f06593 100644 --- a/src/Ombi/wwwroot/translations/pt.json +++ b/src/Ombi/wwwroot/translations/pt.json @@ -57,19 +57,6 @@ "Welcome": "Bem-vindo, {{username}}", "UpdateDetails": "Detalhes da Atualização", "Logout": "Sair", - "Language": { - "English": "Inglês", - "French": "Francês", - "Spanish": "Espanhol", - "German": "Alemão", - "Italian": "Italiano", - "Danish": "Dinamarquês", - "Dutch": "Holandês", - "Norwegian": "Norueguês", - "BrazillianPortuguese": "Português (Brasil)", - "Polish": "Polonês", - "Swedish": "Swedish" - }, "OpenMobileApp": "Abrir aplicativo do celular", "RecentlyAdded": "Recentemente adicionado" }, diff --git a/src/Ombi/wwwroot/translations/sv.json b/src/Ombi/wwwroot/translations/sv.json index 8d2e8374a..6da35d413 100644 --- a/src/Ombi/wwwroot/translations/sv.json +++ b/src/Ombi/wwwroot/translations/sv.json @@ -57,19 +57,6 @@ "Welcome": "Välkommen {{username}}", "UpdateDetails": "Uppdatera information", "Logout": "Logga ut", - "Language": { - "English": "Engelska", - "French": "Franska", - "Spanish": "Spanska", - "German": "Tyska", - "Italian": "Italienska", - "Danish": "Danska", - "Dutch": "Holländska", - "Norwegian": "Norska", - "BrazillianPortuguese": "Brazillian portugisiska", - "Polish": "Polska", - "Swedish": "Swedish" - }, "OpenMobileApp": "Öppna Mobil App", "RecentlyAdded": "Nyligen tillagda" },