dylanljones / pyrekordbox

Inofficial Python package for interacting with the database and other files (XML, ANLZ, MySettings) of Pioneers Rekordbox DJ software
https://pyrekordbox.readthedocs.io/en/latest/
MIT License
176 stars 22 forks source link

Decoding obfuscated PSSI data #99

Closed troyhacks closed 10 months ago

troyhacks commented 11 months ago

Adds logic to PSSI parsing to deobfuscate the data and make it accessible.

Adds proper parsing to convert previously obfuscated values for mood, end_beat, and bank into integers.

Cleans up the struct for PSSI to pad out the unknowns - opinions may vary on this, I just personally like it tidy.

dylanljones commented 11 months ago

Hi @troyhacks, thank you for adding the code for the PSSI tag!:)

Do you know if Padding from the structs library keeps the byte contents when writing it back to file? I think it just zeros out those bytes, which is not optimal. I also think it is prettier without all of the unknowns, but i want to make sure those bytes stay the same (unless they are always zero anyway). I didn't spend the time in my collection to add song structure info, so I haven't yet dug into the PSSI tag so much. But thanks again for your help, will merge as soon as that is clarified.

troyhacks commented 11 months ago

I honestly do not know - I had to give myself a crash course in Python to write this patch.

I would say to leave the unknowns - they aren't hurting anything.

...but I think mood, end_beat, and bank should be translated to integers, as that's what they are.

dylanljones commented 11 months ago

Yes, I totally agree on the known fields and I really appreciate your work:) Could you revert the unknown fields?

troyhacks commented 11 months ago

Reverted them back to bytes!

dylanljones commented 10 months ago

Very nice, thank you!