attach indexerid and enabled fields to backend
This commit is contained in:
parent
62140201c5
commit
a51c8cee44
|
@ -12,4 +12,4 @@ namespace NzbDrone.Core.Datastore.Migration
|
|||
Alter.Table("ReleaseProfiles").AddColumn("IndexerId").AsInt32().WithDefaultValue(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -333,6 +333,7 @@
|
|||
<Compile Include="Datastore\Migration\124_remove_media_browser_metadata.cs" />
|
||||
<Compile Include="Datastore\Migration\125_remove_notify_my_android_and_pushalot_notifications.cs" />
|
||||
<Compile Include="Datastore\Migration\117_add_webrip_and_br480_qualites_in_profile.cs" />
|
||||
<Compile Include="Datastore\Migration\135_add_indexer_and_enabled_release_profiles.cs" />
|
||||
<Compile Include="Datastore\Migration\Framework\MigrationContext.cs" />
|
||||
<Compile Include="Datastore\Migration\Framework\MigrationController.cs" />
|
||||
<Compile Include="Datastore\Migration\Framework\MigrationDbFactory.cs" />
|
||||
|
|
|
@ -5,17 +5,21 @@ namespace NzbDrone.Core.Profiles.Releases
|
|||
{
|
||||
public class ReleaseProfile : ModelBase
|
||||
{
|
||||
public bool Enabled { get; set; }
|
||||
public string Required { get; set; }
|
||||
public string Ignored { get; set; }
|
||||
public List<KeyValuePair<string, int>> Preferred { get; set; }
|
||||
public bool IncludePreferredWhenRenaming { get; set; }
|
||||
public int IndexerId { get; set; }
|
||||
public HashSet<int> Tags { get; set; }
|
||||
|
||||
public ReleaseProfile()
|
||||
{
|
||||
Enabled = true;
|
||||
Preferred = new List<KeyValuePair<string, int>>();
|
||||
IncludePreferredWhenRenaming = true;
|
||||
Tags = new HashSet<int>();
|
||||
IndexerId = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,10 +7,12 @@ namespace Sonarr.Api.V3.Profiles.Release
|
|||
{
|
||||
public class ReleaseProfileResource : RestResource
|
||||
{
|
||||
public bool Enabled { get; set; }
|
||||
public string Required { get; set; }
|
||||
public string Ignored { get; set; }
|
||||
public List<KeyValuePair<string, int>> Preferred { get; set; }
|
||||
public bool IncludePreferredWhenRenaming { get; set; }
|
||||
public int IndexerId { get; set; }
|
||||
public HashSet<int> Tags { get; set; }
|
||||
|
||||
public ReleaseProfileResource()
|
||||
|
@ -29,10 +31,12 @@ namespace Sonarr.Api.V3.Profiles.Release
|
|||
{
|
||||
Id = model.Id,
|
||||
|
||||
Enabled = model.Enabled,
|
||||
Required = model.Required,
|
||||
Ignored = model.Ignored,
|
||||
Preferred = model.Preferred,
|
||||
IncludePreferredWhenRenaming = model.IncludePreferredWhenRenaming,
|
||||
IndexerId = model.IndexerId,
|
||||
Tags = new HashSet<int>(model.Tags)
|
||||
};
|
||||
}
|
||||
|
@ -45,10 +49,12 @@ namespace Sonarr.Api.V3.Profiles.Release
|
|||
{
|
||||
Id = resource.Id,
|
||||
|
||||
Enabled = resource.Enabled,
|
||||
Required = resource.Required,
|
||||
Ignored = resource.Ignored,
|
||||
Preferred = resource.Preferred,
|
||||
IncludePreferredWhenRenaming = resource.IncludePreferredWhenRenaming,
|
||||
IndexerId = resource.IndexerId,
|
||||
Tags = new HashSet<int>(resource.Tags)
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue