From e87b45b47e82e25c13b6b1c15ad2b2d83cf381d9 Mon Sep 17 00:00:00 2001 From: Qstick Date: Mon, 2 Jan 2023 22:50:00 -0600 Subject: [PATCH] Fixed: (Filelist) Assume UTC+2 for API Dates --- .../IndexerTests/FileListTests/FileListFixture.cs | 2 +- src/NzbDrone.Core/Indexers/Definitions/FileList/FileListApi.cs | 2 +- .../Indexers/Definitions/FileList/FileListParser.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Core.Test/IndexerTests/FileListTests/FileListFixture.cs b/src/NzbDrone.Core.Test/IndexerTests/FileListTests/FileListFixture.cs index 55a9c47b6..bca17c656 100644 --- a/src/NzbDrone.Core.Test/IndexerTests/FileListTests/FileListFixture.cs +++ b/src/NzbDrone.Core.Test/IndexerTests/FileListTests/FileListFixture.cs @@ -50,7 +50,7 @@ namespace NzbDrone.Core.Test.IndexerTests.FileListTests torrentInfo.InfoUrl.Should().Be("https://filelist.io/details.php?id=665873"); torrentInfo.CommentUrl.Should().BeNullOrEmpty(); torrentInfo.Indexer.Should().Be(Subject.Definition.Name); - torrentInfo.PublishDate.Should().Be(DateTime.Parse("2020-01-25 22:20:19")); + torrentInfo.PublishDate.Should().Be(DateTime.Parse("2020-01-25 14:20:19")); torrentInfo.Size.Should().Be(8300512414); torrentInfo.InfoHash.Should().Be(null); torrentInfo.MagnetUrl.Should().Be(null); diff --git a/src/NzbDrone.Core/Indexers/Definitions/FileList/FileListApi.cs b/src/NzbDrone.Core/Indexers/Definitions/FileList/FileListApi.cs index aa09996b9..2f4bb734b 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/FileList/FileListApi.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/FileList/FileListApi.cs @@ -22,7 +22,7 @@ namespace NzbDrone.Core.Indexers.FileList [JsonProperty(PropertyName = "doubleup")] public bool DoubleUp { get; set; } [JsonProperty(PropertyName = "upload_date")] - public DateTime UploadDate { get; set; } + public string UploadDate { get; set; } public string Category { get; set; } } } diff --git a/src/NzbDrone.Core/Indexers/Definitions/FileList/FileListParser.cs b/src/NzbDrone.Core/Indexers/Definitions/FileList/FileListParser.cs index a495d4fe9..4685045a6 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/FileList/FileListParser.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/FileList/FileListParser.cs @@ -62,7 +62,7 @@ namespace NzbDrone.Core.Indexers.FileList InfoUrl = GetInfoUrl(id), Seeders = result.Seeders, Peers = result.Leechers + result.Seeders, - PublishDate = result.UploadDate, + PublishDate = DateTime.Parse(result.UploadDate + " +0200"), ImdbId = imdbId, IndexerFlags = flags, Files = (int)result.Files,