New: Add runtime format option in Settings > UI so users can choose between a mins view and h/m view

This commit is contained in:
nitsua
2020-08-29 11:41:03 -04:00
committed by Qstick
parent 361ffe353d
commit 3548433a10
13 changed files with 82 additions and 30 deletions

View File

@@ -5,6 +5,7 @@ using System.Linq;
using NLog;
using NzbDrone.Common.EnsureThat;
using NzbDrone.Common.Http.Proxy;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.Configuration.Events;
using NzbDrone.Core.Languages;
using NzbDrone.Core.MediaFiles;
@@ -336,6 +337,13 @@ namespace NzbDrone.Core.Configuration
set { SetValue("CalendarWeekColumnHeader", value); }
}
public MovieRuntimeFormatType MovieRuntimeFormat
{
get { return GetValueEnum("MovieRuntimeFormat", MovieRuntimeFormatType.HoursMinutes); }
set { SetValue("MovieRuntimeFormat", value); }
}
public string ShortDateFormat
{
get { return GetValue("ShortDateFormat", "MMM D YYYY"); }

View File

@@ -1,5 +1,6 @@
using System.Collections.Generic;
using NzbDrone.Common.Http.Proxy;
using NzbDrone.Core.Configuration;
using NzbDrone.Core.MediaFiles;
using NzbDrone.Core.MetadataSource.SkyHook.Resource;
using NzbDrone.Core.Security;
@@ -68,6 +69,7 @@ namespace NzbDrone.Core.Configuration
//UI
int FirstDayOfWeek { get; set; }
string CalendarWeekColumnHeader { get; set; }
MovieRuntimeFormatType MovieRuntimeFormat { get; set; }
string ShortDateFormat { get; set; }
string LongDateFormat { get; set; }

View File

@@ -0,0 +1,8 @@
namespace NzbDrone.Core.Configuration
{
public enum MovieRuntimeFormatType
{
HoursMinutes,
Minutes
}
}

View File

@@ -523,6 +523,7 @@
"SettingsRemotePathMappingLocalPathHelpText": "Path that Radarr should use to access the remote path locally",
"SettingsRemotePathMappingRemotePath": "Remote Path",
"SettingsRemotePathMappingRemotePathHelpText": "Root path to the directory that the Download Client accesses",
"SettingsRuntimeFormat": "Runtime Format",
"SettingsShortDateFormat": "Short Date Format",
"SettingsShowRelativeDates": "Show Relative Dates",
"SettingsShowRelativeDatesHelpText": "Show relative (Today/Yesterday/etc) or absolute dates",