• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ChordPro and page order
#1
Song files in MSPro can have a page order associated, which defaults to 1-n where n is the number of pages.
While this is useful for PDF documents and images, I wonder whether the page order serves a purpose for ChordPro songs. You can set it, but it is reset to empty when you try to save the change. So it seems to be irrelevant.

ChordPro songs do not have a fixed number of pages — this depends on the text display settings and the device orientation. For example, when I close MSPro while looking in portrait mode to a song from a setlist, and re-open MSPro when holding the tablet in landscape mode, all songs of the setlist have their pages recalculated. No big deal, though... until I try to sync the library to another device or folder. Since I have set the sync merge behavior to "prompt user", I get prompts for every ChordPro song that had its (irrelevant!) page order (or page count) recalculated and changed.
Johan
johanvromans.nl — hetgeluidvanseptember.nl — mojore.nl -- howsagoin.nl
Samsung Galaxy Note S7FE (T733) 12.4", Android 13.0, AirTurn Duo & Digit (Gigs).
Samsung Galaxy Note S4 (T830) 10.5", Android 10.0 (maintenance and backup).
Samsung A3 (A320FL), Android 8.0.0 (emergency).
Reply
#2
That's definitely unintended behavior. I will add checks to prevent the page order from being modifiable for text/chord pro files.

Thanks,
Mike
Reply
#3
Hi Mike, any progress here?
Johan
johanvromans.nl — hetgeluidvanseptember.nl — mojore.nl -- howsagoin.nl
Samsung Galaxy Note S7FE (T733) 12.4", Android 13.0, AirTurn Duo & Digit (Gigs).
Samsung Galaxy Note S4 (T830) 10.5", Android 10.0 (maintenance and backup).
Samsung A3 (A320FL), Android 8.0.0 (emergency).
Reply
#4
Well I stop the page order from being modified in the song editor, but I don't really know what to do about the page order causing conflicts while merging. The reason is that you technically can change the number of pages by changing the chord pro settings. In doing this, you could also add bookmarks, annotations, etc to those extra pages. So I can't really just ignore the fact that each song has a different number of pages allocated for the file, otherwise I wouldn't also process other things that could be associated with those pages. The file and page order comparisons are performed at the very start to ensure that each song has the same number of pages allocated for each file, otherwise it can cause errors downstream in other logic. I suppose one option would be, if I'm dealing with chord pro or text files, I just automatically allocate pages for each song to match whichever song has more pages. This has little impact in practice, because the number of pages is always trimmed when you load the song. What do you think of that idea? If both songs don't have any bookmarks or extra data on those pages, then no other conflict will occur.

Thanks,
Mike

Update:
I just realized by looking through the code that even if the page order is updated, I wasn't actually doing anything beyond that. So later in the merge, you'd see tons of differences between the two files anyways. So no matter what, I need to do what I proposed above to eliminate potential conflicts between the two files.
Reply
#5
I tested my proposed changes and they seem to work well. I no longer get any merge conflicts when a text/chord pro file's number of pages changes due to things like rotating the device.

Thanks,
Mike
Reply
#6
Extending pages may be a good solution for now. The main thing is that songs shouldn't need synching when you (accidentally?) turn the tablet while viewing a song.
Johan
johanvromans.nl — hetgeluidvanseptember.nl — mojore.nl -- howsagoin.nl
Samsung Galaxy Note S7FE (T733) 12.4", Android 13.0, AirTurn Duo & Digit (Gigs).
Samsung Galaxy Note S4 (T830) 10.5", Android 10.0 (maintenance and backup).
Samsung A3 (A320FL), Android 8.0.0 (emergency).
Reply




Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2024 MyBB Group.