Add series working, Only queue enabled jobs.

This commit is contained in:
Mark McDowall 2013-03-26 17:48:07 -07:00
parent 66977cd329
commit b16d85d0fc
4 changed files with 9 additions and 5 deletions

View File

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

View File

@ -29,7 +29,7 @@ namespace NzbDrone.Core.Datastore
RegisterMappers();
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<NewznabDefinition>().RegisterModel("NewznabDefinitions");

View File

@ -33,7 +33,7 @@ namespace NzbDrone.Core.Jobs
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()

View File

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