getTracksInPlaylist

This commit is contained in:
gdlbo
2022-09-16 21:40:50 +03:00
parent 2dec7b28f4
commit 025f582f6a
2 changed files with 4 additions and 0 deletions
@@ -25,4 +25,5 @@ interface ILibVkxService {
// Get cached library in Catalog2-like JSON
String getCacheCatalog() = 11;
List<String> getTracksInPlaylist(in int playlist_id, in int owner_id) = 12;
}
@@ -39,8 +39,10 @@ public class TracklistInjector {
LibVKXClient.getInstance().runOnService((service) -> {
try {
try {
Log.d("TracklistInjector", "Using vkx cache catalog");
observableEmitter.b(parser.c(new JSONObject(service.getCacheCatalog())));
} catch (Exception e){
e.printStackTrace();
List<MusicTrack> tracks = new ArrayList<>();
List<String> cache = service.getCache();
@@ -49,6 +51,7 @@ public class TracklistInjector {
tracks.add(new MusicTrack(new JSONObject(json)));
}
Log.d("TracklistInjector", "Using own cache catalog from vkx");
observableEmitter.b(parser.c(createVirtualCatalog(tracks)));
}
} catch (Exception e) {