advplyr / audiobookshelf-app

Mobile application for Audiobookshelf
https://audiobookshelf.org
GNU General Public License v3.0
1.32k stars 173 forks source link

Ensure that there is files available before playing local content #1358

Closed ISO-B closed 2 weeks ago

ISO-B commented 3 weeks ago

This should fix #105 . This wont work 100% with books that have multiple books.

If there is way to know how many files there should be then this can easily be extended for multi file books.

advplyr commented 2 weeks ago

This only works after re-opening the app because on first load the cleanLocalLibraryItems function gets ran that updates the LocalLibraryItem data removing any files that are no longer there.

ISO-B commented 2 weeks ago

Added check that files really exists. Now it prevents playing book if file is removed while app is running.

advplyr commented 2 weeks ago

Thanks! I wanted to push an additional update in this PR but I don't think permission was given.

Typically this is shown. image

but it wasn't shown on this PR.