1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-25 01:02:05 +00:00

NzbInfoUrl added to history and episode parse result, will be added to history item before being added to the DB.

This commit is contained in:
Mark McDowall 2012-05-02 08:37:09 -07:00
parent 0c3de6964f
commit ce0a6f8b86
4 changed files with 7 additions and 4 deletions

View file

@ -4,12 +4,12 @@
namespace NzbDrone.Core.Datastore.Migrations
{
[Migration(20120414)]
public class Migration20120414 : NzbDroneMigration
[Migration(20120430)]
public class Migration20120430 : NzbDroneMigration
{
protected override void MainDbUpgrade()
{
Database.AddColumn("History", "Url", DbType.String, ColumnProperty.Null);
Database.AddColumn("History", "NzbInfoUrl", DbType.String, ColumnProperty.Null);
}
}
}

View file

@ -30,6 +30,8 @@ public string CleanTitle
public string NzbUrl { get; set; }
public string NzbInfoUrl { get; set; }
public string OriginalString { get; set; }
public Series Series { get; set; }

View file

@ -52,7 +52,6 @@ public virtual bool DownloadReport(EpisodeParseResult parseResult)
{
logger.Trace("Download added to Queue: {0}", downloadTitle);
foreach (var episode in _episodeProvider.GetEpisodesByParseResult(parseResult))
{
var history = new History();
@ -63,6 +62,7 @@ public virtual bool DownloadReport(EpisodeParseResult parseResult)
history.NzbTitle = parseResult.OriginalString;
history.EpisodeId = episode.EpisodeId;
history.SeriesId = episode.SeriesId;
history.NzbInfoUrl = parseResult.NzbInfoUrl;
_historyProvider.Add(history);
_episodeProvider.MarkEpisodeAsFetched(episode.EpisodeId);

View file

@ -16,6 +16,7 @@ public class History
public DateTime Date { get; set; }
public bool IsProper { get; set; }
public string Indexer { get; set; }
public string NzbInfoUrl { get; set; }
[ResultColumn]
public Episode Episode { get; set; }