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:
parent
0c3de6964f
commit
ce0a6f8b86
|
@ -4,12 +4,12 @@ using Migrator.Framework;
|
||||||
namespace NzbDrone.Core.Datastore.Migrations
|
namespace NzbDrone.Core.Datastore.Migrations
|
||||||
{
|
{
|
||||||
|
|
||||||
[Migration(20120414)]
|
[Migration(20120430)]
|
||||||
public class Migration20120414 : NzbDroneMigration
|
public class Migration20120430 : NzbDroneMigration
|
||||||
{
|
{
|
||||||
protected override void MainDbUpgrade()
|
protected override void MainDbUpgrade()
|
||||||
{
|
{
|
||||||
Database.AddColumn("History", "Url", DbType.String, ColumnProperty.Null);
|
Database.AddColumn("History", "NzbInfoUrl", DbType.String, ColumnProperty.Null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -30,6 +30,8 @@ namespace NzbDrone.Core.Model
|
||||||
|
|
||||||
public string NzbUrl { get; set; }
|
public string NzbUrl { get; set; }
|
||||||
|
|
||||||
|
public string NzbInfoUrl { get; set; }
|
||||||
|
|
||||||
public string OriginalString { get; set; }
|
public string OriginalString { get; set; }
|
||||||
|
|
||||||
public Series Series { get; set; }
|
public Series Series { get; set; }
|
||||||
|
|
|
@ -52,7 +52,6 @@ namespace NzbDrone.Core.Providers
|
||||||
{
|
{
|
||||||
logger.Trace("Download added to Queue: {0}", downloadTitle);
|
logger.Trace("Download added to Queue: {0}", downloadTitle);
|
||||||
|
|
||||||
|
|
||||||
foreach (var episode in _episodeProvider.GetEpisodesByParseResult(parseResult))
|
foreach (var episode in _episodeProvider.GetEpisodesByParseResult(parseResult))
|
||||||
{
|
{
|
||||||
var history = new History();
|
var history = new History();
|
||||||
|
@ -63,6 +62,7 @@ namespace NzbDrone.Core.Providers
|
||||||
history.NzbTitle = parseResult.OriginalString;
|
history.NzbTitle = parseResult.OriginalString;
|
||||||
history.EpisodeId = episode.EpisodeId;
|
history.EpisodeId = episode.EpisodeId;
|
||||||
history.SeriesId = episode.SeriesId;
|
history.SeriesId = episode.SeriesId;
|
||||||
|
history.NzbInfoUrl = parseResult.NzbInfoUrl;
|
||||||
|
|
||||||
_historyProvider.Add(history);
|
_historyProvider.Add(history);
|
||||||
_episodeProvider.MarkEpisodeAsFetched(episode.EpisodeId);
|
_episodeProvider.MarkEpisodeAsFetched(episode.EpisodeId);
|
||||||
|
|
|
@ -16,6 +16,7 @@ namespace NzbDrone.Core.Repository
|
||||||
public DateTime Date { get; set; }
|
public DateTime Date { get; set; }
|
||||||
public bool IsProper { get; set; }
|
public bool IsProper { get; set; }
|
||||||
public string Indexer { get; set; }
|
public string Indexer { get; set; }
|
||||||
|
public string NzbInfoUrl { get; set; }
|
||||||
|
|
||||||
[ResultColumn]
|
[ResultColumn]
|
||||||
public Episode Episode { get; set; }
|
public Episode Episode { get; set; }
|
||||||
|
|
Loading…
Reference in New Issue