Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed: When we select any ZIM file using the file picker, it is not being added to the library screen. #3652

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

MohitMaliFtechiz
Copy link
Collaborator

Fixes #3650

  • This fix is particularly beneficial for slow storage or when the storage contains a large number of files, as the scanning process takes time to fully scan the storage and retrieve the ZIM files from it. If the user chooses a ZIM file via the file picker, our application is already aware that this ZIM file exists in the storage. Consequently, we save it directly to the database to ensure it appears on the local library screen.
  • After the scanning process is complete, the ZIM file will not appear twice on the local library screen since we have implemented handling to prevent the display of duplicate ZIM files.

As you can see in the below video, if we select the ZIM file via file picker it is added to the local library screen, and scanning is still in progress.

ZimFileAddingToLocalLibrary.mp4

Copy link

codecov bot commented Jan 3, 2024

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (329242e) 48.64% compared to head (7b4127d) 48.63%.
Report is 2 commits behind head on main.

❗ Current head 7b4127d differs from pull request most recent head 17068b5. Consider uploading reports for the commit 17068b5 to get more accurate results

Files Patch % Lines
...le/nav/destination/library/LocalLibraryFragment.kt 11.11% 7 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3652      +/-   ##
============================================
- Coverage     48.64%   48.63%   -0.01%     
- Complexity     1090     1091       +1     
============================================
  Files           285      285              
  Lines         10573    10582       +9     
  Branches       1417     1418       +1     
============================================
+ Hits           5143     5147       +4     
- Misses         4587     4592       +5     
  Partials        843      843              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kelson42
Copy link
Collaborator

kelson42 commented Jan 3, 2024

After the scanning process is complete, the ZIM file will not appear twice on the local library screen since we have implemented handling to prevent the display of duplicate ZIM files.

@MohitMaliFtechiz This should never ever appear as duplicate. Please confirm.

@MohitMaliFtechiz
Copy link
Collaborator Author

@kelson42 Yes this will not appear twice in the local library screen we only save unique books in the database that are showing inside the local library.

val uniqueBooks = uniqueBooksByFile(booksOnDisk)

@kelson42
Copy link
Collaborator

kelson42 commented Jan 5, 2024

Merging, pretty simple PR and PRs start to pile-up again :(

@kelson42 kelson42 merged commit bd27edc into main Jan 5, 2024
7 checks passed
@kelson42 kelson42 deleted the Fix#3650 branch January 5, 2024 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When we pick any ZIM file via file picker then it is not adding into library screen.
2 participants