[PR #1471] [MERGED] Remove local only android #1595

Closed
opened 2026-04-24 23:59:33 +02:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/advplyr/audiobookshelf-app/pull/1471
Author: @nichwall
Created: 2/8/2025
Status: Merged
Merged: 2/18/2025
Merged by: @advplyr

Base: masterHead: remove_local_only_android


📝 Commits (7)

  • 9492975 Remove: local only items from frontend
  • b2ebeaf Autoformatting files
  • 1e0f1f3 Clean local only when checking if files exist
  • 7c6e098 Remove: local library only item from playback and syncing media
  • 20206d6 Remove: unused functions from LocalMediaItem.kt
  • f0c92be Auto format FolderScanner.kt
  • 2b615a5 Remove: unused AudioProbeResult.kt

📊 Changes

14 files changed (+1834 additions, -1217 deletions)

View changed files

android/app/src/main/java/com/audiobookshelf/app/data/AudioProbeResult.kt (+0 -74)
📝 android/app/src/main/java/com/audiobookshelf/app/data/AudioTrack.kt (+20 -17)
📝 android/app/src/main/java/com/audiobookshelf/app/data/LocalMediaItem.kt (+40 -45)
📝 android/app/src/main/java/com/audiobookshelf/app/data/MediaItemHistory.kt (+10 -10)
📝 android/app/src/main/java/com/audiobookshelf/app/data/PlaybackSession.kt (+205 -108)
📝 android/app/src/main/java/com/audiobookshelf/app/device/FolderScanner.kt (+337 -129)
📝 android/app/src/main/java/com/audiobookshelf/app/managers/DbManager.kt (+107 -79)
📝 android/app/src/main/java/com/audiobookshelf/app/media/MediaEventManager.kt (+63 -42)
📝 android/app/src/main/java/com/audiobookshelf/app/media/MediaProgressSyncer.kt (+94 -58)
📝 android/app/src/main/java/com/audiobookshelf/app/player/PlayerNotificationService.kt (+942 -616)
📝 components/cards/LazyBookCard.vue (+1 -5)
📝 components/cards/LazyListBookCard.vue (+2 -6)
📝 pages/item/_id/index.vue (+4 -11)
📝 pages/media/_id/history.vue (+9 -17)

📄 Description

Overview

This PR cleans up a lot of the "local only" related logic from Android. The ABS Android app removed support for media which was not downloaded directly through the app (i.e. scanning local media from the file system) in app version 0.9.67-beta, released November 2023. "Local only" media is defined as media which is not linked to an ABS server.

The front-end is updated to not include local only checks or displays, and the back-end cleans the database of local only entries when initialized and checking for missing files to allow "local only" checks and logic to be removed.

Local progress for media downloaded from the server is still tracked when connected to a different server, as a different user, or when not connected to any server.

Detailed description

Notable commit summary:

  1. Remove local only items from front end (both checks and the download icon)
  2. General auto-formatting of files, no other code changes
  3. Delete any local only files in the Paper DB when the database is initialized. I have never had any local only items, so this is only tested in that case.
  4. Remove creation and unused isLocalOnly from playback sessions and media progress
  5. Removing unused functions which were only used to get chapter metadata from local only files. These functions are not called from anywhere.
  6. Auto-formatting FolderScanner in preparation for commit 7
  7. Remove unused AudioProbeResult. This class is only used when scanning local only files, so the class was removed as well as all references. The references were not actually used anywhere else, but the data did exist in AudioTrack, referenced in FolderScanner.

Testing

This was tested on a Pixel 6a using Android 15.

I have never had local only media and I am not sure how to add this sort of test data into the database within the app easily, so I am not 100% sure that the deletion is in the correct place. I am currently deleting the local only items during database initialization, which I believe would happen before anything else tries to load data. Because this functionality was removed over a year ago I don't expect the changes to the database to affect many people either.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/advplyr/audiobookshelf-app/pull/1471 **Author:** [@nichwall](https://github.com/nichwall) **Created:** 2/8/2025 **Status:** ✅ Merged **Merged:** 2/18/2025 **Merged by:** [@advplyr](https://github.com/advplyr) **Base:** `master` ← **Head:** `remove_local_only_android` --- ### 📝 Commits (7) - [`9492975`](https://github.com/advplyr/audiobookshelf-app/commit/9492975a74a2d3689b5fc7c500bda09524c5e783) Remove: local only items from frontend - [`b2ebeaf`](https://github.com/advplyr/audiobookshelf-app/commit/b2ebeafed5a0831f850f91ba5fbab06ad6fe1d46) Autoformatting files - [`1e0f1f3`](https://github.com/advplyr/audiobookshelf-app/commit/1e0f1f329fb6a5d1d285542ff833844dece4b03f) Clean local only when checking if files exist - [`7c6e098`](https://github.com/advplyr/audiobookshelf-app/commit/7c6e09801486cdddb962695ccc68491f3e3d8bc6) Remove: local library only item from playback and syncing media - [`20206d6`](https://github.com/advplyr/audiobookshelf-app/commit/20206d6e14209f169bc8a8d4f8bafd4b98892f6f) Remove: unused functions from `LocalMediaItem.kt` - [`f0c92be`](https://github.com/advplyr/audiobookshelf-app/commit/f0c92be5f2461897579fa12073ef91ce6d37466a) Auto format `FolderScanner.kt` - [`2b615a5`](https://github.com/advplyr/audiobookshelf-app/commit/2b615a51fbe555bba72d94499ff92e208677de3a) Remove: unused `AudioProbeResult.kt` ### 📊 Changes **14 files changed** (+1834 additions, -1217 deletions) <details> <summary>View changed files</summary> ➖ `android/app/src/main/java/com/audiobookshelf/app/data/AudioProbeResult.kt` (+0 -74) 📝 `android/app/src/main/java/com/audiobookshelf/app/data/AudioTrack.kt` (+20 -17) 📝 `android/app/src/main/java/com/audiobookshelf/app/data/LocalMediaItem.kt` (+40 -45) 📝 `android/app/src/main/java/com/audiobookshelf/app/data/MediaItemHistory.kt` (+10 -10) 📝 `android/app/src/main/java/com/audiobookshelf/app/data/PlaybackSession.kt` (+205 -108) 📝 `android/app/src/main/java/com/audiobookshelf/app/device/FolderScanner.kt` (+337 -129) 📝 `android/app/src/main/java/com/audiobookshelf/app/managers/DbManager.kt` (+107 -79) 📝 `android/app/src/main/java/com/audiobookshelf/app/media/MediaEventManager.kt` (+63 -42) 📝 `android/app/src/main/java/com/audiobookshelf/app/media/MediaProgressSyncer.kt` (+94 -58) 📝 `android/app/src/main/java/com/audiobookshelf/app/player/PlayerNotificationService.kt` (+942 -616) 📝 `components/cards/LazyBookCard.vue` (+1 -5) 📝 `components/cards/LazyListBookCard.vue` (+2 -6) 📝 `pages/item/_id/index.vue` (+4 -11) 📝 `pages/media/_id/history.vue` (+9 -17) </details> ### 📄 Description ## Overview This PR cleans up a lot of the "local only" related logic from Android. The ABS Android app removed support for media which was not downloaded directly through the app (i.e. scanning local media from the file system) in app version `0.9.67-beta`, released November 2023. "Local only" media is defined as media which is not linked to an ABS server. The front-end is updated to not include local only checks or displays, and the back-end cleans the database of local only entries when initialized and checking for missing files to allow "local only" checks and logic to be removed. Local progress for media downloaded from the server is still tracked when connected to a different server, as a different user, or when not connected to any server. ## Detailed description Notable commit summary: 1. Remove local only items from front end (both checks and the download icon) 2. General auto-formatting of files, no other code changes 3. Delete any local only files in the Paper DB when the database is initialized. I have never had any local only items, so this is only tested in that case. 4. Remove creation and unused `isLocalOnly` from playback sessions and media progress 5. Removing unused functions which were only used to get chapter metadata from local only files. These functions are not called from anywhere. 6. Auto-formatting `FolderScanner` in preparation for commit 7 7. Remove unused `AudioProbeResult`. This class is only used when scanning local only files, so the class was removed as well as all references. The references were not actually used anywhere else, but the data did exist in `AudioTrack`, referenced in `FolderScanner`. ## Testing This was tested on a Pixel 6a using Android 15. I have never had local only media and I am not sure how to add this sort of test data into the database within the app easily, so I am not 100% sure that the deletion is in the correct place. I am currently deleting the local only items during database initialization, which I believe would happen before anything else tries to load data. Because this functionality was removed over a year ago I don't expect the changes to the database to affect many people either. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2026-04-24 23:59:33 +02:00
adam closed this issue 2026-04-24 23:59:33 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf-app#1595