private void GivenMovieAlreadyInPlex() { _plexMediaItem = new MoviePlexMediaItemRowBuilder().Build(); _plexService .GetExistingMediaItemByAgent(Arg.Any <PlexMediaTypes>(), Arg.Any <AgentTypes>(), Arg.Any <string>()) .Returns(_plexMediaItem); }
private async Task <PlexMediaItemRow> GetExistingPlexMediaItem(int theMovieDbId, ExternalIds externalIds) { var plexMediaItem = await _plexService.GetExistingMediaItemByAgent(PlexMediaTypes.Movie, AgentTypes.TheMovieDb, theMovieDbId.ToString()); if (plexMediaItem == null && !string.IsNullOrEmpty(externalIds?.Imdb_Id)) { plexMediaItem = await _plexService.GetExistingMediaItemByAgent(PlexMediaTypes.Movie, AgentTypes.Imdb, externalIds.Imdb_Id); } return(plexMediaItem); }
private async Task <PlexMediaItemRow> GetPlexMediaItem(AgentTypes agentType, string externalId) { return(await _plexService.GetExistingMediaItemByAgent(PlexMediaTypes.Show, agentType, externalId)); }
private async Task <PlexMediaItemRow> GetPlexMediaItem(int theMovieDbId, PlexMediaTypes mediaType) { var plexMediaItem = await _plexService.GetExistingMediaItemByAgent(mediaType, AgentTypes.TheMovieDb, theMovieDbId.ToString()); return(plexMediaItem); }