Website Update
This commit is contained in:
1 parent
3848bc8ee3
commit
0bfc7a9e7a
4 files changed
+29
-30
No files matched your search
@@ -11,23 +11,23 @@ function shuffleArray(array: any[]) {
|
||||
/** @type {import('./$types').PageServerLoad} */
|
||||
export async function load({ params }) {
|
||||
|
||||
const playlistUrl = 'https://music.youtube.com/playlist?list=PLHqPHHvmOjJ6JwiYc3Fg-O5JGbVppI1VR&si=pJnM95siw3kQRlnr';
|
||||
// const playlistUrl = 'https://music.youtube.com/playlist?list=PLHqPHHvmOjJ6JwiYc3Fg-O5JGbVppI1VR&si=evK225CpqXKeSq2Q';
|
||||
|
||||
const playlist = await playdl.playlist_info(playlistUrl);
|
||||
// const playlist = await playdl.playlist_info(playlistUrl);
|
||||
|
||||
let songs = (await playlist.all_videos()).map((video: YouTubeVideo) => {
|
||||
return {
|
||||
title: video.title,
|
||||
url: video.url,
|
||||
author: video.channel?.name,
|
||||
authorUrl: video.channel?.url,
|
||||
thumbnail: video.thumbnails[0].url,
|
||||
duration: video.durationRaw,
|
||||
}
|
||||
})
|
||||
// let songs = (await playlist.all_videos()).map((video: YouTubeVideo) => {
|
||||
// return {
|
||||
// title: video.title,
|
||||
// url: video.url,
|
||||
// author: video.channel?.name,
|
||||
// authorUrl: video.channel?.url,
|
||||
// thumbnail: video.thumbnails[0].url,
|
||||
// duration: video.durationRaw,
|
||||
// }
|
||||
// })
|
||||
|
||||
return {
|
||||
songs: shuffleArray(songs)
|
||||
songs: []
|
||||
};
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user