Fedora : do not include fork projects in the list
This commit is contained in:
		
							parent
							
								
									6bd7090a4f
								
							
						
					
					
						commit
						e986997662
					
				| @ -93,15 +93,24 @@ 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; | ||||||
|  | 
 | ||||||
|  |                 // get infos | ||||||
|  |                 String name = searchResultJson.getString("name"); | ||||||
|  | 
 | ||||||
|  |                 // do not include fork projects in the list | ||||||
|  |                 if(!name.startsWith("fork/")){ | ||||||
|  | 
 | ||||||
|                     // add package into to list |                     // add package into to list | ||||||
|                     searchedPackagesList.add(new SearchedPackage( |                     searchedPackagesList.add(new SearchedPackage( | ||||||
|                         searchResultJson.getString("name"), |                             name, | ||||||
|                             null, |                             null, | ||||||
|                             null, |                             null, | ||||||
|                             searchResultJson.getString("description"), |                             searchResultJson.getString("description"), | ||||||
|                             "fedora" |                             "fedora" | ||||||
|                     )); |                     )); | ||||||
|                 } |                 } | ||||||
|  | 
 | ||||||
|  |             } | ||||||
|             futureSearchedPackages.complete(searchedPackagesList); |             futureSearchedPackages.complete(searchedPackagesList); | ||||||
|         }).exceptionally(error->{ |         }).exceptionally(error->{ | ||||||
|             error.printStackTrace(); |             error.printStackTrace(); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user