Skip to content

Commit

Permalink
Avoid saving Indexer Flags in Last RSS Release info
Browse files Browse the repository at this point in the history
  • Loading branch information
mynameisbogdan committed Feb 19, 2024
1 parent b9c76d9 commit 145cd74
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using FluentMigrator;
using NzbDrone.Core.Datastore.Migration.Framework;

namespace NzbDrone.Core.Datastore.Migration
{
[Migration(236)]
public class clear_last_rss_releases_info : NzbDroneMigrationBase
{
protected override void MainDbUpgrade()
{
Execute.Sql("UPDATE \"IndexerStatus\" SET \"LastRssSyncReleaseInfo\" = NULL");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
torrentInfo.PublishDate = torrent.publish_date.ToUniversalTime();
torrentInfo.Seeders = torrent.seeders;
torrentInfo.Peers = torrent.leechers + torrent.seeders;
torrentInfo.Freeleech = torrent.freeleech;

results.Add(torrentInfo);
}
Expand Down
6 changes: 4 additions & 2 deletions src/NzbDrone.Core/Parser/Model/ReleaseInfo.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using System.Text;
using Newtonsoft.Json;
using System.Text.Json.Serialization;
using NzbDrone.Core.Download.Pending;
using NzbDrone.Core.Indexers;
using NzbDrone.Core.Languages;
Expand Down Expand Up @@ -35,9 +35,11 @@ public ReleaseInfo()
public string Codec { get; set; }
public string Resolution { get; set; }

public IndexerFlags IndexerFlags { get; set; }
public List<Language> Languages { get; set; }

[JsonIgnore]
public IndexerFlags IndexerFlags { get; set; }

// Used to track pending releases that are being reprocessed
[JsonIgnore]
public PendingReleaseReason? PendingReleaseReason { get; set; }
Expand Down
1 change: 0 additions & 1 deletion src/NzbDrone.Core/Parser/Model/TorrentInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ public class TorrentInfo : ReleaseInfo
public string InfoHash { get; set; }
public int? Seeders { get; set; }
public int? Peers { get; set; }
public bool Freeleech { get; set; }

public static int? GetSeeders(ReleaseInfo release)
{
Expand Down

0 comments on commit 145cd74

Please sign in to comment.