Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre Companion

Notices

Reply
 
Thread Tools Search this Thread
Old 05-09-2017, 03:27 PM   #1
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 2,324
Karma: 3545534
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
[Android] Cannot get cc and moon to agree on file path name

Samsung tablet android 6. There is an Sd card but cc library is actually in main storage. Cc says the path to the books is storage /emulated/ 0/ cc.
Moon sees the path to the same books as ...sdcard/cc
I guess one is symbolic, one is actual but neither program will use the other path name convention.
Moon uses the path name when it adds a book to recent list, so I get duplicates if I open two different ways, because there are two equivalent ways to define the path.
ie to moon , ...sdcard/cc/book1 is not the same database entry as ...emulated/0/cc/ book1 even though both path formats lead to the same place
How can I fix this?
If I browse with moon to find the cc library and drill down from / (root) into /storage, then moon immediately changes the path descriptor to ...sdcard.
If I start with cc and try to define a library location, I cannot use sdcard as a path to internal storage because cc cannot see such a path option.
Is there a way to set up the library location so that they agree to use the same path name

On my fire tablet, android 5, no Sd card, I was able to get both to agree on using ...emulated/0... but I cannot get that to work on the Samsung.
stumped is offline   Reply With Quote
Old 05-09-2017, 03:46 PM   #2
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 2,324
Karma: 3545534
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
PS I see the same question was asked here, not really resolved
https://www.mobileread.com/forums/sh...d.php?t=271932
Because as I said above cc will not accept sdcard as part of a path, and moon will not accept cc version.
Neither program allows you to type in a path name , you have to search for one by using each programs browse options as they don't use the same terminology
To get duplicates in Moon recent, open a book via my files in Moon, then open the same book via cc read.
Same book but two paths so two entries, the paths are equivalent but that's not good enough for moon to accept that it is the same file being opened.
Why do I want this, because I don't want to have to remember how I opened the book last time.
I don't want to move the actual cc folder location to the actual physical Sd card as that will bring more permissions complications maybe.
I want the books to be in an easy to find internal storage location, with a simple path definition that both programs can agree on
So the android equivalent of c:/books would work for me !

Last edited by stumped; 05-09-2017 at 03:52 PM.
stumped is offline   Reply With Quote
Advert
Old 05-09-2017, 04:08 PM   #3
chaley
Grumpy old git
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 9,065
Karma: 2737968
Join Date: Jan 2010
Location: UK
Device: Many android devices
Because of Android's file system protection, CC must determine a public path to use for a directory. It does this by first asking Android for the URL form of the path, then asking Android for the path to the CC private directory in the memory in question (main or SD card), then working back from that to map the URL to the actual CC folder. The result is what CC uses. I don't know what Moon+ uses or why it uses it, but there isn't anything I can do about it.

FWIW: on my Nexus 5, running Android 6.0.1, Moon+ and CC agree that the path is /storage/emulated/0/CC/book. I don't know why your Samsung is doing something different.
chaley is offline   Reply With Quote
Old 05-09-2017, 04:12 PM   #4
chaley
Grumpy old git
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 9,065
Karma: 2737968
Join Date: Jan 2010
Location: UK
Device: Many android devices
Quote:
Originally Posted by stumped View Post
PS I see the same question was asked here, not really resolved
Because there isn't a resolution. File paths were totally borked starting with Android 5. There is no way that CC can (in general) use an arbitrary path to a folder because Android doesn't permit this kind of navigation. Instead CC must use the never-to-be-damned-enough Storage Access Framework, which gives back opaque URL-like paths. As I said above, CC translates these to "real" paths using information provided by Android.
chaley is offline   Reply With Quote
Old 05-10-2017, 12:32 AM   #5
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 2,324
Karma: 3545534
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
ok - with my fire tablet, as with your nexus 5, I can get both programs to use/storage/emulated/0/CC/book
on the samsung , from within moon , whatever I try, I will see it's reported path flip to that /sdcard/cc version as soon as I try to drill down.
the guy who opened the other thread I linked to does not name his tablet
let's jsut leave this here as a record and in case anyone else has a better explanation
much googling suggests that /sdcard/ is a very old way of doing paths in android.
e.g. this
https://android.stackexchange.com/qu...virtual-sdcard
Some devices (like my Nexus 4) don't have an external slot for an SD Card. Instead, there's a root folder called /sdcard/ that is treated the same way. But I also find other paths that all point to the same files -- there must be some kind redirects going on (I think this is called symlinks in Linux).

