• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Backup - mobilesheets_hashcodes.txt
#1
Hi

Not sure, if this is the correct forum. Anyway:

I'm working on a script to automate importing sheets into MobileSheets, and I think the easist way is by using the builtin sync-function - I think the companion app is too slow (and slightly unstable as well) Angel .
(Also: The script could be made to monitor the folder where I keep all my sheets and then automatically import them whenever I create a new sheet! Big Grin )
The workflow would be like this:

First: Manually sync the library to a cloud folder

Then the script takes over like this:
1. Collect information about the file - Title, composer, genre, and so on
2. Copy the file to the cloud folder in its own subdirectory
3. Add rows as necessary to the relevant tables in the SQLite database
4. Add to mobilesheets_hashcodes.txt
5. Repeat
6. Sync the library again - thereby importing all the new sheets

First of all: Is this even possible?

If it is:

I have trouble understanding the mobilesheets_hashcodes.txt file.

It contains 4 lines per file:
1. A hash or unique id of some sort followed by a / and then filename
2. A hashcode
3.Timestamp
4. Filesize

The mystery is the two hashvalues. How are they calculated? And of what?
I have no idea about the first hash - or if it even is a hash. Maybe it's some sort of unique id?
I'm pretty sure, the hashcode is calculated using java's hashcode() function. But when I input the filename, filename w/o extension, directory+filename (both forward a backslash) or some combination, I don't get the correct value.

I would greatly appreciate any help!

Best regards
Anders Olesen
Reply
#2
Hello Anders,

It's certainly possible, but you would basically be duplicating everything my software does when creating new songs and updating the tables for all the metadata fields. You'll have a lot of code you'll have to write to update all the various database tables. The database is changing with the next major update, so you'll have to be sure to constantly check for changes to the database schema and updating your script appropriately.

Check this post for information on the hashcodes file: https://zubersoft.com/mobilesheets/forum...3#pid28333

Mike
Reply
#3
I once made a program that uploaded files to MSPro using the Companion protocol (i.e., not Companion program, just the protocol). It worked nicely but I abandoned it when I changed my workflow. Maybe it still works...
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
Hi Mike

Thanks a lot. I'll have a look at it!

Best regards
Anders
Reply
#5
(07-09-2020, 04:19 PM)sciurius Wrote: I once made a program that uploaded files to MSPro using the Companion protocol (i.e., not Companion program, just the protocol). It worked nicely but I abandoned it when I changed my workflow.  Maybe it still works...

That sounds interesting. Do you have a link to your program?
Reply
#6
Sure.

https://github.com/sciurius/MSPro-Tools

The sync program is scrip/mspsync.pl .
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:
2 Guest(s)


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