LeoKlaus / plappa

An Audiobook client for Jellyfin and AudioBookShelf, written in Swift/SwiftUI.
https://plappa.me
160 stars 0 forks source link

[BUG] Pull to Refresh not removing Deleted Audiobooks #32

Closed mutschler closed 2 months ago

mutschler commented 2 months ago

Describe the bug Pulling down on Books Tab won't remove deleted Audiobooks

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Books'
  2. Delete book from the Server
  3. Pull down
  4. See error

Expected behavior Deleted books should be shown if they are not downloaded already

Environment(please complete the following information):

LeoKlaus commented 2 months ago

Hi mutschler, thanks for all the feedback!

This is definitely something to consider. Do you think a button in the settings tab to clear old entries/perform a full sync would suffice? I intentionally didn't implement automatic removal to allow people to access downloaded audiobooks, even if they're deleted from the server (though, now that I think about it, this could also be automatically checked).

mutschler commented 2 months ago

Idk I guess a button would work :) currently there is no way to refresh the view when the server removed a book expect of logging out and back in. But that removes all downloads as well.

I understand that deleting books from the device isn't the best idea if you'll already have them downloaded they should definitively stay available.

I think the best solution would be:

That way the user could still playback elements that where deleted on the server but have been downloaded locally. But keeping the reference to a non existing entry (remote and local) is confusing since you won't be able to download/play it anyway... and there is nothing indicating why it doesn't work!

Another solution would be to check for existence when it's selected and if the server doesn't know it show a message with the option to remove the entry.

LeoKlaus commented 2 months ago

Idk I guess a button would work :) currently there is no way to refresh the view when the server removed a book expect of logging out and back in. But that removes all downloads as well.

That's wildly inconvenient.

I think the best solution would be:

  • Get new list from the server
  • For every entry that's in the local database: check if it is downloaded if it is leave it alone, if it's not: delete it from the list

That's the approach I was thinking of, I think I'll do it that way.

Another solution would be to check for existence when it's selected and if the server doesn't know it show a message with the option to remove the entry.

That would probably also work well, great idea!

LeoKlaus commented 2 months ago

I just fixed this, the corresponding update should release in the next week.