Working on ytmusic parsers

This commit is contained in:
Eclypsed
2024-02-28 03:03:40 -05:00
parent ade2ee9b86
commit 79bbead5e4
7 changed files with 125 additions and 45 deletions

View File

@@ -13,7 +13,8 @@ export const GET: RequestHandler = async ({ params }) => {
connection.service = await Jellyfin.fetchSerivceInfo(connection.service.userId, connection.service.urlOrigin, connection.tokens.accessToken)
break
case 'youtube-music':
connection.service = await YouTubeMusic.fetchServiceInfo(connection.service.userId, connection.tokens.accessToken)
const youTubeMusic = new YouTubeMusic(connection)
connection.service = await youTubeMusic.fetchServiceInfo()
break
}
}

View File

@@ -35,7 +35,8 @@ export const GET: RequestHandler = async ({ params, fetch }) => {
for (const song of mostPlayedData.Items) recommendations.push(Jellyfin.songFactory(song, connection))
break
case 'youtube-music':
YouTubeMusic.getHome(tokens.accessToken)
const youtubeMusic = new YouTubeMusic(connection)
youtubeMusic.getHome()
break
}
}