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

Allow to import book as folder of mp3 files #358

Closed
carcade opened this issue May 3, 2019 · 20 comments
Closed

Allow to import book as folder of mp3 files #358

carcade opened this issue May 3, 2019 · 20 comments
Assignees
Labels

Comments

@carcade
Copy link

carcade commented May 3, 2019

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?

@GianniCarlo
Copy link
Collaborator

Hi @carcade , in the latest version in the appstore (3.3.1) it should already be possible to drag and drop folders (via #347). Let us know if you're on the latest version

@carcade
Copy link
Author

carcade commented May 3, 2019

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?

@GianniCarlo
Copy link
Collaborator

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

@carcade
Copy link
Author

carcade commented May 3, 2019

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.

@GianniCarlo
Copy link
Collaborator

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

@GianniCarlo
Copy link
Collaborator

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

@carcade
Copy link
Author

carcade commented May 3, 2019

@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.

@GianniCarlo
Copy link
Collaborator

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

@carcade
Copy link
Author

carcade commented May 3, 2019

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

@andrefosho
Copy link

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

@GianniCarlo GianniCarlo self-assigned this May 27, 2019
@GianniCarlo
Copy link
Collaborator

GianniCarlo commented Jun 30, 2019

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.

@GianniCarlo
Copy link
Collaborator

GianniCarlo commented Jun 30, 2019

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).

@GianniCarlo
Copy link
Collaborator

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

@trungtin
Copy link

trungtin commented Jul 7, 2019

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

@GianniCarlo
Copy link
Collaborator

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

@pichfl
Copy link
Collaborator

pichfl commented Jul 7, 2019

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.

@caseynf
Copy link

caseynf commented Sep 12, 2019

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

@GianniCarlo
Copy link
Collaborator

@caseynf you could use iTunes File sharing

@megasuperlexa
Copy link

megasuperlexa commented Oct 22, 2019

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’s my bash script for those who interested https://github.com/megasuperlexa/audiobook-convert

@GianniCarlo
Copy link
Collaborator

Folder (and subfolders) support is back in v4.0.0 (#600), we're finally able to close this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants