@ -35,14 +35,19 @@ class RadioPlayer(val context: Context, val scope: CoroutineScope) {
@@ -35,14 +35,19 @@ class RadioPlayer(val context: Context, val scope: CoroutineScope) {
private val favoritedRepository = FavoritedRepository ( context )
init {
Cache . get ( context , " radio_type " ) ?. readLine ( ) ?. log ( )
Cache . get ( context , " radio_id " ) ?. readLine ( ) ?. log ( )
Cache . get ( context , " radio_session " ) ?. readLine ( ) ?. log ( )
Cache . get ( context , " radio_cookie " ) ?. readLine ( ) ?. log ( )
Cache . get ( context , " radio_type " ) ?. readLine ( ) ?. let { radio _type ->
Cache . get ( context , " radio_id " ) ?. readLine ( ) ?. toInt ( ) ?. let { radio _id ->
Cache . get ( context , " radio_session " ) ?. readLine ( ) ?. toInt ( ) ?. let { radio _session ->
Cache . get ( context , " radio_cookie " ) ?. readLine ( ) ?. let { radio _cookie ->
currentRadio = Radio ( radio _id , radio _type , " " , " " )
session = radio _session
cookie = radio _cookie
}
val cachedCookie = Cache . get ( context , " radio_cookie " ) ?. readLine ( )
currentRadio = Radio ( radio _id , radio _type , " " , " " )
session = radio _session
cookie = cachedCookie
}
}
}