indexers: show real publish date when build has debug set (#14128)

This commit is contained in:
Bogdan 2023-03-05 22:48:08 +02:00 committed by GitHub
parent cfa154be16
commit bbeca179d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View File

@ -196,7 +196,7 @@ namespace Jackett.Common.Indexers
// fix publish date
// some trackers do not keep their clocks up to date and can be ~20 minutes out!
if (r.PublishDate > DateTime.Now)
if (!EnvironmentUtil.IsDebug && r.PublishDate > DateTime.Now)
r.PublishDate = DateTime.Now;
// generate magnet link from info hash (not allowed for private sites)

View File

@ -27,5 +27,17 @@ namespace Jackett.Common.Utils
public static bool IsWindows => Environment.OSVersion.Platform == PlatformID.Win32NT;
public static bool IsDebug
{
get
{
#if DEBUG
return true;
#else
return false;
#endif
}
}
}
}