Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,14 @@ public Long enqueueDj(PartyroomId partyroomId, PlaylistId playlistId) {
DjData dj = DjData.create(partyroom.getPartyroomId(), playlistId, crewId, nextOrder);
DjData saved = aggregatePort.saveDj(dj);

playbackState.activate(null, null);
aggregatePort.savePlaybackState(playbackState);
if (isPostActivationProcessingRequired) {
playbackState.activate(null, null);
aggregatePort.savePlaybackState(playbackState);
}

eventPublisher.publishEvent(new DjQueueChangedEvent(partyroom.getPartyroomId(), DjChangeType.ENQUEUE, crewId));

if(isPostActivationProcessingRequired) {
if (isPostActivationProcessingRequired) {
playbackControlPort.startPlayback(partyroom);
}
return saved.getId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public DjQueueInfoResult getDjQueueInfo(PartyroomId partyroomId) {
QueueStatus queueStatus = djQueue.isClosed() ? QueueStatus.CLOSE : QueueStatus.OPEN;
boolean isRegistered = isAlreadyRegistered(partyroom.getPartyroomId());
PlaybackData playback = null;
if (isPlaybackActivated) {
if (isPlaybackActivated && playbackState.getCurrentPlaybackId() != null) {
playback = playbackQueryService.getPlaybackById(playbackState.getCurrentPlaybackId());
}
List<DjWithProfileDto> djWithProfiles = getDjs(partyroom.getPartyroomId());
Expand Down
Loading