<= part 2

This commit is contained in:
Zlatin Balevsky
2019-10-28 23:12:32 +00:00
parent 87e5007f39
commit e9e6e6920a

View File

@ -30,7 +30,7 @@ class ResultsParser {
private static parseV1(Persona p, UUID uuid, def json) {
if (json.name == null)
throw new InvalidSearchResultException("name missing")
if (json.size == null || json.size == 0)
if (json.size == null || json.size <= 0)
throw new InvalidSearchResultException("length missing")
if (json.infohash == null)
throw new InvalidSearchResultException("infohash missing")
@ -71,7 +71,7 @@ class ResultsParser {
private static UIResultEvent parseV2(Persona p, UUID uuid, def json) {
if (json.name == null)
throw new InvalidSearchResultException("name missing")
if (json.size == null || json.size == 0)
if (json.size == null || json.size <= 0)
throw new InvalidSearchResultException("length missing")
if (json.infohash == null)
throw new InvalidSearchResultException("infohash missing")