mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-04-23 22:45:06 -04:00
New: (Avistaz Sites) Use created_at_iso for release create date (#2437)
* New: (Avistaz Sites) Use created_at_iso for release create date no longer have timezone headaches all Staz sites except animetorrents support this new field. * fix tests * Remove AvistaZ TimezoneOffset
This commit is contained in:
@@ -37,11 +37,6 @@ namespace NzbDrone.Core.Indexers.Definitions
|
||||
};
|
||||
}
|
||||
|
||||
public override IParseIndexerResponse GetParser()
|
||||
{
|
||||
return new AvistaZParser();
|
||||
}
|
||||
|
||||
protected override IndexerCapabilities SetCapabilities()
|
||||
{
|
||||
var caps = new IndexerCapabilities
|
||||
@@ -81,9 +76,4 @@ namespace NzbDrone.Core.Indexers.Definitions
|
||||
: $"{searchCriteria.EpisodeSearchString}";
|
||||
}
|
||||
}
|
||||
|
||||
public class AvistaZParser : AvistazParserBase
|
||||
{
|
||||
protected override string TimezoneOffset => "+02:00";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,6 +15,9 @@ namespace NzbDrone.Core.Indexers.Definitions.Avistaz
|
||||
[JsonPropertyName("created_at")]
|
||||
public string CreatedAt { get; set; }
|
||||
|
||||
[JsonPropertyName("created_at_iso")]
|
||||
public string CreatedAtIso { get; set; }
|
||||
|
||||
[JsonPropertyName("file_name")]
|
||||
public string FileName { get; set; }
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ namespace NzbDrone.Core.Indexers.Definitions.Avistaz
|
||||
{
|
||||
public class AvistazParserBase : IParseIndexerResponse
|
||||
{
|
||||
protected virtual string TimezoneOffset => "-04:00"; // Avistaz does not specify a timezone & returns server time
|
||||
private readonly HashSet<string> _hdResolutions = new() { "1080p", "1080i", "720p" };
|
||||
|
||||
public Action<IDictionary<string, string>, DateTime?> CookiesUpdater { get; set; }
|
||||
@@ -66,7 +65,7 @@ namespace NzbDrone.Core.Indexers.Definitions.Avistaz
|
||||
InfoUrl = details,
|
||||
Guid = details,
|
||||
Categories = cats,
|
||||
PublishDate = DateTime.Parse($"{row.CreatedAt} {TimezoneOffset}", CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal),
|
||||
PublishDate = DateTime.Parse(row.CreatedAtIso, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal),
|
||||
Size = row.FileSize,
|
||||
Files = row.FileCount,
|
||||
Grabs = row.Completed,
|
||||
|
||||
@@ -54,8 +54,6 @@ namespace NzbDrone.Core.Indexers.Definitions
|
||||
{
|
||||
private readonly IndexerCapabilitiesCategories _categories;
|
||||
|
||||
protected override string TimezoneOffset => "+02:00";
|
||||
|
||||
public ExoticaZParser(IndexerCapabilitiesCategories categories)
|
||||
{
|
||||
_categories = categories;
|
||||
|
||||
Reference in New Issue
Block a user