Closed JohnVeness closed 2 years ago
For null
s, I don't really understand why null and empty string are both being used for entries with no value. I think the older versions of MPF only use empty string.
For undefined
s, are you using a legit JSON file output by MPF? If there is d_ring_0_ma2, there should be d_ring_0_ma2_sid as well, unless MPF has changed the way it outputs JSON. In that case, I may need to to rewrite the whole ring code text generation part.
Yes, this is genuine output from MPF 2.3. I have a small collection of jsons, from PC DVD-ROM-5s and DVD-ROM-9s if you want them. I did consider this could be a bug in MPF but to be honest every time I look at the code, with all the similarly-named fields, my eyes go cross-eyed.
https://github.com/nightson/UserScripts/commit/716155bf606a44d8dda290a8d3291046bf178871
Could you test if the fix works correctly before I bump the version number? It works fine here with minimal testing. I mainly dump PC CD games and don't have a lot of JSON files for different platform at hand.
Thanks, I have tested this (after commenting out the call to resetForm() for now!, see #5), and it seems to work fine with all my PC DVD-5s and DVD-9s. I haven't tested it with any other formats yet, but I will keep an eye on the ringcode output before submitting any forms, and let you know if I see any oddities.
I don't have any issue with resetForm()
here. It's really weird. Could you check the browser console to see if there is any error warning?
Just moved the placeholder replacing part to the parse function and bumped the version number.
https://github.com/nightson/UserScripts/commit/2798dbff0ccb13f8c752c5ad7d384c124e08dc3e
Given the following (partial) JSON:
I get the following in the newdisc ringcode textbox:
I'd expect there to be no text where there are currently
null
s andundefined
s.