Quote:
Originally Posted by davidfor
Don't you think that that might be overkill when there is the column "TimeSpentReading" in the content table? That has been there for a while, I just haven't been that interested in fetching it. Then there is the issue of multiple devices.
But, I keep meaning to look at those. I just keep finding other things to do 
|
Oh, I wasn't aware of that column. The ExtraData was the first thing I thought of looking at since I was messing with that stuff recently anyways. It's also what the FW looks at to determine the total reading hours. On another note, since PyQt supports the required types natively, it would probably be at most 6-12 additional lines of code compared to looking at that column directly.
For multiple devices, I wonder how Nickel will react if the event row is duplicated. If that works fine, it would be possible to hack together a sync solution by adding a custom field to the ExtraData to keep track of which device each row came from (I won't go into details, but you won't run into issues with the checksum as long as the book is at the same path). Whether or not I'd recommend shipping this to ordinary users as part of the plugin is another question...
Edit: 
I just realized that the checksum would fail with the EventData changes, but another idea would be to use the FirstOccurrence and LastOccurence dates (you can't change them, but they should be unique between devices). This also has the advantage of being slightly easier to handle. What I said about the book path and the checksum still stands, though.