mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-09 12:32:31 +01: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:
parent
0c3de6964f
commit
ce0a6f8b86
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
@ -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; }
|
||||
|
@ -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);
|
||||
|
@ -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; }
|
||||
|
Loading…
Reference in New Issue
Block a user