Merge branch 'develop' into feature/2407-native-language-selector

pull/2571/head
Jamie 6 years ago committed by GitHub
commit e20f2dfc1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -129,7 +129,7 @@
</form>
<!--Radarr Root Folder-->
<div *ngIf="radarrRootFolders" class="btn-group btn-split" id="rootFolderBtn">
<div *ngIf="radarrRootFolders?.length > 1" class="btn-group btn-split" id="rootFolderBtn">
<button type="button" class="btn btn-sm btn-warning-outline">
<i class="fa fa-plus"></i> {{ 'Requests.ChangeRootFolder' | translate }}
</button>
@ -145,7 +145,7 @@
</div>
<!--Radarr Quality Profiles -->
<div *ngIf="radarrProfiles" class="btn-group btn-split" id="changeQualityBtn">
<div *ngIf="radarrProfiles?.length > 1" class="btn-group btn-split" id="changeQualityBtn">
<button type="button" class="btn btn-sm btn-warning-outline">
<i class="fa fa-plus"></i> {{ 'Requests.ChangeQualityProfile' | translate }}
</button>

@ -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<RadarrSettings> 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
/// </summary>
/// <returns></returns>
[HttpGet("Profiles")]
[PowerUser]
public async Task<IEnumerable<RadarrProfile>> 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;
}
/// <summary>
@ -78,17 +76,15 @@ namespace Ombi.Controllers.External
/// </summary>
/// <returns></returns>
[HttpGet("RootFolders")]
[PowerUser]
public async Task<IEnumerable<RadarrRootFolder>> 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;
}
}
}

@ -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
/// </summary>
/// <returns></returns>
[HttpGet("Profiles")]
[PowerUser]
public async Task<IEnumerable<SonarrProfile>> GetProfiles()
{
var settings = await SonarrSettings.GetSettingsAsync();
@ -69,6 +71,7 @@ namespace Ombi.Controllers.External
/// </summary>
/// <returns></returns>
[HttpGet("RootFolders")]
[PowerUser]
public async Task<IEnumerable<SonarrRootFolder>> GetRootFolders()
{
var settings = await SonarrSettings.GetSettingsAsync();

@ -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 :)",
@ -58,22 +58,22 @@
"UpdateDetails": "Opdater loginoplysninger",
"Logout": "Log af",
"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",
@ -103,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:",
@ -127,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": {
@ -167,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"
}
}
Loading…
Cancel
Save