mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-11-12 13:13:00 +00:00
Add getPlaylist(id) to RemotePlaylistManager
Co-authored-by: Haggai Eran <haggai.eran@gmail.com>
This commit is contained in:
@@ -34,7 +34,7 @@ public interface PlaylistRemoteDAO extends BasicDAO<PlaylistRemoteEntity> {
|
|||||||
|
|
||||||
@Query("SELECT * FROM " + REMOTE_PLAYLIST_TABLE + " WHERE "
|
@Query("SELECT * FROM " + REMOTE_PLAYLIST_TABLE + " WHERE "
|
||||||
+ REMOTE_PLAYLIST_ID + " = :playlistId")
|
+ REMOTE_PLAYLIST_ID + " = :playlistId")
|
||||||
Flowable<List<PlaylistRemoteEntity>> getPlaylist(long playlistId);
|
Flowable<PlaylistRemoteEntity> getPlaylist(long playlistId);
|
||||||
|
|
||||||
@Query("SELECT * FROM " + REMOTE_PLAYLIST_TABLE + " WHERE "
|
@Query("SELECT * FROM " + REMOTE_PLAYLIST_TABLE + " WHERE "
|
||||||
+ REMOTE_PLAYLIST_URL + " = :url AND " + REMOTE_PLAYLIST_SERVICE_ID + " = :serviceId")
|
+ REMOTE_PLAYLIST_URL + " = :url AND " + REMOTE_PLAYLIST_SERVICE_ID + " = :serviceId")
|
||||||
|
|||||||
@@ -26,6 +26,10 @@ public class RemotePlaylistManager {
|
|||||||
return playlistRemoteTable.getPlaylists().subscribeOn(Schedulers.io());
|
return playlistRemoteTable.getPlaylists().subscribeOn(Schedulers.io());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Flowable<PlaylistRemoteEntity> getPlaylist(final long playlistId) {
|
||||||
|
return playlistRemoteTable.getPlaylist(playlistId).subscribeOn(Schedulers.io());
|
||||||
|
}
|
||||||
|
|
||||||
public Flowable<List<PlaylistRemoteEntity>> getPlaylist(final PlaylistInfo info) {
|
public Flowable<List<PlaylistRemoteEntity>> getPlaylist(final PlaylistInfo info) {
|
||||||
return playlistRemoteTable.getPlaylist(info.getServiceId(), info.getUrl())
|
return playlistRemoteTable.getPlaylist(info.getServiceId(), info.getUrl())
|
||||||
.subscribeOn(Schedulers.io());
|
.subscribeOn(Schedulers.io());
|
||||||
|
|||||||
Reference in New Issue
Block a user