diff --git a/android/app/src/main/java/com/audiobookshelf/app/data/DeviceClasses.kt b/android/app/src/main/java/com/audiobookshelf/app/data/DeviceClasses.kt index 4bb5c77e..40763a67 100644 --- a/android/app/src/main/java/com/audiobookshelf/app/data/DeviceClasses.kt +++ b/android/app/src/main/java/com/audiobookshelf/app/data/DeviceClasses.kt @@ -166,7 +166,7 @@ data class DeviceSettings( languageCode = "en-us", downloadUsingCellular = DownloadUsingCellularSetting.ALWAYS, streamingUsingCellular = StreamingUsingCellularSetting.ALWAYS, - androidAutoBrowseLimitForGrouping = 50, + androidAutoBrowseLimitForGrouping = 100, androidAutoBrowseSeriesSequenceOrder = AndroidAutoBrowseSeriesSequenceOrderSetting.ASC ) } diff --git a/android/app/src/main/java/com/audiobookshelf/app/player/PlayerNotificationService.kt b/android/app/src/main/java/com/audiobookshelf/app/player/PlayerNotificationService.kt index 9bc1340c..264acaf9 100644 --- a/android/app/src/main/java/com/audiobookshelf/app/player/PlayerNotificationService.kt +++ b/android/app/src/main/java/com/audiobookshelf/app/player/PlayerNotificationService.kt @@ -1372,8 +1372,9 @@ class PlayerNotificationService : MediaBrowserServiceCompat() { Log.d(tag, "Loading series from library ${mediaIdParts[2]} with paging ${mediaIdParts[4]}") mediaManager.loadLibrarySeriesWithAudio(mediaIdParts[2], mediaIdParts[4]) { seriesItems -> Log.d(tag, "Received ${seriesItems.size} series") - if (seriesItems.size > DeviceManager.deviceData.deviceSettings!!.androidAutoBrowseLimitForGrouping) { - val seriesLetters = seriesItems.groupingBy { iwb -> iwb.title.substring(0, mediaIdParts[4].length + 1).uppercase() }.eachCount() + + val seriesLetters = seriesItems.groupingBy { iwb -> iwb.title.substring(0, mediaIdParts[4].length + 1).uppercase() }.eachCount() + if (seriesItems.size > DeviceManager.deviceData.deviceSettings!!.androidAutoBrowseLimitForGrouping && seriesItems.size > 1 && seriesLetters.size > 1) { val children = seriesLetters.map { (seriesLetter, seriesCount) -> MediaBrowserCompat.MediaItem( MediaDescriptionCompat.Builder() @@ -1397,7 +1398,7 @@ class PlayerNotificationService : MediaBrowserServiceCompat() { Log.d(tag, "Loading series from library ${mediaIdParts[2]}") mediaManager.loadLibrarySeriesWithAudio(mediaIdParts[2]) { seriesItems -> Log.d(tag, "Received ${seriesItems.size} series") - if (seriesItems.size > DeviceManager.deviceData.deviceSettings!!.androidAutoBrowseLimitForGrouping) { + if (seriesItems.size > DeviceManager.deviceData.deviceSettings!!.androidAutoBrowseLimitForGrouping && seriesItems.size > 1) { val seriesLetters = seriesItems.groupingBy { iwb -> iwb.title.first().uppercaseChar() }.eachCount() val children = seriesLetters.map { (seriesLetter, seriesCount) -> MediaBrowserCompat.MediaItem( @@ -1443,8 +1444,9 @@ class PlayerNotificationService : MediaBrowserServiceCompat() { Log.d(tag, "Loading authors from library ${mediaIdParts[2]} with paging ${mediaIdParts[4]}") mediaManager.loadAuthorsWithBooks(mediaIdParts[2], mediaIdParts[4]) { authorItems -> Log.d(tag, "Received ${authorItems.size} authors") - if (authorItems.size > DeviceManager.deviceData.deviceSettings!!.androidAutoBrowseLimitForGrouping) { - val authorLetters = authorItems.groupingBy { iwb -> iwb.name.substring(0, mediaIdParts[4].length + 1).uppercase() }.eachCount() + + val authorLetters = authorItems.groupingBy { iwb -> iwb.name.substring(0, mediaIdParts[4].length + 1).uppercase() }.eachCount() + if (authorItems.size > DeviceManager.deviceData.deviceSettings!!.androidAutoBrowseLimitForGrouping && authorItems.size > 1 && authorLetters.size > 1) { val children = authorLetters.map { (authorLetter, authorCount) -> MediaBrowserCompat.MediaItem( MediaDescriptionCompat.Builder() @@ -1468,7 +1470,7 @@ class PlayerNotificationService : MediaBrowserServiceCompat() { Log.d(tag, "Loading authors from library ${mediaIdParts[2]}") mediaManager.loadAuthorsWithBooks(mediaIdParts[2]) { authorItems -> Log.d(tag, "Received ${authorItems.size} authors") - if (authorItems.size > DeviceManager.deviceData.deviceSettings!!.androidAutoBrowseLimitForGrouping) { + if (authorItems.size > DeviceManager.deviceData.deviceSettings!!.androidAutoBrowseLimitForGrouping && authorItems.size > 1) { val authorLetters = authorItems.groupingBy { iwb -> iwb.name.first().uppercaseChar() }.eachCount() val children = authorLetters.map { (authorLetter, authorCount) -> MediaBrowserCompat.MediaItem( diff --git a/pages/settings.vue b/pages/settings.vue index ddc8ccee..258d7375 100644 --- a/pages/settings.vue +++ b/pages/settings.vue @@ -210,7 +210,7 @@ export default { languageCode: 'en-us', downloadUsingCellular: 'ALWAYS', streamingUsingCellular: 'ALWAYS', - androidAutoBrowseLimitForGrouping: 50, + androidAutoBrowseLimitForGrouping: 100, androidAutoBrowseSeriesSequenceOrder: 'ASC' }, theme: 'dark', @@ -315,11 +315,11 @@ export default { ], androidAutoBrowseSeriesSequenceOrderItems: [ { - text: this.$strings.LabelAscending, + text: this.$strings.LabelSequenceAscending, value: 'ASC' }, { - text: this.$strings.LabelDescending, + text: this.$strings.LabelSequenceDescending, value: 'DESC' } ] diff --git a/strings/en-us.json b/strings/en-us.json index 902051b9..23877df7 100644 --- a/strings/en-us.json +++ b/strings/en-us.json @@ -87,7 +87,6 @@ "HeaderTableOfContents": "Table of Contents", "HeaderUserInterfaceSettings": "User Interface Settings", "HeaderYourStats": "Your Stats", - "LabelAscending": "Ascending", "LabelAddToPlaylist": "Add to Playlist", "LabelAddedAt": "Added At", "LabelAddedDate": "Added {0}", @@ -95,7 +94,7 @@ "LabelAllowSeekingOnMediaControls": "Allow position seeking on media notification controls", "LabelAlways": "Always", "LabelAndroidAutoBrowseLimitForGrouping": "Alphabetical drawdown limit", - "LabelAndroidAutoBrowseLimitForGroupingHelp": "Stop alphabetical drawdown when there is less than this amount of items to show", + "LabelAndroidAutoBrowseLimitForGroupingHelp": "Don't use alphabetical drawdown when there is less than this amount of items to show", "LabelAndroidAutoBrowseSeriesSequenceOrder": "Series books order", "LabelAskConfirmation": "Ask for confirmation", "LabelAuthor": "Author", @@ -120,7 +119,6 @@ "LabelContinueReading": "Continue Reading", "LabelContinueSeries": "Continue Series", "LabelCustomTime": "Custom time", - "LabelDescending": "Descending", "LabelDescription": "Description", "LabelDisableAudioFadeOut": "Disable audio fade out", "LabelDisableAudioFadeOutHelp": "Audio volume will start decreasing when there is less than 1 minute remaining on the sleep timer. Enable this setting to not fade out.", @@ -224,6 +222,8 @@ "LabelScaleElapsedTimeBySpeed": "Scale Elapsed Time by Speed", "LabelSeason": "Season", "LabelSelectADevice": "Select a device", + "LabelSequenceAscending": "Sequence Ascending", + "LabelSequenceDescending": "Sequence Descending", "LabelSeries": "Series", "LabelServerAddress": "Server address", "LabelSetEbookAsPrimary": "Set as primary",