All these paths contain the same files:

/sdcard/
/storage/sdcard0/
/storage/emulated/0/
/storage/emulated/legacy/
Which path is the "actual" one? What about the other paths? What are they used for, why do they exist?


FYI I can get moon to add a redundant /mnt/ to the path, which does not help. e.g. it will save /mnt/sdcard/cc as a different path to the same location.
you've disproved that is could be a generic android 6 issue. so maybe samsung have "helpfully" built in /sdcard/as a sort of sym link ?
I can also go to the storage info in device settings where some android or samsung "user friendly" storage manager lives. That claims that CC is a top level folder in device storage, alsong with all the other folders. its makes no mention of either /sdcard/ or of /emulated/0/

I'd be happy to relocate my CC folder to a different internal storage location if that would help. I'ts actually still at the install default ( I've been typing CC for short, it's really still called calibre_companion )

Last edited by stumped; 05-10-2017 at 12:40 AM.
stumped is offline   Reply With Quote
Advert
Old 05-10-2017, 05:23 AM   #6
chaley
Grumpy old git
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 9,065
Karma: 2737968
Join Date: Jan 2010
Location: UK
Device: Many android devices
CC allowing you to enter arbitrary paths into folders and formats wouldn't fix the problem, and could in fact make this much worse. Reason: before launching a reader app, CC asks Android to convert the book path into a "one true" path, removing all symlinks, "..", and any other redirections. CC does this so that it can be sure that what it gives to the reader app can really be opened by the reader app and is stable over time, something that might not be true if symlinks are involved. This processing has worked for 5 years across thousands of installations. I am not willing to change it.

