Add series working, Only queue enabled jobs.

pull/2/head
Mark McDowall 12 years ago
parent 66977cd329
commit b16d85d0fc

@ -120,7 +120,7 @@ namespace NzbDrone.Core.Datastore.Migration
.WithColumn("Title").AsString().NotNullable() .WithColumn("Title").AsString().NotNullable()
.WithColumn("CleanTitle").AsString().NotNullable() .WithColumn("CleanTitle").AsString().NotNullable()
.WithColumn("Status").AsInt32().NotNullable() .WithColumn("Status").AsInt32().NotNullable()
.WithColumn("Overview").AsString().NotNullable() .WithColumn("Overview").AsString().Nullable()
.WithColumn("AirTime").AsString().Nullable() .WithColumn("AirTime").AsString().Nullable()
.WithColumn("Language").AsString().NotNullable() .WithColumn("Language").AsString().NotNullable()
.WithColumn("Path").AsString().NotNullable() .WithColumn("Path").AsString().NotNullable()
@ -132,11 +132,11 @@ namespace NzbDrone.Core.Datastore.Migration
.WithColumn("Runtime").AsInt32().NotNullable() .WithColumn("Runtime").AsInt32().NotNullable()
.WithColumn("SeriesType").AsInt32().NotNullable() .WithColumn("SeriesType").AsInt32().NotNullable()
.WithColumn("BacklogSetting").AsInt32().NotNullable() .WithColumn("BacklogSetting").AsInt32().NotNullable()
.WithColumn("Network").AsString().NotNullable() .WithColumn("Network").AsString().Nullable()
.WithColumn("CustomStartDate").AsDateTime().Nullable() .WithColumn("CustomStartDate").AsDateTime().Nullable()
.WithColumn("UseSceneNumbering").AsBoolean().NotNullable() .WithColumn("UseSceneNumbering").AsBoolean().NotNullable()
.WithColumn("TvRageId").AsInt32().Nullable() .WithColumn("TvRageId").AsInt32().Nullable()
.WithColumn("TvRageTitle").AsString().NotNullable() .WithColumn("TvRageTitle").AsString().Nullable()
.WithColumn("UtcOffSet").AsInt32().NotNullable() .WithColumn("UtcOffSet").AsInt32().NotNullable()
.WithColumn("FirstAired").AsDateTime().Nullable() .WithColumn("FirstAired").AsDateTime().Nullable()
.WithColumn("NextAiring").AsDateTime().Nullable(); .WithColumn("NextAiring").AsDateTime().Nullable();

@ -29,7 +29,7 @@ namespace NzbDrone.Core.Datastore
RegisterMappers(); RegisterMappers();
Mapper.Entity<Config>().RegisterModel("Config"); Mapper.Entity<Config>().RegisterModel("Config");
Mapper.Entity<RootFolder>().RegisterModel("RootFolders"); Mapper.Entity<RootFolder>().RegisterModel("RootFolders").Ignore(r => r.FreeSpace);
Mapper.Entity<Indexer>().RegisterModel("IndexerDefinitions"); Mapper.Entity<Indexer>().RegisterModel("IndexerDefinitions");
Mapper.Entity<NewznabDefinition>().RegisterModel("NewznabDefinitions"); Mapper.Entity<NewznabDefinition>().RegisterModel("NewznabDefinitions");

@ -33,7 +33,7 @@ namespace NzbDrone.Core.Jobs
public IList<JobDefinition> GetPendingJobs() public IList<JobDefinition> GetPendingJobs()
{ {
return Queryable().Where(c => c.Enable == false && c.Interval != 2).ToList().Where(c => c.LastExecution < DateTime.Now.AddMinutes(-c.Interval)).ToList(); return Queryable().Where(c => c.Enable == true && c.Interval != 2).ToList().Where(c => c.LastExecution < DateTime.Now.AddMinutes(-c.Interval)).ToList();
} }
public void Init() public void Init()

@ -122,6 +122,7 @@ namespace NzbDrone.Core.Tv
repoSeries.Monitored = true; repoSeries.Monitored = true;
repoSeries.QualityProfileId = qualityProfileId; repoSeries.QualityProfileId = qualityProfileId;
repoSeries.Title = title; repoSeries.Title = title;
repoSeries.CleanTitle = Parser.NormalizeTitle(title);
if (qualityProfileId == 0) if (qualityProfileId == 0)
repoSeries.QualityProfileId = _configService.DefaultQualityProfile; repoSeries.QualityProfileId = _configService.DefaultQualityProfile;
@ -132,6 +133,9 @@ namespace NzbDrone.Core.Tv
if (airedAfter.HasValue) if (airedAfter.HasValue)
repoSeries.CustomStartDate = airedAfter; repoSeries.CustomStartDate = airedAfter;
//Todo: Allow the user to set this as part of the addition process.
repoSeries.Language = "en";
_seriesRepository.Insert(repoSeries); _seriesRepository.Insert(repoSeries);
_eventAggregator.Publish(new SeriesAddedEvent(repoSeries)); _eventAggregator.Publish(new SeriesAddedEvent(repoSeries));

Loading…
Cancel
Save