Esempio n. 1
0
        public async Task AddSomeTracksFromPlaylistToQueueAsync(PartyGoer partyGoer, string playlistId, int amount)
        {
            SpotibroModels.PlaylistContents playlistTracks = await _partyGoerService.GetPlaylistItemsAsync(partyGoer, playlistId);

            Party party = await _partyRepository.GetPartyWithAttendeeAsync(partyGoer);

            await party.AddTracksRandomlyToQueueAsync(playlistTracks.Tracks.GetRandomNItems(amount));
        }
Esempio n. 2
0
        public async Task <IActionResult> UsersPlaylistItems(string playlistId)
        {
            if (string.IsNullOrWhiteSpace(playlistId))
            {
                return(new NotFoundResult());
            }

            return(new JsonResult(await _partyGoerService.GetPlaylistItemsAsync(await _partyGoerService.GetCurrentPartyGoerAsync(), playlistId)));
        }