Open jbenet opened 7 years ago
Does not work with the new format either. As far as i understood it asciinema-selfhost supports v1 but asciinema.org serves v2
This causes a crash in the json parser since v2 is no longer valid json only every individual line of it is.
$ node cli.js -c 567970
cloning 567970 to null
undefined:2
[0.015666, "o", "\u001b[H\u001b[2J\u001b[3J"]
^
SyntaxError: Unexpected token [ in JSON at position 119
at JSON.parse (<anonymous>)
at Request._callback (/home/chiller/Desktop/git/asciinema-selfhost/index.js:34:19)
at Request.self.callback (/home/chiller/Desktop/git/asciinema-selfhost/node_modules/request/request.js:185:22)
at Request.emit (node:events:513:28)
at Request.<anonymous> (/home/chiller/Desktop/git/asciinema-selfhost/node_modules/request/request.js:1154:10)
at Request.emit (node:events:513:28)
at IncomingMessage.<anonymous> (/home/chiller/Desktop/git/asciinema-selfhost/node_modules/request/request.js:1076:12)
at Object.onceWrapper (node:events:627:28)
at IncomingMessage.emit (node:events:525:35)
at endReadableNT (node:internal/streams/readable:1358:12)
Asciinema changed formats. Many asciinemas in asciinema.org have the old format. Currently, asciinema-selfhost does not support them. You can see how to fix this here: https://github.com/asciinema/asciinema.org/issues/234 -- PRs very welcome.