|
@@ -899,7 +899,8 @@ export default {
|
|
beforeEditSongModalLocalPaused: null,
|
|
beforeEditSongModalLocalPaused: null,
|
|
socketConnected: null,
|
|
socketConnected: null,
|
|
persistentToastCheckerInterval: null,
|
|
persistentToastCheckerInterval: null,
|
|
- persistentToasts: []
|
|
|
|
|
|
+ persistentToasts: [],
|
|
|
|
+ partyPlaylistLock: false
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -964,16 +965,6 @@ export default {
|
|
socket: "websockets/getSocket"
|
|
socket: "websockets/getSocket"
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- watch: {
|
|
|
|
- currentUserQueueSongs(total) {
|
|
|
|
- if (
|
|
|
|
- this.station.type === "community" &&
|
|
|
|
- this.station.partyMode === true &&
|
|
|
|
- total < 3
|
|
|
|
- )
|
|
|
|
- this.addPartyPlaylistSongToQueue();
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
async mounted() {
|
|
async mounted() {
|
|
this.editSongModalWatcher = this.$store.watch(
|
|
this.editSongModalWatcher = this.$store.watch(
|
|
state => state.modals.editSong.video.paused,
|
|
state => state.modals.editSong.video.paused,
|
|
@@ -1143,6 +1134,8 @@ export default {
|
|
: null;
|
|
: null;
|
|
|
|
|
|
this.updateNextSong(nextSong);
|
|
this.updateNextSong(nextSong);
|
|
|
|
+
|
|
|
|
+ if (res.data.queue.length < 50) this.addPartyPlaylistSongToQueue();
|
|
});
|
|
});
|
|
|
|
|
|
this.socket.on("event:station.queue.song.repositioned", res => {
|
|
this.socket.on("event:station.queue.song.repositioned", res => {
|
|
@@ -1919,8 +1912,10 @@ export default {
|
|
},
|
|
},
|
|
addPartyPlaylistSongToQueue() {
|
|
addPartyPlaylistSongToQueue() {
|
|
if (
|
|
if (
|
|
|
|
+ !this.partyPlaylistLock &&
|
|
this.station.type === "community" &&
|
|
this.station.type === "community" &&
|
|
this.station.partyMode === true &&
|
|
this.station.partyMode === true &&
|
|
|
|
+ this.songsList.length < 50 &&
|
|
this.currentUserQueueSongs < 3 &&
|
|
this.currentUserQueueSongs < 3 &&
|
|
this.partyPlaylists.length > 0
|
|
this.partyPlaylists.length > 0
|
|
) {
|
|
) {
|
|
@@ -1936,11 +1931,13 @@ export default {
|
|
)
|
|
)
|
|
];
|
|
];
|
|
if (selectedSong.youtubeId) {
|
|
if (selectedSong.youtubeId) {
|
|
|
|
+ this.partyPlaylistLock = true;
|
|
this.socket.dispatch(
|
|
this.socket.dispatch(
|
|
"stations.addToQueue",
|
|
"stations.addToQueue",
|
|
this.station._id,
|
|
this.station._id,
|
|
selectedSong.youtubeId,
|
|
selectedSong.youtubeId,
|
|
data => {
|
|
data => {
|
|
|
|
+ this.partyPlaylistLock = false;
|
|
if (data.status !== "success")
|
|
if (data.status !== "success")
|
|
this.addPartyPlaylistSongToQueue();
|
|
this.addPartyPlaylistSongToQueue();
|
|
}
|
|
}
|