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