Skip to content

Commit

Permalink
use media propery if exist in song-info
Browse files Browse the repository at this point in the history
  • Loading branch information
Araxeus committed May 5, 2021
1 parent 844edbe commit ca41c12
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions providers/song-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ const songInfo = {

const handleData = async (responseText, win) => {
let data = JSON.parse(responseText);
songInfo.title = data?.videoDetails?.title;
songInfo.artist = await getArtist(win) || data?.videoDetails?.author;
songInfo.title = data.videoDetails?.media?.song || data?.videoDetails?.title;
songInfo.artist = data.videoDetails?.media?.artist || await getArtist(win) || data?.videoDetails?.author;
songInfo.views = data?.videoDetails?.viewCount;
songInfo.imageSrc = data?.videoDetails?.thumbnail?.thumbnails?.pop()?.url;
songInfo.songDuration = data?.videoDetails?.lengthSeconds;
Expand Down

0 comments on commit ca41c12

Please sign in to comment.