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

More intelligent file scanner #299

Closed
PaulWoitaschek opened this issue Sep 11, 2015 · 24 comments
Closed

More intelligent file scanner #299

PaulWoitaschek opened this issue Sep 11, 2015 · 24 comments

Comments

@PaulWoitaschek
Copy link
Owner

Write a more intelligent file scanner who is able to scan only once on startup.
After that watch all directories recursively and update / add / remove the books accordingly.

@PaulWoitaschek PaulWoitaschek added this to the v2.5.0 milestone Sep 11, 2015
@j-opificius
Copy link

Yes! Player doesn't notice when I add books to my book directory. Maybe a "rescan" function ?

@PaulWoitaschek
Copy link
Owner Author

It should recognize them as of today. Maybe you added them in a wrong folders, or the files are defect, or its some special file format?

@j-opificius
Copy link

I'll try again with the latest version. It was at least partly my
misunderstanding of how collective folders work: I had two book
file-sets in the same folder, and it appended the second set onto the
first, so I didn't see the second book.
Again, I'll get a better understanding of how the library mechanism
works before I squawk again :-)

Julian.

On 11/28/2015 7:57 AM, Paul Woitaschek wrote:

It should recognize them as of today. Maybe you added them in a wrong
folders, or the files are defect, or its some special file format?


Reply to this email directly or view it on GitHub
#299 (comment).

@PaulWoitaschek
Copy link
Owner Author

Well if you misunderstood it it means that it is not clear enough explained. Do you have a suggestion to prevent these misunderstandings?

@j-opificius
Copy link

That's very modest of you, Paul :-)

Challenge accepted; let me get properly familiar with it and I would be
more than happy to propose a description for you to consider. Proper
handling of audiobooks is important to me, and I appreciate your
commitment to providing an application tuned to that purpose. I would be
very happy to contribute some effort to the documentation.

Julian.

On 11/28/2015 12:29 PM, Paul Woitaschek wrote:

Well if you misunderstood it it means that it is not clear enough
explained. Do you have a suggestion to prevent these misunderstandings?


Reply to this email directly or view it on GitHub
#299 (comment).

@j-opificius
Copy link

Paul,

I'm having trouble with basics now, and my installation is essentially
broken. The app crashes when I navigate to the track selector (touching
on the current track indicator), so I can't even select tracks.

I'm having trouble rebuilding my folder now. Do you have a document
somewhere that describes the required folder layout and file naming
structure?

Thanks,
Julian Opificius.

On 11/28/2015 12:29 PM, Paul Woitaschek wrote:

Well if you misunderstood it it means that it is not clear enough
explained. Do you have a suggestion to prevent these misunderstandings?


Reply to this email directly or view it on GitHub
#299 (comment).

@PaulWoitaschek
Copy link
Owner Author

Which version are you using? If you find a bug please report on a separate issue.

The file structure is not very complicated.

