|
|
|
using System;
|
|
|
|
using System.Runtime.CompilerServices;
|
|
|
|
|
|
|
|
namespace NzbDrone.Core.Annotations
|
|
|
|
{
|
|
|
|
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
|
|
|
|
public class FieldDefinitionAttribute : Attribute
|
|
|
|
{
|
|
|
|
public FieldDefinitionAttribute(int order)
|
|
|
|
{
|
|
|
|
Order = order;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int Order { get; private set; }
|
|
|
|
public string Label { get; set; }
|
|
|
|
public string Unit { get; set; }
|
|
|
|
public string HelpText { get; set; }
|
|
|
|
public string HelpLink { get; set; }
|
|
|
|
public FieldType Type { get; set; }
|
|
|
|
public bool Advanced { get; set; }
|
|
|
|
public Type SelectOptions { get; set; }
|
|
|
|
public string SelectOptionsProviderAction { get; set; }
|
|
|
|
public string Section { get; set; }
|
|
|
|
public HiddenType Hidden { get; set; }
|
|
|
|
public PrivacyLevel Privacy { get; set; }
|
|
|
|
}
|
|
|
|
|
|
|
|
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false)]
|
|
|
|
public class FieldOptionAttribute : Attribute
|
|
|
|
{
|
|
|
|
public FieldOptionAttribute(string label = null, [CallerLineNumber] int order = 0)
|
|
|
|
{
|
|
|
|
Order = order;
|
|
|
|
Label = label;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int Order { get; private set; }
|
|
|
|
public string Label { get; set; }
|
|
|
|
public string Hint { get; set; }
|
|
|
|
}
|
|
|
|
|
|
|
|
public class FieldSelectOption
|
|
|
|
{
|
|
|
|
public int Value { get; set; }
|
|
|
|
public string Name { get; set; }
|
|
|
|
public int Order { get; set; }
|
|
|
|
public string Hint { get; set; }
|
|
|
|
public int? ParentValue { get; set; }
|
|
|
|
}
|
|
|
|
|
|
|
|
public enum FieldType
|
|
|
|
{
|
|
|
|
Textbox,
|
|
|
|
Number,
|
|
|
|
Password,
|
|
|
|
Checkbox,
|
|
|
|
Select,
|
|
|
|
Path,
|
|
|
|
FilePath,
|
|
|
|
Tag,
|
New: Add Webhook support to sonarr
Add Form type url (type=url input field)
Add isValidUrl input type validation
Only allow absolute urls when checking if a url is valid
String => string as per comments that sonarr is standarizing on the lowercase primative
Remove this before function calls
Refactored everything so OnGrab is supported
Don't double submit the webhook
Wrappers around Series, EpisodeFile, Episode so the entire data structure isn't exposed
Add Braces as per style guide
Series.ID and Series.TvdbId should be integers
Reorder webhook payload as per style guide
Upgrade to use ongrab as json instead of string
Add method selection to webhook settings
include episode directly in download event
QualityVersion should be an int and not a string (don't convert it int=>string)
Remove the list of episodes
Add season number to episode data structure
Code Review Fixes:
* Remove episodefile from payload, move everything to episode
* Change episode to a list
convert to var as per code review / style guide
Down with internals
Everything now uses webhookpayload. None of that payload.Message stuff
{"EventType":"Test","Series":{"Id":1,"Title":"Test Title","Path":"C:\\testpath","TvdbId":1234},"Episodes":[{"Id":123,"EpisodeNumber":1,"SeasonNumber":1,"Title":"Test title","AirDate":null,"AirDateUtc":null,"Quality":null,"QualityVersion":0,"ReleaseGroup":null,"SceneName":null}]}
Remove logger and processProvider
Remove unused constructor
9 years ago
|
|
|
Action,
|
|
|
|
Url,
|
|
|
|
Captcha,
|
|
|
|
OAuth,
|
|
|
|
Device,
|
|
|
|
TagSelect
|
|
|
|
}
|
|
|
|
|
|
|
|
public enum HiddenType
|
|
|
|
{
|
|
|
|
Visible,
|
|
|
|
Hidden,
|
|
|
|
HiddenIfNotSet
|
|
|
|
}
|
|
|
|
|
|
|
|
public enum PrivacyLevel
|
|
|
|
{
|
|
|
|
Normal,
|
|
|
|
Password,
|
|
|
|
ApiKey,
|
|
|
|
UserName
|
|
|
|
}
|
|
|
|
}
|