mirror of
https://github.com/Radarr/Radarr.git
synced 2024-09-17 15:02:34 +02:00
New: Store date series was added in database
This commit is contained in:
parent
5fed3670c8
commit
4c3daf7e39
@ -0,0 +1,14 @@
|
||||
using FluentMigrator;
|
||||
using NzbDrone.Core.Datastore.Migration.Framework;
|
||||
|
||||
namespace NzbDrone.Core.Datastore.Migration
|
||||
{
|
||||
[Migration(67)]
|
||||
public class add_added_to_series : NzbDroneMigrationBase
|
||||
{
|
||||
protected override void MainDbUpgrade()
|
||||
{
|
||||
Alter.Table("Series").AddColumn("Added").AsDateTime().Nullable();
|
||||
}
|
||||
}
|
||||
}
|
@ -231,6 +231,7 @@
|
||||
<Compile Include="Datastore\Migration\062_convert_quality_models.cs" />
|
||||
<Compile Include="Datastore\Migration\065_make_scene_numbering_nullable.cs" />
|
||||
<Compile Include="Datastore\Migration\066_add_tags.cs" />
|
||||
<Compile Include="Datastore\Migration\067_add_added_to_series.cs" />
|
||||
<Compile Include="Datastore\Migration\Framework\MigrationContext.cs" />
|
||||
<Compile Include="Datastore\Migration\Framework\MigrationController.cs" />
|
||||
<Compile Include="Datastore\Migration\Framework\MigrationExtension.cs" />
|
||||
|
@ -25,7 +25,7 @@ public Series()
|
||||
public string SortTitle { get; set; }
|
||||
public SeriesStatusType Status { get; set; }
|
||||
public string Overview { get; set; }
|
||||
public String AirTime { get; set; }
|
||||
public string AirTime { get; set; }
|
||||
public bool Monitored { get; set; }
|
||||
public int ProfileId { get; set; }
|
||||
public bool SeasonFolder { get; set; }
|
||||
@ -41,10 +41,9 @@ public Series()
|
||||
public Ratings Ratings { get; set; }
|
||||
public List<String> Genres { get; set; }
|
||||
public List<Actor> Actors { get; set; }
|
||||
public String Certification { get; set; }
|
||||
|
||||
public string Certification { get; set; }
|
||||
public string RootFolderPath { get; set; }
|
||||
|
||||
public DateTime Added { get; set; }
|
||||
public DateTime? FirstAired { get; set; }
|
||||
public LazyLoaded<Profile> Profile { get; set; }
|
||||
|
||||
@ -53,7 +52,7 @@ public Series()
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("[{0}][{1}]", TvdbId, Title.NullSafe());
|
||||
return String.Format("[{0}][{1}]", TvdbId, Title.NullSafe());
|
||||
}
|
||||
}
|
||||
}
|
@ -78,6 +78,7 @@ public Series AddSeries(Series newSeries)
|
||||
newSeries.Monitored = true;
|
||||
newSeries.CleanTitle = newSeries.Title.CleanSeriesTitle();
|
||||
newSeries.SortTitle = SeriesTitleNormalizer.Normalize(newSeries.Title, newSeries.TvdbId);
|
||||
newSeries.Added = DateTime.UtcNow;
|
||||
|
||||
_seriesRepository.Insert(newSeries);
|
||||
_eventAggregator.PublishEvent(new SeriesAddedEvent(GetSeries(newSeries.Id)));
|
||||
|
Loading…
Reference in New Issue
Block a user