mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
Simplification of parsing in consumer
should speed up massively especially if imdbIds are found from mongodb
This commit is contained in:
@@ -15,7 +15,6 @@ public class NyaaCrawler(IHttpClientFactory httpClientFactory, ILogger<NyaaCrawl
|
||||
[nameof(Torrent.Seeders)] = "seeders",
|
||||
[nameof(Torrent.Leechers)] = "leechers",
|
||||
[nameof(Torrent.InfoHash)] = "infoHash",
|
||||
[nameof(Torrent.Category)] = "category",
|
||||
};
|
||||
|
||||
protected override Torrent ParseTorrent(XElement itemNode) =>
|
||||
@@ -27,6 +26,6 @@ public class NyaaCrawler(IHttpClientFactory httpClientFactory, ILogger<NyaaCrawl
|
||||
Seeders = int.Parse(itemNode.Element(XmlNamespace + Mappings[nameof(Torrent.Seeders)])?.Value ?? "0"),
|
||||
Leechers = int.Parse(itemNode.Element(XmlNamespace + Mappings[nameof(Torrent.Leechers)])?.Value ?? "0"),
|
||||
InfoHash = itemNode.Element(XmlNamespace + Mappings[nameof(Torrent.InfoHash)])?.Value,
|
||||
Category = itemNode.Element(XmlNamespace + Mappings[nameof(Torrent.Category)])?.Value.ToLowerInvariant(),
|
||||
Category = "anime",
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user