2020-01-03 12:49:24 +00:00
|
|
|
|
using Lidarr.Http.REST;
|
|
|
|
|
using NzbDrone.Core.Configuration;
|
2017-09-04 02:20:56 +00:00
|
|
|
|
|
2017-10-31 01:28:29 +00:00
|
|
|
|
namespace Lidarr.Api.V1.Config
|
2017-09-04 02:20:56 +00:00
|
|
|
|
{
|
|
|
|
|
public class UiConfigResource : RestResource
|
|
|
|
|
{
|
|
|
|
|
//Calendar
|
|
|
|
|
public int FirstDayOfWeek { get; set; }
|
|
|
|
|
public string CalendarWeekColumnHeader { 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; }
|
2021-10-02 01:03:57 +00:00
|
|
|
|
public int UILanguage { get; set; }
|
2019-03-05 01:16:56 +00:00
|
|
|
|
|
|
|
|
|
public bool ExpandAlbumByDefault { get; set; }
|
|
|
|
|
public bool ExpandSingleByDefault { get; set; }
|
|
|
|
|
public bool ExpandEPByDefault { get; set; }
|
|
|
|
|
public bool ExpandBroadcastByDefault { get; set; }
|
|
|
|
|
public bool ExpandOtherByDefault { get; set; }
|
2022-10-17 23:51:55 +00:00
|
|
|
|
public string Theme { get; set; }
|
2017-09-04 02:20:56 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static class UiConfigResourceMapper
|
|
|
|
|
{
|
2022-10-17 23:51:55 +00:00
|
|
|
|
public static UiConfigResource ToResource(IConfigFileProvider config, IConfigService model)
|
2017-09-04 02:20:56 +00:00
|
|
|
|
{
|
|
|
|
|
return new UiConfigResource
|
|
|
|
|
{
|
|
|
|
|
FirstDayOfWeek = model.FirstDayOfWeek,
|
|
|
|
|
CalendarWeekColumnHeader = model.CalendarWeekColumnHeader,
|
|
|
|
|
|
|
|
|
|
ShortDateFormat = model.ShortDateFormat,
|
|
|
|
|
LongDateFormat = model.LongDateFormat,
|
|
|
|
|
TimeFormat = model.TimeFormat,
|
|
|
|
|
ShowRelativeDates = model.ShowRelativeDates,
|
|
|
|
|
|
|
|
|
|
EnableColorImpairedMode = model.EnableColorImpairedMode,
|
2021-10-02 01:03:57 +00:00
|
|
|
|
UILanguage = model.UILanguage,
|
2019-03-05 01:16:56 +00:00
|
|
|
|
|
|
|
|
|
ExpandAlbumByDefault = model.ExpandAlbumByDefault,
|
|
|
|
|
ExpandSingleByDefault = model.ExpandSingleByDefault,
|
|
|
|
|
ExpandEPByDefault = model.ExpandEPByDefault,
|
|
|
|
|
ExpandBroadcastByDefault = model.ExpandBroadcastByDefault,
|
2022-10-17 23:51:55 +00:00
|
|
|
|
ExpandOtherByDefault = model.ExpandOtherByDefault,
|
|
|
|
|
Theme = config.Theme
|
2017-09-04 02:20:56 +00:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|