Json Decoding Exception Fix

This commit is contained in:
Shabinder Singh 2021-05-28 00:16:43 +05:30
parent c5e502de00
commit a1053ee73c
2 changed files with 2 additions and 6 deletions

View File

@ -16,7 +16,7 @@ data class SaavnSong @OptIn(ExperimentalSerializationApi::class) constructor(
val duration: String, val duration: String,
val encrypted_media_path: String, val encrypted_media_path: String,
val encrypted_media_url: String, val encrypted_media_url: String,
val explicit_content: Int = 0, // val explicit_content: Int = 0,
val has_lyrics: Boolean = false, val has_lyrics: Boolean = false,
val id: String, val id: String,
val image: String, val image: String,
@ -31,7 +31,7 @@ data class SaavnSong @OptIn(ExperimentalSerializationApi::class) constructor(
val music_id: String, val music_id: String,
val origin: String? = null, val origin: String? = null,
val perma_url: String? = null, val perma_url: String? = null,
val play_count: Int = 0, // val play_count: Int = 0,
val primary_artists: String, val primary_artists: String,
val primary_artists_id: String, val primary_artists_id: String,
val release_date: String, // Format - 2021-05-04 val release_date: String, // Format - 2021-05-04

View File

@ -56,10 +56,6 @@ expect class Dir(
fun addToLibrary(path: String) fun addToLibrary(path: String)
} }
/*
* Do we have Analytics Permission?
* - Defaults to `False`
* */
val Dir.isAnalyticsEnabled get() = settings.getBooleanOrNull(AnalyticsKey) ?: false val Dir.isAnalyticsEnabled get() = settings.getBooleanOrNull(AnalyticsKey) ?: false
fun Dir.enableAnalytics() = settings.putBoolean(AnalyticsKey, true) fun Dir.enableAnalytics() = settings.putBoolean(AnalyticsKey, true)