2.1.0-alpha.2 sync report bug

I noticed multiple instances of multi-line errors showing up in the sync report csv. That is really not permissible in CSV files. The error should be condensced and on one line

1654831292001,/zfspool1/media/videos/20051218-3philippetv.avi,failed,"Cannot build previews: none of the files are valid: Failed to extract video frame for /zfspool1/media/videos/20051218-3philippetv.avi: [dvvideo @ 0x55ad563e9340] Concealing bitstream errors
    Last message repeated 136 times
[dvvideo @ 0x55ad56419ac0] Concealing bitstream errors
    Last message repeated 13 times
[dvvideo @ 0x55ad5641a440] Concealing bitstream errors
[dvvideo @ 0x55ad56419ac0] Conc…  Last message repeated 48 times: Cannot read /zfspool1/media/videos/20051218-3philippetv.avi (video/x-msvideo)²⁶",,3887

Thanks for the report!

As I was building the sync report, I found a couple surprising things:

I initially used a naive internal implementation (just double-quoting all fields), and then realized there were many other special cases, so I switched to papaparse.

According to the CSV RFC:

  • Fields containing a line-break, double-quote or commas should be quoted. (If they are not, the file will likely be impossible to process correctly.)
  • If double-quotes are used to enclose fields, then a double-quote in a field must be represented by two double-quote characters.

I was able to import the above CSV correctly with both LibreOffice and Google Sheets, so papaparse seems to be doing the right thing.