Browse Source

Sort radios, playlists and favorites by name.

housekeeping/remove-warnings
Antoine POPINEAU 4 years ago
parent
commit
5d397ab1fe
No known key found for this signature in database
GPG Key ID: A78AC64694F84063
  1. 2
      app/src/main/java/com/github/apognu/otter/repositories/FavoritesRepository.kt
  2. 2
      app/src/main/java/com/github/apognu/otter/repositories/PlaylistsRepository.kt
  3. 2
      app/src/main/java/com/github/apognu/otter/repositories/RadiosRepository.kt

2
app/src/main/java/com/github/apognu/otter/repositories/FavoritesRepository.kt

@ -15,7 +15,7 @@ import java.io.BufferedReader @@ -15,7 +15,7 @@ import java.io.BufferedReader
class FavoritesRepository(override val context: Context?) : Repository<Track, TracksCache>() {
override val cacheId = "favorites.v2"
override val upstream = HttpUpstream<Track, FunkwhaleResponse<Track>>(HttpUpstream.Behavior.AtOnce, "/api/v1/tracks/?favorites=true&playable=true", object : TypeToken<TracksResponse>() {}.type)
override val upstream = HttpUpstream<Track, FunkwhaleResponse<Track>>(HttpUpstream.Behavior.AtOnce, "/api/v1/tracks/?favorites=true&playable=true&ordering=title", object : TypeToken<TracksResponse>() {}.type)
override fun cache(data: List<Track>) = TracksCache(data)
override fun uncache(reader: BufferedReader) = gsonDeserializerOf(TracksCache::class.java).deserialize(reader)

2
app/src/main/java/com/github/apognu/otter/repositories/PlaylistsRepository.kt

@ -11,7 +11,7 @@ import java.io.BufferedReader @@ -11,7 +11,7 @@ import java.io.BufferedReader
class PlaylistsRepository(override val context: Context?) : Repository<Playlist, PlaylistsCache>() {
override val cacheId = "tracks-playlists"
override val upstream = HttpUpstream<Playlist, FunkwhaleResponse<Playlist>>(HttpUpstream.Behavior.Progressive, "/api/v1/playlists/?playable=true", object : TypeToken<PlaylistsResponse>() {}.type)
override val upstream = HttpUpstream<Playlist, FunkwhaleResponse<Playlist>>(HttpUpstream.Behavior.Progressive, "/api/v1/playlists/?playable=true&ordering=name", object : TypeToken<PlaylistsResponse>() {}.type)
override fun cache(data: List<Playlist>) = PlaylistsCache(data)
override fun uncache(reader: BufferedReader) = gsonDeserializerOf(PlaylistsCache::class.java).deserialize(reader)

2
app/src/main/java/com/github/apognu/otter/repositories/RadiosRepository.kt

@ -11,7 +11,7 @@ import java.io.BufferedReader @@ -11,7 +11,7 @@ import java.io.BufferedReader
class RadiosRepository(override val context: Context?) : Repository<Radio, RadiosCache>() {
override val cacheId = "radios"
override val upstream = HttpUpstream<Radio, FunkwhaleResponse<Radio>>(HttpUpstream.Behavior.Progressive, "/api/v1/radios/radios/", object : TypeToken<RadiosResponse>() {}.type)
override val upstream = HttpUpstream<Radio, FunkwhaleResponse<Radio>>(HttpUpstream.Behavior.Progressive, "/api/v1/radios/radios/?ordering=name", object : TypeToken<RadiosResponse>() {}.type)
override fun cache(data: List<Radio>) = RadiosCache(data)
override fun uncache(reader: BufferedReader) = gsonDeserializerOf(RadiosCache::class.java).deserialize(reader)

Loading…
Cancel
Save