Skip to content

Commit 9bb2c0b

Browse files
Stypoxhaggaie
andcommitted
Add getPlaylist(id) to RemotePlaylistManager
Co-authored-by: Haggai Eran <haggai.eran@gmail.com>
1 parent 1e08cc8 commit 9bb2c0b

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

app/src/main/java/org/schabi/newpipe/database/playlist/dao/PlaylistRemoteDAO.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public interface PlaylistRemoteDAO extends BasicDAO<PlaylistRemoteEntity> {
3434

3535
@Query("SELECT * FROM " + REMOTE_PLAYLIST_TABLE + " WHERE "
3636
+ REMOTE_PLAYLIST_ID + " = :playlistId")
37-
Flowable<List<PlaylistRemoteEntity>> getPlaylist(long playlistId);
37+
Flowable<PlaylistRemoteEntity> getPlaylist(long playlistId);
3838

3939
@Query("SELECT * FROM " + REMOTE_PLAYLIST_TABLE + " WHERE "
4040
+ REMOTE_PLAYLIST_URL + " = :url AND " + REMOTE_PLAYLIST_SERVICE_ID + " = :serviceId")

app/src/main/java/org/schabi/newpipe/local/playlist/RemotePlaylistManager.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ public Flowable<List<PlaylistRemoteEntity>> getPlaylists() {
2626
return playlistRemoteTable.getPlaylists().subscribeOn(Schedulers.io());
2727
}
2828

29+
public Flowable<PlaylistRemoteEntity> getPlaylist(final long playlistId) {
30+
return playlistRemoteTable.getPlaylist(playlistId).subscribeOn(Schedulers.io());
31+
}
32+
2933
public Flowable<List<PlaylistRemoteEntity>> getPlaylist(final PlaylistInfo info) {
3034
return playlistRemoteTable.getPlaylist(info.getServiceId(), info.getUrl())
3135
.subscribeOn(Schedulers.io());

0 commit comments

Comments
 (0)