Merge pull request #34 from ThomasRubini/fedora_forks
This commit is contained in:
		
						commit
						075e8f5e85
					
				| @ -93,15 +93,24 @@ public class FedoraDistribution extends AsyncRequestsParser implements Distribut | ||||
|             for (Object searchResultObj : json.getJSONArray("projects")) { | ||||
|                 // convert object into String | ||||
|                 JSONObject searchResultJson = (JSONObject) searchResultObj; | ||||
| 
 | ||||
|                 // get infos | ||||
|                 String name = searchResultJson.getString("name"); | ||||
| 
 | ||||
|                 // do not include fork projects in the list | ||||
|                 if(!name.startsWith("fork/")){ | ||||
| 
 | ||||
|                     // add package into to list | ||||
|                     searchedPackagesList.add(new SearchedPackage( | ||||
|                         searchResultJson.getString("name"), | ||||
|                             name, | ||||
|                             null, | ||||
|                             null, | ||||
|                             searchResultJson.getString("description"), | ||||
|                             "fedora" | ||||
|                     )); | ||||
|                 } | ||||
| 
 | ||||
|             } | ||||
|             futureSearchedPackages.complete(searchedPackagesList); | ||||
|         }).exceptionally(error->{ | ||||
|             error.printStackTrace(); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user