mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-31 07:13:00 +00:00 
			
		
		
		
	+ SearchEngine.java :- Added extra param 'countryCode' to support localization on suggestionList method.
+ YoutubeSearchEngine.java :- change implementation for suggestionList method and added parameter 'languageCode' on suggestion URL.
This commit is contained in:
		| @@ -35,7 +35,7 @@ public interface SearchEngine { | ||||
|         public final Vector<VideoPreviewInfo> resultList = new Vector<>(); | ||||
|     } | ||||
|  | ||||
|     ArrayList<String> suggestionList(String query); | ||||
|     ArrayList<String> suggestionList(String query, String contentCountry); | ||||
|  | ||||
|     //Result search(String query, int page); | ||||
|     Result search(String query, int page, String contentCountry); | ||||
|   | ||||
| @@ -140,7 +140,7 @@ public class YoutubeSearchEngine implements SearchEngine { | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public ArrayList<String> suggestionList(String query) { | ||||
|     public ArrayList<String> suggestionList(String query,String languageCode) { | ||||
|  | ||||
|         ArrayList<String> suggestions = new ArrayList<>(); | ||||
|  | ||||
| @@ -150,6 +150,7 @@ public class YoutubeSearchEngine implements SearchEngine { | ||||
|                 .appendPath("complete") | ||||
|                 .appendPath("search") | ||||
|                 .appendQueryParameter("client", "") | ||||
|                 .appendQueryParameter("language",languageCode) | ||||
|                 .appendQueryParameter("output", "toolbar") | ||||
|                 .appendQueryParameter("ds", "yt") | ||||
|                 .appendQueryParameter("q", query); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Shekhar Sahu
					Shekhar Sahu