Bookplayer: Allow to import book as folder of mp3 files

Created on 3 May 2019  路  19Comments  路  Source: TortugaPower/BookPlayer

Feature request.
There are audiobooks which split into many mp3 files. It would be great, if it is possible to import such audiobooks as a folder (for example, copying folder of mp3 files via iTunes in app file sharing, at the moment copied folders of mp3 files are not recognized).
What do you think about this?

bug

All 19 comments

Hi @carcade , in the latest version in the appstore (3.3.1) it should already be possible to drag and drop folders (via https://github.com/TortugaPower/BookPlayer/pull/347). Let us know if you're on the latest version

I'm on the 3.3.1-2 version (ios 12.2). Just dropped folder with mp3 files in iTunes file sharing. Nothing happend. What am I doing wrong?

I'm uploading a gif with an example I made
C8042118-B4F2-4478-964C-B4A9F9A20C45
After dropping the folder in there, remember to open the app, so it can process it

Hm, done everything the same way, restarted the app, but no processing has been started. BUT, if I import zip with mp3 files, they are processed successfully.

mmmmm 馃 could it be that I thought I put it on 3.3.1 but it actually isn't there... let me check

The commit is in master so it should be on the appstore version, I'll download that version and try as well. By any chance do you have airdrop available? before, the app wouldn't accept folders via airdrop either

@GianniCarlo AirDrop was disabled. After enabling it, app found the folder and processed it successfully. Strange behavior)
ADDED
Hm, no. After deleting files and adding them, they are not processed again.

hmmm weird. Folder with how many files? I'll try to reproduce it on my end, so any more details you may have are welcome

Started with a folder with 120 files, then 10 files. The same behavior. There were cyrillic symbols in folder
name, changed to english - nothing happened.

BookPlayer 3.3.1-2
iTunes 12.9.2.6
Windows 10 1803
iPhone X, iOS 12.2

Can report same behavior.
Dragging and dropping single mp3 file via iTunes filesharing, it immediately shows up within BookPlayer app.
Doing same way with a folder is without result. BookPlayer does not see the files.

iTunes 12.9.4.104
BookPlayer 3.3.1-2
Windows 10
Iphone XR, iOS 12.3.1

image

20190527_062529347_iOS

I finally got around to investigating this issue. The problem lies with the dependency we are using to detect additions to the Documents folder. I described the problem in this issue, but I'll add our context here to the explanation of what's happening.

The folder watcher only watches additions or deletions to the Documents folder, so when a folder is imported, the watcher waits an specified time to see if anything more is added inside that folder before notifying of the existence of a new item in the Documents folder.

So when using iTunes/Airdrop to import a folder, it adds an item one at a time in the imported folder inside BookPlayer. The problem in our case, is that each new item being transferred, could be of more than 100mbs in size, so it takes considerable more time to finish transferring each item inside the folder in BookPlayer, and could surpass the time interval that the watcher waits before notifying BookPlayer of the existence of the new folder. That's when the app tries to process the folder, with incomplete information in these cases.

That's why if you zip up the folder first before transferring, it won't present this problem, since instead of importing multiple items, you're just importing one.

I'm open to suggestions to new dependencies that could handle an exhaustive watch of the Documents folder.

Or this could be a good enough reason to refactor how we handle the existing files. For anyone wondering, the steps we take to process files is the following:

  • Processed folder contains all of the imported files (this folder is ignored by the watcher)
  • Watcher on Documents folder will notify the app of any book imported. If a folder shows up, it will move its internal content to the Documents folder, so the watcher could pick that up again and notify the app. In this loop, all the audio files are catched so they can be 'imported' and moved to the Processed folder

For some time now I've been thinking about doing away with that Processed folder. It has kept, in some cases, 'zombie' books (books that are on disk, but no longer shown in the app).

I may rollback folder support and recommend zipping up the folders first before importing until a proper solution is done for this 馃

On ios 13 public beta both the feature import from Files app and import multiple files to the playlist is broken. I don't know it's something wrong with ios or BookPlayer, but it would be great if you can take a look

Thanks for the heads up @trungtin , I may be able to install the beta by the end of next week to test things out

I can not recommend it. Also, I don't think it's wise to try to fix stuff that will most likely change a lot anyway, a big part of the current beta is the iCloud file stuff and the inner workings behind it.

Is there a way to drag and drop files when the laptop I have is running on Windows?

@caseynf you could use iTunes File sharing

I have nice experience squashing multiple mp3 files into single m4b book, and then importing it into the app. This way the book takes up less space due to superior aac encoding, and also becomes much more manageable (single file).
Here鈥檚 my bash script for those who interested https://github.com/megasuperlexa/audiobook-convert

Was this page helpful?
0 / 5 - 0 ratings