mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-11-25 20:22:37 +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 @@ using Migrator.Framework;
|
||||
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 @@ namespace NzbDrone.Core.Model
|
||||
|
||||
public string NzbUrl { get; set; }
|
||||
|
||||
public string NzbInfoUrl { get; set; }
|
||||
|
||||
public string OriginalString { get; set; }
|
||||
|
||||
public Series Series { get; set; }
|
||||
|
@ -52,7 +52,6 @@ namespace NzbDrone.Core.Providers
|
||||
{
|
||||
logger.Trace("Download added to Queue: {0}", downloadTitle);
|
||||
|
||||
|
||||
foreach (var episode in _episodeProvider.GetEpisodesByParseResult(parseResult))
|
||||
{
|
||||
var history = new History();
|
||||
@ -63,6 +62,7 @@ namespace NzbDrone.Core.Providers
|
||||
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 @@ namespace NzbDrone.Core.Repository
|
||||
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