mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-30 15:17:14 +02:00
Android Auto: Prevent crashing loop in case that app restarts while browsing content
This commit is contained in:
@@ -1042,6 +1042,12 @@ class PlayerNotificationService : MediaBrowserServiceCompat() {
|
|||||||
|
|
||||||
result.detach()
|
result.detach()
|
||||||
|
|
||||||
|
// Prevent crashing if app is restarted while browsing
|
||||||
|
if ((parentMediaId != DOWNLOADS_ROOT && parentMediaId != AUTO_MEDIA_ROOT) && !firstLoadDone){
|
||||||
|
result.sendResult(null)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (parentMediaId == DOWNLOADS_ROOT) { // Load downloads
|
if (parentMediaId == DOWNLOADS_ROOT) { // Load downloads
|
||||||
|
|
||||||
val localBooks = DeviceManager.dbManager.getLocalLibraryItems("book")
|
val localBooks = DeviceManager.dbManager.getLocalLibraryItems("book")
|
||||||
|
|||||||
Reference in New Issue
Block a user