예제 #1
0
        public async Task AddSomeTracksFromPlaylistToQueue(string partyCode, string playlistId, int amount)
        {
            PartyGoer partier = await _partyGoerService.GetCurrentPartyGoerAsync();

            await _partyService.AddSomeTracksFromPlaylistToQueueAsync(partier, playlistId, amount);

            Party party = await _partyService.GetPartyWithAttendeeAsync(partier);

            // Update the view of the partier to the current playlist
            await Clients.Group(party.GetPartyCode()).SendAsync("UpdatePartyView",
                                                                new
            {
                Song     = party.GetCurrentSong(),
                Position = party.GetCurrentPositionInSong()
            },
                                                                party.GetHistory(),
                                                                party.GetQueue()
                                                                );
        }