TortugaPower / BookPlayer

Player for your DRM-free audiobooks
GNU General Public License v3.0
1.67k stars 198 forks source link

Bug: Cannot set title with emoji symbol #999

Open oluckyman opened 1 year ago

oluckyman commented 1 year ago

Environment

Description

In Edit screen when I try to save title with emoji symbol, it shows error with cryptic message and does not save my changes.

Error: "Old folder name" couldn't be moved to "Processed" because either the former doesn't exist, or the folder containing the latter doesn't exist.

image

Steps to reproduce the behavior

  1. Swipe left a folder
  2. Select Options…
  3. Select Details
  4. Add emoji symbol into Title field
  5. Tap Save … It shows error and does not allow to save changes.
harrisi commented 1 year ago

This seems to work fine for me, so I don't think it's just the emoji in the title.

Running BookPlayer 5.0.8-7, iOS 16.6.

IMG_1961

GianniCarlo commented 1 year ago

Yeah this looks like a problem with the backing folder on disk, as renaming a folder attempts to move the original folder 'Archive' to the new destination 'Archive 📚' and fails at this point

Screenshot 2023-09-05 at 16 09 27

Can you check on the app Files → On my iPhone → BookPlayer → Processed, if the folder is there? if for some reason it's not there, you can create it manually there, and on the app it should allow you to rename it, but I'm curious on how the backing folder disappeared, could you provide more context on the library hierarchy? and if this is on a secondary device that is using the sync feature? because when the app fetches new items from the server, it should create the backing folder(s) as well 🤔 (so probably something to do more tests on, and see if there's a bug in there)

oluckyman commented 1 year ago

Thanks for the quick response!

Processed folder exists. And has 3 books inside (but the library has more books). I have only one device with BookPlayer. The library hierarchy is almost flat. I move finished books into Archive folder, so it has the mix of single-file books, folder-with-files books and combined-into-volume books. And also, I uploaded artwork for Archive folder.

Initially I thought the problem is with emoji symbol, but now I tried to rename title without emoji and got the same error.

oluckyman commented 1 year ago

Just realized that the 3 books in the Processed folder are all that remain from my library of 22 books. If I tap on any of the 19 missing books, it shows the error, "File missing! This book's file was removed from your device. Import the file again to play the book ..." Something is very wrong if the content can just disappear. It will be a pain to search for and reimport these books again. I probably will not.

GianniCarlo commented 1 year ago

@oluckyman yes, I meant to follow up about this, I have three follow up questions, as the books shouldn't have disappeared:

Let me know if you remember anything else in particular, as the move/delete operations on the app will throw and show an error if the operation fails

Screenshot 2023-09-08 at 21 02 07

-- EDIT Due to the botched migration from v3 to v4, we introduced auto-mapping for import operations, where if the filename matches exactly the dangling book, it will be associated, and lets you resume playback

oluckyman commented 1 year ago

I've been a longtime user, but not sure if I remember v3. The missing books were there last week. The only thing I did the day I opened this issue was import a few books and try to rename the Archive folder. Also, there was an app crash when I tried to play one of the new books (in m4b format). But after restarting the app and reimporting the book file into a dedicated folder, it was fine. I don't remember migrating from version 3 to 4. I didn't open the Processed folder in Files until I opened this issue. I haven't switched phones or used a backup.