mirror of
https://github.com/Jackett/Jackett
synced 2025-01-01 12:46:23 +00:00
corsarored: fix null category (#8471)
This commit is contained in:
parent
cb24d1aea7
commit
86374ab87e
1 changed files with 2 additions and 2 deletions
|
@ -225,7 +225,7 @@ namespace Jackett.Common.Indexers
|
||||||
var publishDate = torrent["last_updated"] != null
|
var publishDate = torrent["last_updated"] != null
|
||||||
? DateTime.Parse((string)torrent["last_updated"])
|
? DateTime.Parse((string)torrent["last_updated"])
|
||||||
: DateTime.Now;
|
: DateTime.Now;
|
||||||
var cat = (int)torrent["category"];
|
var cat = (string)torrent["category"] ?? "25"; // if category is null set "25 / Other" category
|
||||||
var size = torrent["size"]?.ToObject<long>();
|
var size = torrent["size"]?.ToObject<long>();
|
||||||
return new ReleaseInfo
|
return new ReleaseInfo
|
||||||
{
|
{
|
||||||
|
@ -243,7 +243,7 @@ namespace Jackett.Common.Indexers
|
||||||
Guid = comments,
|
Guid = comments,
|
||||||
Peers = seeders + (int)torrent["leechers"],
|
Peers = seeders + (int)torrent["leechers"],
|
||||||
PublishDate = publishDate,
|
PublishDate = publishDate,
|
||||||
Category = MapTrackerCatToNewznab(cat.ToString()),
|
Category = MapTrackerCatToNewznab(cat),
|
||||||
Size = size
|
Size = size
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue