View Single Post
Old 11-17-2011, 08:48 PM   #8
xmodder
Junior Member
xmodder began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Nov 2011
Device: Samsung Galaxy Tab
Quote:
Originally Posted by wallcraft View Post
If you always write to the same root folder (eBooks), then a work around might be to specify no target directories to send to and add "eBooks/" to the start of the Save template. I have not tested this, but it should do what you want. At a minimum, it will get your ebooks out of the external sdcard root directory.
Hi wallcraft, thanks for your answer. I figured myself that work around, tested, and it worked... well, as usuall, with drawbacks. This drawbacks come from the fact that the Android driver behaves in different ways when using the main memory and when using the external storage card.

So, if you add "eBooks/" to the start of the save template and left blank te field for target directories, you got the following:
- when using the external storage card A: the plugin can read all ebooks with the configured formats in ANY directory in the storage card, and when writting ebooks, they appear under the folder "eBooks". So you end with the books in "eBooks/<the book>" as intended.
-when using the main memory, if you have left blank the target directories in the plugin configuration, the plugin defaults to a list of hardcoded directories. I bet this hardcoded list is the same as the default list that the plugin has configured by default. So, the plugin can see only ebooks on some directories of the main memory (the ones in that hardcoded list) and when writting, the ebooks appear under the first directory found of that list, not under root directory (/) as it does on the external card. I don't know what will happen if none of the directories in the hardcoded list was found, not tested to that extent. The list has the directories "books" and "eBooks/import" at least. So, provided the directory "books" exists on the main memory, you end with the books in "books/eBooks/<the book>". If you delete or rename directory "books", the books go to "ebooks/import", provided that it exists, and so on for each directory on the hardcoded list. This is not what one should expect, isn't it? On top of that you have the read problem. If you have books on directories other than the ones in that default hardcoded list, the plugin can't find them. Of course it starts finding books in any directory as long as you add that directory to the directory target list, but if you left it blank, then it only sees books on the predefined directories.

So, for using this work around, my choice is to not left blank the target directory list configuration field, but adding to the start the same directory I want to use on external card, along with the predefined ones. Doing that I can see books on any directory present on that list in the main memory and when writting to main memory I will have also books written to that first directory... of course with the added directory in the Save Template. For clarifying:
- Add prefix to the Save Template: "eBooks/"
- Add "eBook, " to the start of the Target directory list: "eBooks, books, eBooks/import, ..."
- when you write books to main memory they go to: "eBooks/eBooks/<the book>"
- when you write books to storage Card A, they go to "eBooks/<the book>"

Well, this is not perfect, but knowing how it works is not a dealbreaker... and of course this is much better than having books scattered at root level on SD card!

And now that I have a workaround for (almost) solving the problem, I would like to know if this different behaviour of the Android driver when using the main memory and when using the external storage card is by design or is simply a bug.

If this is the intended behaviour for the Android driver, I would like to know what are the reason and the benefits of this against considerig both storage devices (main memory and external storage card) the same thing and having the Android driver behaving exactly the same for both.

If it is a bug... well, how can I help to have it debugged?

Best regards
xmodder is offline   Reply With Quote