mirror of
https://github.com/antebudimir/tempus.git
synced 2026-04-15 16:27:26 +00:00
Android Auto: improve media service browsing (#437)
* Add Android Auto icons and improve media service browsing * chore: changelog and build updated for release * add grid/list setting for playlist, podcast and radio --------- Co-authored-by: eddyizm <eddyizm@gmail.com>
This commit is contained in:
parent
145bb82eb0
commit
3ba2255205
26 changed files with 739 additions and 279 deletions
|
|
@ -90,8 +90,17 @@ object Preferences {
|
|||
private const val ARTIST_DISPLAY_BIOGRAPHY= "artist_display_biography"
|
||||
private const val NETWORK_PING_TIMEOUT = "network_ping_timeout_base"
|
||||
|
||||
|
||||
@JvmStatic
|
||||
private const val AA_ALBUM_VIEW = "androidauto_album_view"
|
||||
private const val AA_HOME_VIEW = "androidauto_home_view"
|
||||
private const val AA_PLAYLIST_VIEW = "androidauto_playlist_view"
|
||||
private const val AA_PODCAST_VIEW = "androidauto_podcast_view"
|
||||
private const val AA_RADIO_VIEW = "androidauto_radio_view"
|
||||
private const val AA_FIRST_TAB = "androidauto_first_tab"
|
||||
private const val AA_SECOND_TAB = "androidauto_second_tab"
|
||||
private const val AA_THIRD_TAB = "androidauto_third_tab"
|
||||
private const val AA_FOURTH_TAB = "androidauto_fourth_tab"
|
||||
|
||||
@JvmStatic
|
||||
fun getServer(): String? {
|
||||
return App.getInstance().preferences.getString(SERVER, null)
|
||||
}
|
||||
|
|
@ -736,4 +745,50 @@ object Preferences {
|
|||
fun setArtistDisplayBiography(displayBiographyEnabled: Boolean) {
|
||||
App.getInstance().preferences.edit().putBoolean(ARTIST_DISPLAY_BIOGRAPHY, displayBiographyEnabled).apply()
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun isAndroidAutoAlbumViewEnabled(): Boolean {
|
||||
return App.getInstance().preferences.getBoolean(AA_ALBUM_VIEW, true)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun isAndroidAutoHomeViewEnabled(): Boolean {
|
||||
return App.getInstance().preferences.getBoolean(AA_HOME_VIEW, false)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun isAndroidAutoPlaylistViewEnabled(): Boolean {
|
||||
return App.getInstance().preferences.getBoolean(AA_PLAYLIST_VIEW, false)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun isAndroidAutoPodcastViewEnabled(): Boolean {
|
||||
return App.getInstance().preferences.getBoolean(AA_PODCAST_VIEW, false)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun isAndroidAutoRadioViewEnabled(): Boolean {
|
||||
return App.getInstance().preferences.getBoolean(AA_RADIO_VIEW, false)
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getAndroidAutoFirstTab(): Int {
|
||||
return App.getInstance().preferences.getString(AA_FIRST_TAB, "0")!!.toInt()
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getAndroidAutoSecondTab(): Int {
|
||||
return App.getInstance().preferences.getString(AA_SECOND_TAB, "1")!!.toInt()
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getAndroidAutoThirdTab(): Int {
|
||||
return App.getInstance().preferences.getString(AA_THIRD_TAB, "2")!!.toInt()
|
||||
}
|
||||
|
||||
@JvmStatic
|
||||
fun getAndroidAutoFourthTab(): Int {
|
||||
return App.getInstance().preferences.getString(AA_FOURTH_TAB, "3")!!.toInt()
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue