mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-30 23:03:00 +00:00 
			
		
		
		
	fixed some more bugs
This commit is contained in:
		| @@ -151,6 +151,8 @@ public class VideoItemListFragment extends ListFragment { | ||||
|                         /* todo: this shoudl not be assigned static */ "Youtube", query, R.string.general_error)); | ||||
|  | ||||
|                 e.printStackTrace(); | ||||
|             } finally { | ||||
|  | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|   | ||||
| @@ -31,7 +31,12 @@ public class SearchResult { | ||||
|  | ||||
|         SearchResult result = engine.search(query, page, languageCode, dl).getSearchResult(); | ||||
|         if(result.resultList.isEmpty()) { | ||||
|             if(result.suggestion.isEmpty()) { | ||||
|                 throw new ExtractionException("Empty result despite no error"); | ||||
|             } else { | ||||
|                 // This is used as a fallback. Do not relay on it !!! | ||||
|                 throw new SearchEngine.NothingFoundException(result.suggestion); | ||||
|             } | ||||
|         } | ||||
|         return result; | ||||
|     } | ||||
|   | ||||
| @@ -96,6 +96,9 @@ public class YoutubeSearchEngine implements SearchEngine { | ||||
|             // both types of spell correction item | ||||
|             if (!((el = item.select("div[class*=\"spell-correction\"]").first()) == null)) { | ||||
|                 collector.setSuggestion(el.select("a").first().text()); | ||||
|                 if(list.children().size() == 1) { | ||||
|                     throw new NothingFoundException("Did you mean: " + el.select("a").first().text()); | ||||
|                 } | ||||
|                 // search message item | ||||
|             } else if (!((el = item.select("div[class*=\"search-message\"]").first()) == null)) { | ||||
|                 //result.errorMessage = el.text(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Christian Schabesberger
					Christian Schabesberger