Updated README to mention community localization effort. Fixed a crash with Android media controls when a cover art HTTP call would return an error status code.

This commit is contained in:
Antoine POPINEAU 2020-06-10 10:51:23 +02:00
parent 72a77221e6
commit 97b7dc2a61
No known key found for this signature in database
GPG Key ID: A78AC64694F84063
2 changed files with 12 additions and 9 deletions

View File

@ -4,7 +4,7 @@
[![](https://img.shields.io/travis/apognu/otter/master?style=flat-square)](https://travis-ci.org/apognu/otter)
[![](https://img.shields.io/badge/Play%20Store-otter-informational?style=flat-square)](https://play.google.com/store/apps/details?id=com.github.apognu.otter)
[![](https://img.shields.io/badge/IzzySoft-otter-informational?style=flat-square)](https://apt.izzysoft.de/fdroid/index/apk/com.github.apognu.otter)
[![](https://img.shields.io/badge/APK-otter-informational?style=flat-square)](https://github.com/apognu/otter/releases)
[![](https://img.shields.io/badge/APK-otter-informational?style=flat-square)](https://github.com/apognu/otter/releases) [![](https://translate.funkwhale.audio/widgets/otter/-/android/svg-badge.svg)](https://translate.funkwhale.audio/projects/otter/android/)
Otter is a native Android music player for [Funkwhale](https://funkwhale.audio), native to both Android (developed in Kotlin) and to Funkwhale (uses its native API instead of Subsonic).
@ -27,11 +27,8 @@ Otter's features, as of this writing, are the following:
Otter will try to behave as you would expect a mobile music player to, meaning integrating with the OS's media controls (including headset controls) or pause on incoming calls. If there is anything you would like it to do, please [open an issue](https://github.com/apognu/otter/issues/new).
## Roadmap
## Translation
Here is a (non-binding, unfinished) list of what we would like Otter to be able to do - _eventually_:
Otter is being translated by the community through [Weblate](https://translate.funkwhale.audio/projects/otter/android/). If you would like to contribute to its localization or add a new language, you can help out there.
* F-Droid listing
* Playlist management (including creation and adding/removing of tracks)
* Chromecast support
* Download ("pin in cache") tracks
Thanks to the Funkwhale project for hosting us on their instance.

View File

@ -52,7 +52,8 @@ class MediaControlsManager(val context: Service, private val mediaSession: Media
putLong(MediaMetadata.METADATA_KEY_DURATION, (track.bestUpload()?.duration?.toLong() ?: 0L) * 1000)
cover?.let {
putBitmap(MediaMetadata.METADATA_KEY_ALBUM_ART, it.get())
try { putBitmap(MediaMetadata.METADATA_KEY_ALBUM_ART, it.get()) }
catch (_: Exception) {}
}
}.build())
@ -69,7 +70,12 @@ class MediaControlsManager(val context: Service, private val mediaSession: Media
)
.setSmallIcon(R.drawable.ottericon)
.run {
if (cover != null) setLargeIcon(cover.get())
if (cover != null) {
try { setLargeIcon(cover.get()) }
catch (_: Exception) {}
this
}
else this
}
.setContentTitle(track.title)