mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2026-02-09 07:27:16 +00:00
Fix JSON serialization
This commit is contained in:
@@ -16,16 +16,18 @@
|
||||
|
||||
<body>
|
||||
<script id="video_data" type="application/json">
|
||||
<%=
|
||||
{
|
||||
"id": "<%= video.id %>",
|
||||
"index": "<%= continuation %>",
|
||||
"plid": "<%= plid %>",
|
||||
"length_seconds": "<%= video.length_seconds.to_f %>",
|
||||
"video_series": <%= video_series.to_json %>,
|
||||
"params": <%= params.to_json %>,
|
||||
"preferences": <%= preferences.to_json %>,
|
||||
"premiere_timestamp": <%= video.premiere_timestamp.try &.to_unix || "null" %>
|
||||
}
|
||||
"id" => video.id,
|
||||
"index" => continuation,
|
||||
"plid" => plid,
|
||||
"length_seconds" => video.length_seconds.to_f,
|
||||
"video_series" => video_series,
|
||||
"params" => params,
|
||||
"preferences" => preferences,
|
||||
"premiere_timestamp" => video.premiere_timestamp.try &.to_unix
|
||||
}.to_pretty_json
|
||||
%>
|
||||
</script>
|
||||
|
||||
<%= rendered "components/player" %>
|
||||
|
||||
Reference in New Issue
Block a user