Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Araxeus committed Dec 1, 2021
1 parent 2c39c0e commit 8ce4b5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions providers/song-info-front.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const srcChangedEvent = new CustomEvent('srcChanged');

module.exports = () => {
document.addEventListener('apiLoaded', apiEvent => {
if (config.plugins.isEnabled('tuna-obs')) {
if (config.plugins.isEnabled('tuna-obs')) {
setupTimeChangeListener();
}
const video = $('video');
Expand All @@ -42,7 +42,7 @@ module.exports = () => {

function sendSongInfo() {
const data = apiEvent.detail.getPlayerResponse();
data.videoDetails.album = $('ytmusic-player-page')?.__data?.playerPageWatchMetadata?.albumName?.runs[0].text
data.videoDetails.album = $('ytmusic-player-page')?.__data?.playerPageWatchMetadata?.albumName?.runs[0].text
data.videoDetails.elapsedSeconds = Math.floor(video.currentTime);
data.videoDetails.isPaused = false;
ipcRenderer.send("video-src-changed", JSON.stringify(data));
Expand Down
2 changes: 1 addition & 1 deletion providers/song-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const handleData = async (responseText, win) => {
songInfo.elapsedSeconds = videoDetails.elapsedSeconds;
songInfo.isPaused = videoDetails.isPaused;
songInfo.videoId = videoDetails.videoId;
songInfo.album = data?.videoDetails?.album
songInfo.album = data?.videoDetails?.album; // Will be undefined if video exist

const oldUrl = songInfo.imageSrc;
songInfo.imageSrc = videoDetails.thumbnail?.thumbnails?.pop()?.url.split("?")[0];
Expand Down

0 comments on commit 8ce4b5b

Please sign in to comment.