mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-31 07:13:00 +00:00 
			
		
		
		
	Fix SparseItemUtil loading
				
					
				
			* Added a missing `return` statement * `fetchUploaderUrlIfSparse` now has a similar layout to `fetchItemInfoIfSparse`
This commit is contained in:
		| @@ -54,6 +54,7 @@ public final class SparseItemUtil { | |||||||
|             // if the duration is >= 0 (provided that the item is not a livestream) and there is an |             // if the duration is >= 0 (provided that the item is not a livestream) and there is an | ||||||
|             // uploader url, probably all info is already there, so there is no need to fetch it |             // uploader url, probably all info is already there, so there is no need to fetch it | ||||||
|             callback.accept(new SinglePlayQueue(item)); |             callback.accept(new SinglePlayQueue(item)); | ||||||
|  |             return; | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         // either the duration or the uploader url are not available, so fetch more info |         // either the duration or the uploader url are not available, so fetch more info | ||||||
| @@ -80,12 +81,12 @@ public final class SparseItemUtil { | |||||||
|                                                 @NonNull final String url, |                                                 @NonNull final String url, | ||||||
|                                                 @Nullable final String uploaderUrl, |                                                 @Nullable final String uploaderUrl, | ||||||
|                                                 @NonNull final Consumer<String> callback) { |                                                 @NonNull final Consumer<String> callback) { | ||||||
|         if (isNullOrEmpty(uploaderUrl)) { |         if (!isNullOrEmpty(uploaderUrl)) { | ||||||
|             fetchStreamInfoAndSaveToDatabase(context, serviceId, url, |  | ||||||
|                     streamInfo -> callback.accept(streamInfo.getUploaderUrl())); |  | ||||||
|         } else { |  | ||||||
|             callback.accept(uploaderUrl); |             callback.accept(uploaderUrl); | ||||||
|  |             return; | ||||||
|         } |         } | ||||||
|  |         fetchStreamInfoAndSaveToDatabase(context, serviceId, url, | ||||||
|  |                 streamInfo -> callback.accept(streamInfo.getUploaderUrl())); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 litetex
					litetex