mirror of https://github.com/zlatinb/muwire
pull/24/head
parent
8df6715e24
commit
87e5007f39
|
@ -34,7 +34,7 @@ class ResultsParser {
|
|||
throw new InvalidSearchResultException("length missing")
|
||||
if (json.infohash == null)
|
||||
throw new InvalidSearchResultException("infohash missing")
|
||||
if (json.pieceSize == null || json.pieceSize == 0)
|
||||
if (json.pieceSize == null || json.pieceSize <= 0)
|
||||
throw new InvalidSearchResultException("pieceSize missing")
|
||||
if (!(json.hashList instanceof List))
|
||||
throw new InvalidSearchResultException("hashlist not a list")
|
||||
|
@ -75,7 +75,7 @@ class ResultsParser {
|
|||
throw new InvalidSearchResultException("length missing")
|
||||
if (json.infohash == null)
|
||||
throw new InvalidSearchResultException("infohash missing")
|
||||
if (json.pieceSize == null || json.pieceSize)
|
||||
if (json.pieceSize == null || json.pieceSize <= 0)
|
||||
throw new InvalidSearchResultException("pieceSize missing")
|
||||
if (json.hashList != null)
|
||||
throw new InvalidSearchResultException("V2 result with hashlist")
|
||||
|
|
Loading…
Reference in New Issue