|
@@ -678,6 +678,15 @@
|
|
><b>Party playlists selected</b>: {{ partyPlaylists }}</span
|
|
><b>Party playlists selected</b>: {{ partyPlaylists }}</span
|
|
>
|
|
>
|
|
<span><b>Skip votes loaded</b>: {{ skipVotesLoaded }}</span>
|
|
<span><b>Skip votes loaded</b>: {{ skipVotesLoaded }}</span>
|
|
|
|
+ <span
|
|
|
|
+ ><b>Skip votes current</b>:
|
|
|
|
+ {{
|
|
|
|
+ currentSong.skipVotesCurrent === true ||
|
|
|
|
+ currentSong.skipVotesCurrent === false
|
|
|
|
+ ? currentSong.skipVotesCurrent
|
|
|
|
+ : "N/A"
|
|
|
|
+ }}</span
|
|
|
|
+ >
|
|
<span
|
|
<span
|
|
><b>Skip votes</b>:
|
|
><b>Skip votes</b>:
|
|
{{ skipVotesLoaded ? currentSong.skipVotes : "N/A" }}</span
|
|
{{ skipVotesLoaded ? currentSong.skipVotes : "N/A" }}</span
|
|
@@ -912,6 +921,13 @@ export default {
|
|
timePaused,
|
|
timePaused,
|
|
pausedAt: 0
|
|
pausedAt: 0
|
|
});
|
|
});
|
|
|
|
+ } else if (this.currentSong._id === currentSong._id) {
|
|
|
|
+ if (this.currentSong.skipVotesLoaded !== true) {
|
|
|
|
+ this.updateCurrentSongSkipVotes({
|
|
|
|
+ skipVotes: currentSong.skipVotes,
|
|
|
|
+ skipVotesCurrent: true
|
|
|
|
+ });
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
this.setNextCurrentSong({
|
|
this.setNextCurrentSong({
|
|
currentSong,
|
|
currentSong,
|
|
@@ -1053,7 +1069,10 @@ export default {
|
|
|
|
|
|
this.socket.on("event:station.voteSkipSong", () => {
|
|
this.socket.on("event:station.voteSkipSong", () => {
|
|
if (this.currentSong)
|
|
if (this.currentSong)
|
|
- this.updateCurrentSongSkipVotes(this.currentSong.skipVotes + 1);
|
|
|
|
|
|
+ this.updateCurrentSongSkipVotes({
|
|
|
|
+ skipVotes: this.currentSong.skipVotes + 1,
|
|
|
|
+ skipVotesCurrent: null
|
|
|
|
+ });
|
|
});
|
|
});
|
|
|
|
|
|
this.socket.on("event:privatePlaylist.selected", res => {
|
|
this.socket.on("event:privatePlaylist.selected", res => {
|
|
@@ -1299,14 +1318,24 @@ export default {
|
|
}, this.getTimeRemaining());
|
|
}, this.getTimeRemaining());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ const currentSongId = this.currentSong._id;
|
|
|
|
+
|
|
this.socket.dispatch(
|
|
this.socket.dispatch(
|
|
"stations.getSkipVotes",
|
|
"stations.getSkipVotes",
|
|
this.station._id,
|
|
this.station._id,
|
|
|
|
+ currentSongId,
|
|
res => {
|
|
res => {
|
|
if (res.status === "success") {
|
|
if (res.status === "success") {
|
|
- const { skipVotes, songId } = res.data;
|
|
|
|
- if (!this.noSong && this.currentSong._id === songId)
|
|
|
|
- this.updateCurrentSongSkipVotes(skipVotes);
|
|
|
|
|
|
+ const { skipVotes, skipVotesCurrent } = res.data;
|
|
|
|
+ if (
|
|
|
|
+ !this.noSong &&
|
|
|
|
+ this.currentSong._id === currentSongId
|
|
|
|
+ ) {
|
|
|
|
+ this.updateCurrentSongSkipVotes({
|
|
|
|
+ skipVotes,
|
|
|
|
+ skipVotesCurrent
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
);
|
|
);
|