Customized Scheduler + Saved Kavita+ Details (#2644)
This commit is contained in:
parent
2092e120c3
commit
ad74871623
76 changed files with 6076 additions and 3370 deletions
|
@ -14,16 +14,13 @@ public static class CronConverter
|
|||
};
|
||||
public static string ConvertToCronNotation(string source)
|
||||
{
|
||||
var destination = string.Empty;
|
||||
destination = source.ToLower() switch
|
||||
return source.ToLower() switch
|
||||
{
|
||||
"daily" => Cron.Daily(),
|
||||
"weekly" => Cron.Weekly(),
|
||||
"disabled" => Cron.Never(),
|
||||
"" => Cron.Never(),
|
||||
_ => destination
|
||||
_ => source
|
||||
};
|
||||
|
||||
return destination;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,6 +77,7 @@ public static class FilterFieldValueConverter
|
|||
.Select(x => (MangaFormat) Enum.Parse(typeof(MangaFormat), x))
|
||||
.ToList(),
|
||||
FilterField.ReadTime => int.Parse(value),
|
||||
FilterField.AverageRating => float.Parse(value),
|
||||
_ => throw new ArgumentException("Invalid field type")
|
||||
};
|
||||
}
|
||||
|
|
|
@ -23,12 +23,15 @@ public class ServerSettingConverter : ITypeConverter<IEnumerable<ServerSetting>,
|
|||
case ServerSettingKey.TaskScan:
|
||||
destination.TaskScan = row.Value;
|
||||
break;
|
||||
case ServerSettingKey.LoggingLevel:
|
||||
destination.LoggingLevel = row.Value;
|
||||
break;
|
||||
case ServerSettingKey.TaskBackup:
|
||||
destination.TaskBackup = row.Value;
|
||||
break;
|
||||
case ServerSettingKey.TaskCleanup:
|
||||
destination.TaskCleanup = row.Value;
|
||||
break;
|
||||
case ServerSettingKey.LoggingLevel:
|
||||
destination.LoggingLevel = row.Value;
|
||||
break;
|
||||
case ServerSettingKey.Port:
|
||||
destination.Port = int.Parse(row.Value);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue