{#key data.video.videoId}
-
+
{/key}
{data.video.title}
@@ -116,11 +122,22 @@
{numberWithCommas(data.video.viewCount)} views • {data.video.publishedText}
-
{data.video.description}
+
{data.content.description}
+ {#if data.content}
+
Chapters
+ {#each data.content.timestamps as timestamp}
+
+ {/each}
+ {/if}
- {#if data.comments && data.comments.comments.length > 0}
+ {#if data.comments && typeof data.comments.comments !== 'undefined' && data.comments.comments.length > 0}
{numberWithCommas(data.comments.commentCount)} comments
{#each data.comments.comments as comment}
- {#each data.video.recommendedVideos as recommendedVideo}
-
-
-
- {/each}
+ {#if data.video.recommendedVideos}
+ {#each data.video.recommendedVideos as recommendedVideo}
+
+
+
+ {/each}
+ {/if}
-
-
{:else}
{/if}
+
+
diff --git a/materialious/src/routes/watch/[slug]/+page.ts b/materialious/src/routes/watch/[slug]/+page.ts
index b3f730dd..fb8c33fb 100644
--- a/materialious/src/routes/watch/[slug]/+page.ts
+++ b/materialious/src/routes/watch/[slug]/+page.ts
@@ -1,4 +1,5 @@
import { amSubscribed, getComments, getDislikes, getVideo, postHistory } from '$lib/Api/index.js';
+import { phaseDescription } from '$lib/misc';
import { get } from 'svelte/store';
import { auth, playerProxyVideos } from '../../../store';
@@ -11,6 +12,7 @@ export async function load({ params }) {
video: video,
returnYTDislikes: await getDislikes(params.slug),
comments: video.liveNow ? null : await getComments(params.slug, { sort_by: "top", source: "youtube" }),
- subscribed: await amSubscribed(video.authorId)
+ subscribed: await amSubscribed(video.authorId),
+ content: phaseDescription(video.description)
};
};