mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-31 07:13:00 +00:00 
			
		
		
		
	Made some small code improvements
This commit is contained in:
		| @@ -42,13 +42,11 @@ public class LocalPlaylistManager { | |||||||
|         if (streams.isEmpty()) { |         if (streams.isEmpty()) { | ||||||
|             return Maybe.empty(); |             return Maybe.empty(); | ||||||
|         } |         } | ||||||
|         final StreamEntity defaultStream = streams.get(0); |  | ||||||
|         final PlaylistEntity newPlaylist = |  | ||||||
|                 new PlaylistEntity(name, false, defaultStream.getUid()); |  | ||||||
|  |  | ||||||
|         return Maybe.fromCallable(() -> database.runInTransaction(() -> { |         return Maybe.fromCallable(() -> database.runInTransaction(() -> { | ||||||
|                     final List<Long> streamIds = streamTable.upsertAll(streams); |                     final List<Long> streamIds = streamTable.upsertAll(streams); | ||||||
|                     newPlaylist.setThumbnailStreamId(streamIds.get(0)); |                     final PlaylistEntity newPlaylist = new PlaylistEntity(name, false, | ||||||
|  |                             streamIds.get(0)); | ||||||
|  |  | ||||||
|                     return insertJoinEntities(playlistTable.insert(newPlaylist), |                     return insertJoinEntities(playlistTable.insert(newPlaylist), | ||||||
|                             streamIds, 0); |                             streamIds, 0); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jared Fantaye
					Jared Fantaye