Beispiel #1
0
        public async Task <bool> AddAlbum(RequestedModel request)
        {
            var addArtistResult = await AddArtist(request);

            if (!addArtistResult)
            {
                return(false);
            }

            // Artist is now active
            // Add album
            var albumResult = await Api.AddAlbum(Settings.ApiKey, Settings.FullUri, request.ReleaseId);

            if (!albumResult)
            {
                Log.Error("Couldn't add the album to headphones");
            }

            // Set the status to wanted and search
            var status = await SetAlbumStatus(request);

            if (!status)
            {
                return(false);
            }

            // Approve it
            request.Approved = true;

            // Update the record
            bool updated = RequestService.UpdateRequest(request);

            return(updated);
        }