Either you add a single book which means all contents inside that folder (including subfolders) will be recognized as a a single book. (i.e /storage/.../HarryPotter1/

Or you have a multiple folder one like /storage/../Audiobooks/
That is the same as adding each folder inside Audiobooks as a single book, but it will automatically add new ones.

@j-opificius
Copy link

I understand the individual words, but not the meaning of what you
say, and your description is not complete. You understand what you're
doing, but you don't describe it completely for your users :-)

How does the app resolve a book title name? For example, do you use the
".m3u8" file created by my ripping program (I use Exact
Audio Copy - "EAC") ? Or is there some other method?

How does the app expect to see individual chapter files named ?
"-.mp3" for example?

What filename structure does the app want to see for files from each
disk of a single book with multiple disks?

I have a folder structure as follows:
/storage/Author1/Title1 - disk 01/-.mp3
/storage/Author1/Title1 - disk 02/-.mp3
...
/storage/Author1/Title2 - disk 01/-.mp3
/storage/Author1/Title2 - disk 02/-.mp3
...
/storage/Author2/Title1 - disk 01/-.mp3
/storage/Author2/Title1 - disk 02/-.mp3
...

This has worked for me for months, except that the title of the book has
been shown as "Title1 - disk 01", which is not really the best.

Today, after update, it crashes continuously. Sometimes I have to
completely delete thee folder structure to get it working again.

Maybe this is a clue:
As of your latest change, the disk/track indicator indicates incorrect
information:
1 - -01
2 - 01-02
3 - 01-03
...

This did not happen previously - say, before Friday,
And the app crashes continuously when I try to navigate.

Where is the version shown? I don't see it anywhere.

Where are configuration/library files stored?

Julian.

On 11/29/2015 5:21 AM, Paul Woitaschek wrote:

Which version are you using? If you find a bug please report on a
separate issue.

The file structure is not very complicated.

Either you add a single book which means all contents inside that
folder (including subfolders) will be recognized as a a single book.
(i.e /storage/.../HarryPotter1/

Or you have a multiple folder one like /storage/../Audiobooks/
That is the same as adding each folder inside Audiobooks as a single
book, but it will automatically add new ones.


Reply to this email directly or view it on GitHub
#299 (comment).

@PaulWoitaschek PaulWoitaschek removed this from the v2.5.0 milestone Dec 29, 2015
@irregularisnotrandom
Copy link

Why not offer a way to do manual scan only?

@PaulWoitaschek
Copy link
Owner Author

For convenience.

@irregularisnotrandom
Copy link

I personally think that a manual scan is much more convenient solution, given that i can exrend my battery hold that way.

@PaulWoitaschek
Copy link
Owner Author

Did you measure the duration?

@irregularisnotrandom
Copy link

I did not but i see that couple minutes min eachtime it rescans. i am sure thus number will go up as I add new audio. also the scan is not one time you kniw. It foes this multiple times during the life of the app usage.

@irregularisnotrandom
Copy link

Sorry for the typos I am on a phone and my addons block rediting scripts

@PaulWoitaschek
Copy link
Owner Author

I don't expect that it costs too much battery.

Most of the times users stay in a book and the scanner only gets triggered when you enter the book shelf.

@irregularisnotrandom
Copy link

Actually that logic does not hold well and the reason is this. What is the likely hood of recurring adding multiple new books to the lib by the user while the app is open or closing? No user is going to add new audio book every 10-20 mins to the lib everytime they use the app.

@PaulWoitaschek
Copy link
Owner Author

That is the reason why this ticket exists.

@irregularisnotrandom
Copy link

To me this auto scan is just causing unnecessary energy use. at lwast that is how i personally see theis issue. Manual scan is not unheard of, many apps take that route.

@PaulWoitaschek
Copy link
Owner Author

How do you actually know this? What do the battery stats show?

@irregularisnotrandom
Copy link

Well any disk activity will cause energy consumption and this app does that activity a lot. but in all fairness i will try to find and up to stat it to be precise.

@bitinerant
Copy link

I would love a manual scan option--not so much for battery life in my case, but because when I add books, it seems to take forever for them to show up in MP. For some reason, closing and re-opening the app hasn't helped me in the past--I have to just sit and wait for the books to appear in the list. (I haven't tested, but one ebook with 1218 files may be causing the delay.)

@versavius
Copy link

There are two issues with the current scanner on android 6 from what i can tell #460 and #475

There seems to be a bug where the app will only display the first book of a series listed in a subfolder such as: Audtiobooks > Author > Series Name > Book 1, 2 etc

Take a look at the above two issues #460 and #475 and your see the current bug, perhaps this could be fixed while a rewrite of the scanner is happening ?

Thanks

David

@PaulWoitaschek
Copy link
Owner Author

An intelligent file scanner is not necessary as the current one works perfectly.

However I just introduced a change that massively increase the scanning time.

I added a timestamp to each chapter that contains the time of the last modification of the file. When the file to scan has the same timestamp, that chapter will be used and the metadata won't be scanned at all.
For my music collection (about 16 gigs) it decreased the scanning time from 1m:30s to about 0.5 seconds.

The first scan will however take its time, but there is no way around that.

Can you test the version and tell me if it works as expected?

https://github.com/PaulWoitaschek/MaterialAudiobookPlayer/releases/tag/v3.0.13-RC

@PaulWoitaschek
Copy link
Owner Author

You can also grab the latest version by joining the beta:
https://play.google.com/apps/testing/de.ph1b.audiobook

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

No branches or pull requests

5 participants