Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 29 additions & 4 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ The Android Auto interface can be configured by user to best suit their preferen
- Home : Displays all functions not used in other tabs
- Recent : The 15 most recently listened-to albums
- Albums : Albums sorted by name
- Artists : Albums sorted by artist
- Artists : Albums sorted by artist or Artists, selected by preference
- Playlists
- Podcast : The 100 podcasts recently added
- Radio
Expand All @@ -209,25 +209,44 @@ The Android Auto interface can be configured by user to best suit their preferen

If all tabs are set to "Do not display", then "Home" tab will be created with all functions inside.

If "Home" is selected after another tab, it becomes "More"
If "Home" is selected after another tab, it becomes "More".

In addition, you can choose to display the following functions as thumbnails or lists:
- Home
- Albums (Last played, Most played, Recently added, Artists, Star tracks, Star albums, Star artists, Random)
- Albums (Last played, Most played, Recently added, Artists, Star albums, Star artists)
- Playlists
- Radio
- Podcast
As they displayed tracks, Star tracks, Random and Genres are always be displayed as a list.

<p align="left">
<img src="mockup/usage/aa_thumbnails.jpg" width=317 style="margin-right:16px;">
<img src="mockup/usage/aa_list.jpg" width=317>
</p>

Artists view and View by albums:
<p align="left">
<img src="mockup/usage/aa_artists_view1.jpg" width=317>
<img src="mockup/usage/aa_artists_view2.jpg" width=317 style="margin-right:16px;">
</p>

Starred Artists view:
<p align="left">
<img src="mockup/usage/aa_starred_artists_view.jpg" width=317>
</p>

On an artist's page, if they have at least 2 albums with a minimum of 20 tracks, an "Instant Mix by Tempus" album is added at the beginning.
This album features 12 tracks chosen randomly from their discography and is an one click play.

<p align="left">
<img src="mockup/usage/aa_instantMix.jpg" width=317>
</p>

The A-Z button allows you to jump to items starting with the chosen letter.

Search button returns albums or artists, even if they are not displayed by the selected function.

Results of the A-Z jump or search will always be displayed as a list.
Results of the A-Z jump will always be displayed as a list.

<p align="left">
<img src="mockup/usage/aa_AZ.jpg" width=317 style="margin-right:16px;">
Expand All @@ -236,6 +255,12 @@ Results of the A-Z jump or search will always be displayed as a list.

Display of albums and artists is limited to 500. For large libraries, it's preferable to use star albums or star artists.

Shortcuts are displayed only if the function is selected from root level:
- On albums page: jump to starred albums
- On starred albums page: jump to albums
- On artists page: jump to starred artists
- On starred artists page: jump to artists

