mirror of https://github.com/zlatinb/muwire
<= part 2
parent
87e5007f39
commit
e9e6e6920a
|
@ -30,7 +30,7 @@ class ResultsParser {
|
||||||
private static parseV1(Persona p, UUID uuid, def json) {
|
private static parseV1(Persona p, UUID uuid, def json) {
|
||||||
if (json.name == null)
|
if (json.name == null)
|
||||||
throw new InvalidSearchResultException("name missing")
|
throw new InvalidSearchResultException("name missing")
|
||||||
if (json.size == null || json.size == 0)
|
if (json.size == null || json.size <= 0)
|
||||||
throw new InvalidSearchResultException("length missing")
|
throw new InvalidSearchResultException("length missing")
|
||||||
if (json.infohash == null)
|
if (json.infohash == null)
|
||||||
throw new InvalidSearchResultException("infohash missing")
|
throw new InvalidSearchResultException("infohash missing")
|
||||||
|
@ -71,7 +71,7 @@ class ResultsParser {
|
||||||
private static UIResultEvent parseV2(Persona p, UUID uuid, def json) {
|
private static UIResultEvent parseV2(Persona p, UUID uuid, def json) {
|
||||||
if (json.name == null)
|
if (json.name == null)
|
||||||
throw new InvalidSearchResultException("name missing")
|
throw new InvalidSearchResultException("name missing")
|
||||||
if (json.size == null || json.size == 0)
|
if (json.size == null || json.size <= 0)
|
||||||
throw new InvalidSearchResultException("length missing")
|
throw new InvalidSearchResultException("length missing")
|
||||||
if (json.infohash == null)
|
if (json.infohash == null)
|
||||||
throw new InvalidSearchResultException("infohash missing")
|
throw new InvalidSearchResultException("infohash missing")
|
||||||
|
|
Loading…
Reference in New Issue