Limit MTG Page Size to 1 card

This commit is contained in:
Runebaas 2019-03-02 01:21:42 -05:00
parent 2b90358ca5
commit 35a4f4a122
No known key found for this signature in database
GPG key ID: 2677AF508D0300D6

View file

@ -29,7 +29,11 @@ namespace Geekbot.net.Commands.Integrations
try
{
var service = new CardService();
var result = service.Where(x => x.Name, cardName);
var result = service
.Where(x => x.Name, cardName)
// fewer cards less risk of deserialization problems, don't need more than one anyways...
// ToDo: fix the deserialization issue in card[n].foreignNames[]
.Where(x => x.PageSize, 1);
var card = result.All().Value.FirstOrDefault();
if (card == null)