feat: folder navigation
This commit is contained in:
@@ -24,9 +24,9 @@ public class BrowsingClient {
|
||||
return browsingService.getMusicFolders(subsonic.getParams());
|
||||
}
|
||||
|
||||
public Call<ApiResponse> getIndexes() {
|
||||
public Call<ApiResponse> getIndexes(String musicFolderId, Long ifModifiedSince) {
|
||||
Log.d(TAG, "getIndexes()");
|
||||
return browsingService.getIndexes(subsonic.getParams());
|
||||
return browsingService.getIndexes(subsonic.getParams(), musicFolderId, ifModifiedSince);
|
||||
}
|
||||
|
||||
public Call<ApiResponse> getMusicDirectory(String id) {
|
||||
|
||||
@@ -15,7 +15,7 @@ public interface BrowsingService {
|
||||
Call<ApiResponse> getMusicFolders(@QueryMap Map<String, String> params);
|
||||
|
||||
@GET("getIndexes")
|
||||
Call<ApiResponse> getIndexes(@QueryMap Map<String, String> params);
|
||||
Call<ApiResponse> getIndexes(@QueryMap Map<String, String> params, @Query("musicFolderId") String musicFolderId, @Query("ifModifiedSince") Long ifModifiedSince);
|
||||
|
||||
@GET("getMusicDirectory")
|
||||
Call<ApiResponse> getMusicDirectory(@QueryMap Map<String, String> params, @Query("id") String id);
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.cappielloantonio.play.subsonic.models
|
||||
|
||||
import java.util.*
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
import java.util.Date
|
||||
|
||||
class Artist {
|
||||
@Parcelize
|
||||
class Artist : Parcelable {
|
||||
var id: String? = null
|
||||
var name: String? = null
|
||||
var starred: Date? = null
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
package com.cappielloantonio.play.subsonic.models
|
||||
|
||||
import java.util.*
|
||||
import android.os.Parcelable
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import kotlinx.parcelize.Parcelize
|
||||
import java.util.Date
|
||||
|
||||
class Directory {
|
||||
@Parcelize
|
||||
class Directory : Parcelable {
|
||||
@SerializedName("child")
|
||||
var children: List<Child>? = null
|
||||
var id: String? = null
|
||||
@SerializedName("parent")
|
||||
var parentId: String? = null
|
||||
var name: String? = null
|
||||
var starred: Date? = null
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
package com.cappielloantonio.play.subsonic.models
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
class Index {
|
||||
@SerializedName("artist")
|
||||
var artists: List<Artist>? = null
|
||||
var name: String? = null
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.cappielloantonio.play.subsonic.models
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
class Indexes {
|
||||
var shortcuts: List<Artist>? = null
|
||||
@SerializedName("index")
|
||||
var indices: List<Index>? = null
|
||||
var children: List<Child>? = null
|
||||
var lastModified: Long = 0
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
package com.cappielloantonio.play.subsonic.models
|
||||
|
||||
class MusicFolder {
|
||||
var id = 0
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
@Parcelize
|
||||
class MusicFolder : Parcelable {
|
||||
var id: String? = null
|
||||
var name: String? = null
|
||||
}
|
||||
@@ -1,5 +1,8 @@
|
||||
package com.cappielloantonio.play.subsonic.models
|
||||
|
||||
import com.google.gson.annotations.SerializedName
|
||||
|
||||
class MusicFolders {
|
||||
@SerializedName("musicFolder")
|
||||
var musicFolders: List<MusicFolder>? = null
|
||||
}
|
||||
Reference in New Issue
Block a user