You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.7 KiB
51 lines
1.7 KiB
using NzbDrone.Core.Configuration;
|
|
using Radarr.Http.REST;
|
|
|
|
namespace Radarr.Api.V3.Config
|
|
{
|
|
public class UiConfigResource : RestResource
|
|
{
|
|
//Calendar
|
|
public int FirstDayOfWeek { get; set; }
|
|
public string CalendarWeekColumnHeader { get; set; }
|
|
|
|
// Movies
|
|
public MovieRuntimeFormatType MovieRuntimeFormat { get; set; }
|
|
|
|
//Dates
|
|
public string ShortDateFormat { get; set; }
|
|
public string LongDateFormat { get; set; }
|
|
public string TimeFormat { get; set; }
|
|
public bool ShowRelativeDates { get; set; }
|
|
|
|
public bool EnableColorImpairedMode { get; set; }
|
|
public int MovieInfoLanguage { get; set; }
|
|
public int UILanguage { get; set; }
|
|
public string Theme { get; set; }
|
|
}
|
|
|
|
public static class UiConfigResourceMapper
|
|
{
|
|
public static UiConfigResource ToResource(this IConfigFileProvider model, IConfigService configService)
|
|
{
|
|
return new UiConfigResource
|
|
{
|
|
FirstDayOfWeek = configService.FirstDayOfWeek,
|
|
CalendarWeekColumnHeader = configService.CalendarWeekColumnHeader,
|
|
|
|
MovieRuntimeFormat = configService.MovieRuntimeFormat,
|
|
|
|
ShortDateFormat = configService.ShortDateFormat,
|
|
LongDateFormat = configService.LongDateFormat,
|
|
TimeFormat = configService.TimeFormat,
|
|
ShowRelativeDates = configService.ShowRelativeDates,
|
|
|
|
EnableColorImpairedMode = configService.EnableColorImpairedMode,
|
|
MovieInfoLanguage = configService.MovieInfoLanguage,
|
|
UILanguage = configService.UILanguage,
|
|
Theme = model.Theme
|
|
};
|
|
}
|
|
}
|
|
}
|