diff --git a/src/models/queue.js b/src/models/queue.js new file mode 100644 index 00000000..a5a47ec2 --- /dev/null +++ b/src/models/queue.js @@ -0,0 +1,17 @@ +import { currentData } from '../data/current' + +export default class Queue { + constructor() {} + + get addedToQueue() { + return document.querySelector('[aria-label="Next in queue"]') + } + + get nextInQueue() { + return document.querySelector('[aria-label="Next up"]') + } + + get blockedTracks() { + return currentData.blockedTracks + } +} diff --git a/src/observers/song-tracker.js b/src/observers/song-tracker.js index 98879d51..62eeca70 100644 --- a/src/observers/song-tracker.js +++ b/src/observers/song-tracker.js @@ -7,12 +7,14 @@ import { timeToSeconds } from '../utils/time.js' import { currentSongInfo } from '../utils/song.js' import { highlightElement } from '../utils/higlight.js' +import Queue from '../models/queue.js' import Dispatcher from '../events/dispatcher.js' export default class SongTracker { constructor() { this._init = true this._reverbSet = false + this._queue = new Queue() this._currentSongState = null this._video = spotifyVideo.element this._dispatcher = new Dispatcher()