### Server Settings
**IN PROGRESS**
- Manage multiple server connections
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,19 @@ object Constants {
const val AA_DIRECTORY_ID = "[directoryID]"
const val AA_ALBUM_ID = "[albumID]"
const val AA_ARTIST_ID = "[artistID]"
const val AA_JUMP_TO_ALBUMS_ID = "[jumpToAlbumsID]"
const val AA_JUMP_TO_STARRED_ALBUMS_ID = "[jumpToStarredAlbumsID]"
const val AA_JUMP_TO_ARTISTS_ID = "[jumpToArtistsID]"
const val AA_JUMP_TO_STARRED_ARTISTS_ID = "[jumpToStarredArtistsID]"
const val AA_ARTISTS_BY_ALBUMS_ID = "[artistsByAlbumsID]"

// Android Auto Source tag
const val AA_ALBUM_SOURCE = "[albumSource]"
const val AA_PLAYLIST_SOURCE = "[playlistSource]"

const val AA_INSTANTMIX_SOURCE = "[instantMixSource]"


// Android Auto start index extra
const val AA_START_INDEX = "aa_start_index"
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ object Preferences {
private const val AA_THIRD_TAB = "androidauto_third_tab"
private const val AA_FOURTH_TAB = "androidauto_fourth_tab"
private const val AA_SHUFFLE_GENRE_SONGS = "androidauto_shuffle_genre_songs"

@JvmStatic
fun getServer(): String? {
return App.getInstance().preferences.getString(SERVER, null)
Expand Down Expand Up @@ -769,6 +769,8 @@ object Preferences {
val parsed = App.getInstance().preferences.getString(TILE_SIZE, "2")?.toIntOrNull()
return parsed?.takeIf { it in 2..6 } ?: 2
}

@JvmStatic
fun isAndroidAutoAlbumViewEnabled(): Boolean {
return App.getInstance().preferences.getBoolean(AA_ALBUM_VIEW, true)
}
Expand Down Expand Up @@ -822,5 +824,5 @@ object Preferences {
fun setAndroidAutoShuffleGenreSongsEnabled(enabled: Boolean) {
App.getInstance().preferences.edit().putBoolean(AA_SHUFFLE_GENRE_SONGS, enabled).apply()
}

}
6 changes: 4 additions & 2 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
<string name="aa_starred_albums">★ Albums</string>
<string name="aa_starred_artists">★ Artistes</string>
<string name="aa_starred_tracks">★ Titres</string>

<string name="aa_instant_mix">Mix instantané</string>
<string name="aa_view_by_albums">Vue par albums</string>

<string name="activity_battery_optimizations_conclusion">Si vous rencontrez un problème, visitez https://dontkillmyapp.com. Des instructions pour désactiver les fonctions de sauvegarde d\'énergie qui pourrait affecter les performance de l\'app y sont disponibles.</string>
<string name="activity_battery_optimizations_summary">Veuillez désactiver les optimisations de la batterie pour permettre la lecture des médias lorsque l\'écran est éteint.</string>
<string name="activity_battery_optimizations_title">Optimisations de la batterie</string>
Expand Down Expand Up @@ -337,7 +339,7 @@
<string name="settings_allow_playlist_duplicates">Autoriser l\'ajout de doublons à une playlist</string>
<string name="settings_allow_playlist_duplicates_summary">Si activé, les doublons ne seront pas détectés à l\'ajout d\'un titre à une playlist.</string>
<string name="settings_androidauto">Android Auto</string>
<string name="settings_androidauto_album_view">Vue en grille des albums</string>
<string name="settings_androidauto_album_view">Vue en grille des albums et des artistes</string>
<string name="settings_androidauto_home_view">Vue en grille du menu accueil</string>
<string name="settings_androidauto_playlist_view">Vue en grille des playlists</string>
<string name="settings_androidauto_podcast_view">Vue en grille des podcasts</string>
Expand Down
7 changes: 5 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
<string name="aa_starred_albums">★ Albums</string>
<string name="aa_starred_artists">★ Artists</string>
<string name="aa_starred_tracks">★ Tracks</string>

<string name="aa_instant_mix">Instant mix</string>
<string name="aa_view_by_albums">View by albums</string>

<string name="activity_battery_optimizations_conclusion">If in trouble visit https://dontkillmyapp.com. It provides detailed instructions on how to disable any power-saving features that may affect app\'s performance.</string>
<string name="activity_battery_optimizations_summary">Please disable battery optimizations for media playback while the screen is off.</string>
<string name="activity_battery_optimizations_title">Battery Optimizations</string>
Expand Down Expand Up @@ -399,7 +401,7 @@
<string name="settings_podcast_summary">If enabled, show the podcast section. Restart the app for it to take full effect.</string>
<string name="settings_playlist_sort">Playlist sorting</string>
<string name="settings_androidauto">Android Auto</string>
<string name="settings_androidauto_album_view">Grid view for albums</string>
<string name="settings_androidauto_album_view">Grid view for albums and artists</string>
<string name="settings_androidauto_home_view">Grid view for home</string>
<string name="settings_androidauto_playlist_view">Grid view for playlists</string>
<string name="settings_androidauto_podcast_view">Grid view for podcast</string>
Expand All @@ -410,6 +412,7 @@
<string name="settings_androidauto_fourth_tab">Fourth tab display</string>
<string name="settings_androidauto_shuffle_genre_songs">Shuffle genre songs</string>
<string name="settings_androidauto_shuffle_genre_songs_summary">Play random songs when selecting a genre</string>
<string name="settings_androidauto_artists_view">Artists are displayed by album</string>
<string name="settings_audio_quality">Show audio quality</string>
<string name="settings_audio_quality_summary">The bitrate and audio format will be shown for each audio track.</string>
<string name="settings_song_rating">Show song star rating</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ object MediaBrowserTree {
treeNodes[Constants.AA_STARRED_TRACKS_ID] =
MediaItemNode(
buildMediaItem(
gridView = albumView,
gridView = false,
title = appContext.getString(R.string.aa_starred_tracks),
mediaId = Constants.AA_STARRED_TRACKS_ID,
isPlayable = false,
Expand Down Expand Up @@ -444,23 +444,29 @@ object MediaBrowserTree {
Constants.AA_ROOT_ID -> treeNodes[Constants.AA_ROOT_ID]?.getChildren()!!

Constants.AA_HOME_ID -> treeNodes[Constants.AA_HOME_ID]?.getChildren()!!
Constants.AA_LAST_PLAYED_ID -> automotiveRepository.getAlbums(Constants.AA_ALBUM_ID, "recent", 15)
Constants.AA_ALBUMS_ID -> automotiveRepository.getAlbums(Constants.AA_ALBUM_ID, "alphabeticalByName", 500)
Constants.AA_ARTISTS_ID -> automotiveRepository.getAlbums(Constants.AA_ALBUM_ID, "alphabeticalByArtist", 500)
Constants.AA_LAST_PLAYED_ID -> automotiveRepository.getAlbums(Constants.AA_ALBUM_ID, "recent", 15, false)
Constants.AA_ALBUMS_ID -> automotiveRepository.getAlbums(Constants.AA_ALBUM_ID, "alphabeticalByName", 500, true)
Constants.AA_ARTISTS_ID -> automotiveRepository.getArtists(Constants.AA_ARTIST_ID, 500, true)
Constants.AA_PLAYLIST_ID -> automotiveRepository.getPlaylists(Constants.AA_PLAYLIST_ID)
Constants.AA_PODCAST_ID -> automotiveRepository.getNewestPodcastEpisodes(100)
Constants.AA_RADIO_ID -> automotiveRepository.getInternetRadioStations()
Constants.AA_FOLDER_ID -> automotiveRepository.getMusicFolders(Constants.AA_FOLDER_ID)
Constants.AA_MOST_PLAYED_ID -> automotiveRepository.getAlbums(Constants.AA_ALBUM_ID, "frequent", 15)
Constants.AA_MOST_PLAYED_ID -> automotiveRepository.getAlbums(Constants.AA_ALBUM_ID, "frequent", 15, false)
//Constants.AA_RECENT_SONGS_ID -> automotiveRepository.getRecentlyPlayedSongs(getServerId(),30)
Constants.AA_RECENTLY_ADDED_ID -> automotiveRepository.getAlbums(Constants.AA_ALBUM_ID, "newest", 15)
Constants.AA_RECENTLY_ADDED_ID -> automotiveRepository.getAlbums(Constants.AA_ALBUM_ID, "newest", 15, false)
//Constants.AA_MADE_FOR_YOU_ID -> automotiveRepository.getStarredArtists(id)
Constants.AA_STARRED_TRACKS_ID -> automotiveRepository.starredSongs
Constants.AA_STARRED_ALBUMS_ID -> automotiveRepository.getStarredAlbums(Constants.AA_ALBUM_ID)
Constants.AA_STARRED_ARTISTS_ID -> automotiveRepository.getStarredArtists(Constants.AA_ARTIST_ID)
Constants.AA_STARRED_ALBUMS_ID -> automotiveRepository.getStarredAlbums(Constants.AA_ALBUM_ID, true)
Constants.AA_STARRED_ARTISTS_ID -> automotiveRepository.getStarredArtists(Constants.AA_ARTIST_ID, true)
Constants.AA_RANDOM_ID -> automotiveRepository.getRandomSongs(100)
Constants.AA_GENRES_ID -> automotiveRepository.getGenres(Constants.AA_GENRES_ID)

Constants.AA_JUMP_TO_ALBUMS_ID -> automotiveRepository.getAlbums(Constants.AA_ALBUM_ID, "alphabeticalByName", 500, false)
Constants.AA_JUMP_TO_STARRED_ALBUMS_ID -> automotiveRepository.getStarredAlbums(Constants.AA_ALBUM_ID, false)
Constants.AA_JUMP_TO_ARTISTS_ID -> automotiveRepository.getArtists(Constants.AA_ARTIST_ID, 500, false)
Constants.AA_JUMP_TO_STARRED_ARTISTS_ID -> automotiveRepository.getStarredArtists(Constants.AA_ARTIST_ID, false)
Constants.AA_ARTISTS_BY_ALBUMS_ID -> automotiveRepository.getAlbums(Constants.AA_ALBUM_ID, "alphabeticalByArtist", 500, false)

else -> {
/*
if (id.startsWith(MADE_FOR_YOU_ID)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,15 @@ open class MediaLibrarySessionCallback(
)
}

firstItem.mediaId?.startsWith(Constants.AA_INSTANTMIX_SOURCE) == true -> {
Log.d(TAG, "Fetching instant mix for $firstItem.mediaId")
Futures.transform(
automotiveRepository.getInstantMix(firstItem.mediaId.removePrefix(Constants.AA_INSTANTMIX_SOURCE), 12),
{ it.value ?: emptyList() },
MoreExecutors.directExecutor()
)
}

else -> {
Log.d(TAG, "Fallback queue for item ${firstItem.mediaId}")
val resolvedItems = ArrayList<MediaItem>()
Expand Down
Binary file added mockup/usage/aa_artists_view1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mockup/usage/aa_artists_view2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mockup/usage/aa_instantMix.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added mockup/usage/aa_starred_artists_view.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.