syntax error in program code output of multitrack DVD
Brought to you by:
acid_kewpie,
pere
I just noticed that the track array in JSON output is missing intermediate commas:
% lsdvd -Oj my.iso
{
"device" : "my.iso",
"title" : "MY DVD",
"vmg_id" : "DVDVIDEO-VMG",
"provider_id" : "MY DVD",
"track" : [
{
"ix" : 1,
"length" : 32.700,
"vts_id" : "DVDVIDEO-VTS" } {
"ix" : 2,
"length" : 5778.000,
"vts_id" : "DVDVIDEO-VTS" } {
"ix" : 3,
"length" : 5343.800,
"vts_id" : "DVDVIDEO-VTS" } {
"ix" : 4,
"length" : 1060.233,
"vts_id" : "DVDVIDEO-VTS" } {
"ix" : 5,
"length" : 849.400,
"vts_id" : "DVDVIDEO-VTS" } {
"ix" : 6,
"length" : 490.000,
"vts_id" : "DVDVIDEO-VTS" } {
"ix" : 7,
"length" : 45.000,
"vts_id" : "DVDVIDEO-VTS" } ],
"dvddiscid" : "<redacted>",
"longest_track" : 2
}
This issue is likely related to this commit remark in the JSON checkin:
Restructure all program code output to avoid redundant trailing commas,
and actually breaks all program output (Perl, Python and Ruby output all have the same syntax error).
[Adrian Ho]
Are you able to extend testsuite/output-json to demonstrate this issue?
In the example generated to test on, the intermittend commas are
present, so there is something about your my.iso that is not present in
the test ISO generated by the test suite.
--
Happy hacking
Petter Reinholdtsen
If you mean "extend testsuite/testdvd-template.xml to specify a multitrack DVD", I'll give it a shot, but it might take a while.
In the meantime, attached are the
output-jsonandoutput-xmloutputs of the same ISO.xmllintinoutput-xmlreturned no errors, whileoutput-jsonthrewjq: parse error: Expected separator between values at line 63, column 10. Essentially, every multi-item array in the JSON (and Ruby/Perl/Python outputs) is missing all the commas that separate each item.Oh, and I just noticed I filed this in the wrong category. Sorry.
Last edit: Adrian Ho 2025-02-17
[Adrian Ho]
Yes, that is exactly what I meant. But do not worry, I managed to
extend it in a way that seem to have triggered the bug you reported, and
implemented a fix in 9c55bc309d669a21bf0c5ad7317b5442d83daa86. It will
be included in the next release.
No worries. :)
PS: Your email provider rejects emails from me.
--
Happy hacking
Petter Reinholdtsen