The problem seems to come from you wanting to use the Moon+ library manager. If you didn't do that then the path name wouldn't matter.
chaley is offline   Reply With Quote
Old 05-10-2017, 05:44 AM   #7
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 2,324
Karma: 3545534
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
i can accept that it's the moon reader app design that is to blame
if i were to move the library to the actual SD card which I have on that tablet then
1. will both apps be able to use an actual SD card location. CC to write there, moon to maybe? just be able to read from ( I think the moon metadata database lives at where you specify for " my shelf"
2. would it bypass the issue ? ( or does moon have another sym link ready to go for external storage ? )
stumped is offline   Reply With Quote
Old 05-10-2017, 05:54 AM   #8
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 2,324
Karma: 3545534
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
[QUOTE=chaley;3518731..

The problem seems to come from you wanting to use the Moon+ library manager. If you didn't do that then the path name wouldn't matter.[/QUOTE]

Agreed, but its a convenience thing - if I am already in Moon and want to switch to a book that I know CC has already downloaded, then i'ts simpler to got to my files and grab it that way. & Only the moon+ recent/ my files thing can advise me of my reading progress.

[ and for anyone else with similar apps it is a potential cause for confusion, it took me a while to work out that the reason for getting duplicate recent books was due to actual vs symbolic paths, when I knew there was only one actual book file per book on the device.]

but then when I am back in CC and ask to continue to read it, moon gets it delivered by cc complete with the " one true path" and treats it as a different book
So this was an exercise in standardising the paths rather than standardising my read habits - and it worked for the Fire HDX tablet ( which has the same google play Moon+ pro version ). on the Fire, moon was defaulting to use /sdcard/ but agreed to change it to storage/emulated/o/....
stumped is offline   Reply With Quote
Old 05-10-2017, 05:57 AM   #9
chaley
Grumpy old git
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 9,065
Karma: 2737968
Join Date: Jan 2010
Location: UK
Device: Many android devices
Quote:
Originally Posted by stumped View Post
if i were to move the library to the actual SD card which I have on that tablet then
1. will both apps be able to use an actual SD card location. CC to write there, moon to maybe? just be able to read from ( I think the moon metadata database lives at where you specify for " my shelf"
I don't know. I have doubts because of the way Android SAF handles paths on the SD card. I had to stand on my head even to get a path. My guess is that books on an SD card that CC hands to reader apps are read-only, enforced by Android. It wouldn't surprise me that if when moon+ adds a book the its library, moon+ copies the book to somewhere that it controls. It would need to do that if it modifies the book file, for example for annotations or tag changes.
Quote:
2. would it bypass the issue ? ( or does moon have another sym link ready to go for external storage ? )
CC will give a "canonical" path to the reader app, one that does not pass through symlinks. Whether the reader app uses that path or changes it to another is up to it.

FWIW: one of my fears is that the Android 7 changes that prevent passing paths between apps will eventually be enforced even for apps that target Android 6. If this happens then CC will become *much* less useful, possibly useless.
chaley is offline   Reply With Quote
Old 05-10-2017, 07:14 AM   #10
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 2,324
Karma: 3545534
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
moon+ uses a hidden cache folder for metadata / cover thumbnails [ you can see it if you tick show hidden folders in the moon app preference then browse around ].
it places that as a subfolder within the location specified for " my shelf", which can be in internal storage. AFAIK it does not ever copy any actual books, just reads them from the locations it is given, and creates its own cover thumbnails - you can specify the size of those.
i think it keeps annotations etc in a database of it's own in the same cache location. the fact that moon+ has no user manual is not helpful.
I was separately trying to understand how moon+ handles " my favourities" and how that differs from " my shelf". i used to ignore both of those, but there's a new compulsory overview screen now that shows " my favourites, " , my bookmarks.....
i may just finish all but one of my in-progress reads, then when I am down to only having one book on the device I will tr moving folders around & see what happens

re the A7 fears, CC woudl not become useless, I'd still use it as an on-device library manager, just not ue the " read" function to open books from with CC, but go open them from within the reader app(s) instead
stumped is offline   Reply With Quote
Old 05-10-2017, 09:36 AM   #11
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 2,324
Karma: 3545534
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
update/ i staged a little test. I created a books folder on my actual SD card, then told CC that was to be the default for .mobi ( so as not to mess with my existing on-device epubs) then I had it download one .mobi book from calibre via content server.
CC says that book is at /storage/90B0-DF-18/books...
and Moon+ can also browse to there and agreed with the path name, and opened the book OK [ I was not sure it cold do .mobi but it seemed to cope ]
so I think that location would work as a new epub library default, so long as I never take the card out.
SO I think what I will do , as I said before, is finish my in-progress reads to minimise any disruption then try moving everything to there for more tests.
stumped is offline   Reply With Quote
Old 05-10-2017, 11:47 AM   #12
chaley
Grumpy old git
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 9,065
Karma: 2737968
Join Date: Jan 2010
Location: UK
Device: Many android devices
I am glad it appears to be working.

You might want to make a CC backup (settings, folders, database) before changing anything more.
chaley is offline   Reply With Quote
Old 05-10-2017, 12:00 PM   #13
stumped
Wizard
stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.stumped ought to be getting tired of karma fortunes by now.
 
Posts: 2,324
Karma: 3545534
Join Date: May 2016
Device: kobo forma, Kobo Libra, Huawei media Tab, fire HD10, PW3 HDX8.9,
good idea but probably overkill. i only keep a handful of in-progress reads in CC library. i'ts calibre itself that gets the full-on paranoia triple backups approach. the worst that can happen on-device is that i lose last page read in up to 10 books , but that info is not in CC anyway ( yet, but I think you've stopped taking requests for that feature )

i think I will shift the library to my actual Sd card, if only because moon+ telling me that the my files path is /sdcard/.. when its actually in internal storage is so annoying.
stumped is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
File path JimmyG Sigil 1 02-15-2013 12:40 PM
How to link file manager to Android/Moon +? michaelbr Android Devices 1 12-25-2012 10:00 PM
File Path iceman00 Calibre 6 04-24-2010 04:35 PM
Remove file path from PDF file DuckDodgers PDF 1 08-13-2006 09:23 AM


All times are GMT -4. The time now is 02:59 AM.


MobileRead.com is a privately owned, operated and funded community.