fix: only delete app-managed files when clearing download storage#672
Closed
thereisnotime wants to merge 26 commits into
Closed
fix: only delete app-managed files when clearing download storage#672thereisnotime wants to merge 26 commits into
thereisnotime wants to merge 26 commits into
Conversation
* feat: handle crashes gracefully * fix: missing strings --------- Co-authored-by: eddyizm <eddyizm@gmail.com>
* First tests # Conflicts: # app/src/main/java/com/cappielloantonio/tempo/util/Preferences.kt # app/src/main/res/values-b+es+419/arrays.xml # app/src/main/res/values-de/arrays.xml # app/src/main/res/values-es-rES/arrays.xml # app/src/main/res/values-fr/arrays.xml # app/src/main/res/values-pl/arrays.xml # app/src/main/res/values-ru/arrays.xml # app/src/main/res/values/arrays.xml # app/src/main/res/xml/global_preferences.xml # app/src/tempus/java/com/cappielloantonio/tempo/service/MediaBrowserTree.kt * Corrections after rebase * final version * Added index guard --------- Co-authored-by: eddyizm <eddyizm@gmail.com>
Co-authored-by: eddyizm <eddyizm@gmail.com>
* Add eddyizm#576 * eddyizm#570 (arrays.xml) * eddyizm#570 (strings.xml) * Add eddyizm#595 * for you * Add eddyizm#606 * Add eddyizm#609 * Add eddyizm#620 and rename replaygain * typo * Missing stuff * Add eddyizm#617 * Add eddyizm#611 * Add eddyizm#614 (strings.xml) * Add eddyizm#614 (arrays.xml)
…ddyizm#617) * Implement sleep timer * Revert "Implement sleep timer" * Implement sleep timer * Sleep timer adjustments and custom time option * Sleep timer localizations, theming, and new features 1. Process-death survival 2. End-of-track mode 3. Fade-out 4. Theme-aware icon 5. Localized duration labels * Sleep timer "End of track" fix * Fade out fix --------- Co-authored-by: eddyizm <eddyizm@gmail.com>
Refactor custom commands Co-authored-by: eddyizm <eddyizm@gmail.com>
* feat: saving full playlist detail in db and created pinned playlist table to track faves * chore: uncommented automigration * feat: added sorting by date, song count, pinned, etc * feat: added preference auto saving and apply to home view. * feat: saving playlist id/name to download track * feat: expands playlsit sorting and adds back pinned/faves
* Implement sleep timer * Revert "Implement sleep timer" * Implement sleep timer * Sleep timer adjustments and custom time option * feat: add lyrics to player quick actions * Sleep timer localizations, theming, and new features 1. Process-death survival 2. End-of-track mode 3. Fade-out 4. Theme-aware icon 5. Localized duration labels * Sleep timer "End of track" fix * Fade out fix * feat: add lyrics to player quick actions --------- Co-authored-by: CtznSniiips <88013463+CtznSniiips@users.noreply.github.com> Co-authored-by: eddyizm <eddyizm@gmail.com>
* chore(i18n): Update Spanish (Spain, es-ES) translation * chore(i18n): Update Spanish (Spain, es-ES) translation --------- Co-authored-by: eddyizm <eddyizm@gmail.com>
style: Add darker/AMOLED theme Co-authored-by: eddyizm <eddyizm@gmail.com>
Co-authored-by: eddyizm <eddyizm@gmail.com>
* feat: save radio list locally for offline access (eddyizm#520) Cache internet radio stations to Room database on successful API fetch. Fall back to cached data when server is unreachable (HTTP 504 or network failure), ensuring the radio list remains available offline. * fix: fall back to original radio media item when server is unreachable When the Subsonic server is down, AutomotiveRepository.getInternetRadioStations() throws an exception. Wrap the call with Futures.catchingAsync() to fall back to the original media item so radio playback works offline. --------- Co-authored-by: Rouven Volkmann <gitlab@rouven-volkmann.de>
* Initial working version of modified startQueue function that starts the first 10 songs before loading the rest * Minor change to enqueue function to collect media details off the main thread Tidied up startQueue function changes * removed accidental duplicate queue task * avoid duplicate calls * removed imports used in testing * remove the listener before running enqueue so we dont accidently run it multiple times if the player changes state before enqueue completes --------- Co-authored-by: Arrillo Dev <opensource@arrillo.com>
…ddyizm#635) Co-authored-by: eddyizm <eddyizm@gmail.com>
Remove AA settings in degoogled flavor Co-authored-by: eddyizm <eddyizm@gmail.com>
Limiting number of tracks in playlists Co-authored-by: eddyizm <eddyizm@gmail.com>
…eForYouBuilder (eddyizm#640) reduce code duplication Co-authored-by: eddyizm <eddyizm@gmail.com>
* fix: equalizer glitching navigation * fix: inconsistent navigation on equalizer --------- Co-authored-by: eddyizm <eddyizm@gmail.com>
* feat: add settings for track number display * feat: add track number on now playing screen * chore: better description of setting --------- Co-authored-by: eddyizm <eddyizm@gmail.com>
* feat: add drawer to landscape layout of crash activity and remove the bottom navbar on landscape as well * feat: add landscape layout to crash info fragment * feat: add landscape layout to crash export fragment * feat: add landscape layout to crash logs fragment * fix: toolbar not initiated nor configured --------- Co-authored-by: eddyizm <eddyizm@gmail.com>
…position (eddyizm#651) If the current period is seekable, it is very likely that the audio file is not being transcoded and that reloading the source would result in playback being restarted from the start the file. Fixes eddyizm#650. Co-authored-by: eddyizm <eddyizm@gmail.com>
Owner
|
Hi @thereisnotime If you can separate the ci workflow from this PR, it can get reviewed on its own. |
Author
justfile covers the most common dev tasks: debug/release builds for both flavors, lint, unit tests, APK listing, dependency inspection, and Gradle wrapper upgrades. CI runs lint + unit tests on every push and PR to main/development, then gates a debug build on passing checks. Lint reports and test results are uploaded as artifacts for easy inspection.
The delete loop in DeleteDownloadStorageDialog was calling file.delete() on every file in the user-selected folder, wiping anything else stored there alongside app downloads. Now it checks each filename against ExternalDownloadMetadataStore before deleting, so only files the app actually downloaded are removed. The normalization logic that was duplicated in ExternalAudioWriter is consolidated into ExternalDownloadMetadataStore.normalizeKey() so both codepaths stay in sync. Fixes eddyizm#588
ffef90c to
177da43
Compare
Author
|
Superseded by #675 which targets the development branch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #588.
What was happening
DeleteDownloadStorageDialogcalledfile.delete()on every file in the user-selected download folder with no ownership check. If the user pointed the app at a folder that also contained other files, those were deleted too.Fix
Before deleting, each file is now checked against
ExternalDownloadMetadataStore. Only files the app recorded as downloads are removed.ExternalDownloadMetadataStoregets two new methods:isTrackedFile(String fileName)— strips the extension, normalizes the base name, and checks the storenormalizeKey(String name)— the shared normalization logic (previously duplicated privately inExternalAudioWriter);ExternalAudioWriter.normalizeForComparisonnow delegates to it so both stay in syncChanges
DeleteDownloadStorageDialog.java— guardfile.delete()withisTrackedFilecheckExternalDownloadMetadataStore.java— addisTrackedFileandnormalizeKeyExternalAudioWriter.java— delegatenormalizeForComparisontonormalizeKey, remove duplicate logic