Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 04-16-2021, 05:49 PM   #1
maraskan_user
Member
maraskan_user began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Dec 2020
Location: Germany
Device: Boox Nova 3, Galaxy Tab S6, Samsung M21
Android via USB file times

Something might possibly be up with Calibre's mtp driver...

I'm using Calibre v5.15 on a Win10 PC and connect to my Android devices via USB.
(Regional formats and system codepage of the PC are set to german, in case it makes any difference. Win10 and all Android devices' firmwares are up to date.)

I'm connecting my Android devices via USB for calibre's 'send to device' function. I had problems with all three them not showing the Date in Device View for quite some time, an issue that was discussed in the forums before with the conclusion that it's probably firmware related.

Today I checked more closely what happens with the files' timestamps as shown by windows 10's file browser when interacting with them via Calibre.
I thing that came up with: Files that start out with having both a "Modified" and a "Created" time showing in the file browser will actually lose this timestamp when I send the file over again from Calibre. The file gets overwritten, but now no timestamps are shown anymore in windows's file browser. Refreshing or changing directories does not bring them back for that file. On the other hand, disconnecting and reconnecting USB and looking at the file again in the file browser, it will show timestamps for both "Modified" and "Created" - but both are the same. Maybe either the Android device itself or the file browsers in this case fixes missing/damaged timestamps by using the timestamp of the containing folder? Not sure.

On the other hand, if I use the file browser to copy an epub to the Android device, the overwritten file will not lose its timestamps - only when copied by calibre. Copying by the file browser it retains the "Modified" timestamp from the windows 10 host while the "Created" timestamp is set the copy time. Reconnecting USB as expected does not change these timestamps.
This shows that it's possible to write and later read both timestamps - at least the file browser does it.

Looking at these results, I wonder if Calibre's mtp driver somehow writes corrupted or invalid timestamps to the Android device. (It might additionally also read invalid data, since Calibre doesn't show real dates in it's device view date column even for files I have manually replaced and checked to have correct dates through file manager before starting calibre...)

So...

- Can anybody confirm these observations?

- Does anybody with the same hardware/software not have the described issues when sending from calibre?

- Does anbody know a fix?
maraskan_user is offline   Reply With Quote
Old 04-20-2021, 02:36 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,921
Karma: 22669818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The wpd driver does not set dates when sending files. As far as I know the WPD system should auto-fill in these values when not specified. If it isnt on your system that would be a bug somewhere. However it is easy enough to have the driver fill in these values.
kovidgoyal is online now   Reply With Quote
Advert
Old 04-20-2021, 04:20 AM   #3
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,921
Karma: 22669818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Now the driver sets the times explicitly: https://github.com/kovidgoyal/calibr...77bf3981ea8ff6
kovidgoyal is online now   Reply With Quote
Old 04-30-2021, 12:37 AM   #4
maraskan_user
Member
maraskan_user began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Dec 2020
Location: Germany
Device: Boox Nova 3, Galaxy Tab S6, Samsung M21
Great news! After your recent changes to the drivers for 5.17, I can confirm timestamps started working on all my Android devices. Date/Times are set properly when sending files to device (verified in file manager). Also Calibre's device view is now showing the correct dates as well, so both timestamp writing and reading seem to work splendidly! Thany you very much!
maraskan_user is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Android] Calibre Companion Times out on Sync PaleoRDR Calibre Companion 2 12-13-2017 10:49 AM
converted file 4 times larger than original raykoko Calibre 9 02-07-2013 11:28 AM
PC to Android Transfer ... NO USB ..... ??? Kevin2960 Android Devices 9 11-22-2010 05:55 PM
File management: how to copy file from USB stick? Lec0mte iRex 5 05-04-2009 07:19 AM


All times are GMT -4. The time now is 08:23 AM.


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