mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2024-11-22 02:53:09 +01:00
Made some small code improvements
This commit is contained in:
parent
68ea99d6e6
commit
9067c770a7
@ -42,13 +42,11 @@ public class LocalPlaylistManager {
|
||||
if (streams.isEmpty()) {
|
||||
return Maybe.empty();
|
||||
}
|
||||
final StreamEntity defaultStream = streams.get(0);
|
||||
final PlaylistEntity newPlaylist =
|
||||
new PlaylistEntity(name, false, defaultStream.getUid());
|
||||
|
||||
return Maybe.fromCallable(() -> database.runInTransaction(() -> {
|
||||
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),
|
||||
streamIds, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user