MobileSheets Forums

Full Version: Sync problems (again..., sorry...)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have created a folder to sync to on GDrive and for the last several weeks I synced my tablet to this folder every couple of days, updating folder. Each time I could see changes that I made on the tablet being propagated to the GDrive. All other devices sync to this folder, updating device only.

Then all of a sudden the sync started to ask to update songs that weren't changed. Investigating the files and databases on the GDrive and on the tablet revealed some strange discrepancies.

For example, the database on the GDrive contains a few songs with full path names instead of drive handles. There songs were the last songs that I added, approx a week ago. They have file sizes (in the database) that do not make sense (e.g. 1136 instead of 167270) and type 3 (text) instead of 0 (image). Moreover, the files are also in the database with correct info. This is from the database on the GDrive:

Quote:select * from files where path like '%proud%';
16411|427|1R6P4KkH4tnVQ579GRiy3ssvZhauTO54j/Proud_Mary.cho|1-2|1106|1450706302000|1|3|
16846|5|1L1ZzzERfjr1GQX3fiPDn6iTWYPALwAf3/Proud_Mary.cho|1-2|1071|1534420026000|1|3|
16992|2617|1P3G1yENqNIN2T4pVOHNdy84oR9-QnArw/Proud_Mary-ptg.png|1-1|167270|1537878218000|1|0|
16996|627|/storage/C443-17EE/Android/data/com.zubersoft.mobilesheetspro/files/Partituren/RtV/Proud_Mary-ptg.png|1-2|1136|1479243238000|1|3|

The first two entries are older files. The 3rd entry is a new file with correct information, and the 4th entry is the same file with incorrect information.

This is from the database on the tablet:

Quote:15572|427|Partituren/SingAlong/Proud_Mary.cho|1-2|1106|1450706302000|1|3|
16441|5|Partituren/Afasiekoor/Proud_Mary.cho|1-2|1071|1534420026000|1|3|
16527|2617|Partituren/RtV/Proud_Mary-ptg.png|1-1|167270|1537878218000|1|0|

Another strangeness is a dialog asking whether to add or delete a file. Mine = add, Theirs = delete. This seems to indicate that the file is on the device but not on the GDrive. However, it is on the GDrive, it is in the database on the GDrive, and it is in the mobilesheets_hashcodes.txt on the GDrive.

Device database:
Quote:select * from files where path like '%commander%';
15688|626|Partituren/Leonard_Cohen/Field_Commander_Cohen.cho|1-2|1383|1479243230000|1|3|

Device actual file:
Quote:-rwxrwx--x 1 u0_a149 sdcard_rw 1383 2016-11-15 18:53 Partituren/Leonard_Cohen/Field_Commander_Cohen.cho

I have no clue why this leads to an add/delete situation.
GDrive database:
Quote:16995|626|1Hrc12m2Ky0cZnuoiG-ZE6lSLAURWXuv3/Field_Commander_Cohen.cho|1-2|1383|1479243230000|1|3|

GDrive hashcodes:
Quote:1Hrc12m2Ky0cZnuoiG-ZE6lSLAURWXuv3/Field_Commander_Cohen.cho
1886876993
1538411426947
1383

GDrive actual file:
Quote:-rw------- 1 jv jv 1383 Aug 16 14:22 /home/jv/Cloud/Drive/MobileSheetsPro/Synch3/Partituren/Leonard_Cohen/Field_Commander_Cohen.cho

I have no clue why this would lead to an add/delete situation.
Thanks for the information. I'll have to look into it to see if I can reproduce those kinds of problems. As far as the add/delete scenario, the comparisons in MobileSheets start at the song level. So if it's asking you to add or delete an entire song, that means it couldn't find a matching song for some reason. If it's asking about adding or deleting an individual file, then that is surprising. One thing to note is that with chord pro files, you can easily get differences being detected due to the page order field or text display settings. On some tablet screens, the song may have to increase the length of the song to three pages, for example, but on another tablet it might only be two pages to display the same content. So this creates a difference in the database that causes a merge, but then the song is re-adjusted again the next time it is loaded. I haven't decided how to handle this yet because in order for the merge to proceed correctly, having the number of pages match is important when merging other content such as annotations/bookmarks/link points/etc.

Hopefully I can figure out what caused the situation you are seeing now.

Thanks,
Mike
I seem to recall from some other discussions that we concluded that for ChordPro files the number of pages and page order is not a persistent property. The number of pages depends on screen size and text display settings. The page order cannot be set or modified in any way.

That means, unfortunately, that annotations and link points etc cannot reliably retain their positions in ChordPro files unless you invent a way to attach them to a position (character) in the text instead of xy coordinates on the page.
... annotations and link points etc cannot reliably retain their positions in ChordPro files ...
this is why I really would like to have extended formatting features (like e.g. MarkDown) in ChordPro
(10-05-2018, 07:48 AM)itsme Wrote: [ -> ]this is why I really would like to have extended formatting features (like e.g. MarkDown) in ChordPro

Working on it... (but don't hold your breath) Smile.
Great, thanks.