public async Task <RequestEngineResult> RequestAlbum([FromBody] MusicAlbumRequestViewModel album) { var result = await _engine.RequestAlbum(album); if (result.Result) { var voteResult = await _voteEngine.UpVote(result.RequestId, RequestType.Album); if (voteResult.IsError) { _log.LogError("Couldn't automatically add the vote for the album {0} because {1}", album.ForeignAlbumId, voteResult.ErrorMessage); } } return(result); }
public async Task <RequestEngineResult> RequestTv([FromBody] TvRequestViewModelV2 tv) { tv.RequestedByAlias = GetApiAlias(); var result = await _tvRequestEngine.RequestTvShow(tv); if (result.Result) { var voteResult = await _voteEngine.UpVote(result.RequestId, RequestType.TvShow); if (voteResult.IsError) { _logger.LogError("Couldn't automatically add the vote for the tv {0} because {1}", tv.TheMovieDbId, voteResult.ErrorMessage); } } return(result); }
public Task <VoteEngineResult> UpvoteMovie(int requestId) { return(_engine.UpVote(requestId, RequestType.Movie)); }