Skip to content

Commit

Permalink
Update TMDbClientTvShows.cs
Browse files Browse the repository at this point in the history
Changes for jellyfin#381 and jellyfin#382. 

This change updates GetTvShowChangesAsync to:
1) (jellyfin#381) Changes returned type from Task<ChangesContainer> to Task<IList<Change>> to be consistent with GetTvSeasonChangesAsync, GetTvEpisodeChangesAsync, and GetMovieChangeAsync.
2) (jellyfin#382) Add missing startDate, endDate, and page parms
  • Loading branch information
mpfc75 authored Jul 9, 2021
1 parent 2d3d2d4 commit 384bd65
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions TMDbLib/Client/TMDbClientTvShows.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,10 @@ public async Task<TvShow> GetTvShowAsync(int id, TvShowMethods extraMethods = Tv
return item;
}

public async Task<ChangesContainer> GetTvShowChangesAsync(int id, CancellationToken cancellationToken = default)
public async Task<IList<Change>> GetTvShowChangesAsync(int id, int page = 0, DateTime? startDate = null, DateTime? endDate = null, CancellationToken cancellationToken = default)
{
return await GetTvShowMethodInternal<ChangesContainer>(id, TvShowMethods.Changes, cancellationToken: cancellationToken).ConfigureAwait(false);
ChangesContainer changesContainer = await GetChangesInternal<ChangesContainer>("tv", page, id, startDate, endDate, cancellationToken).ConfigureAwait(false);
return changesContainer.Changes;
}

public async Task<ResultContainer<ContentRating>> GetTvShowContentRatingsAsync(int id, CancellationToken cancellationToken = default)
Expand Down Expand Up @@ -361,4 +362,4 @@ public async Task<bool> TvShowSetRatingAsync(int tvShowId, double rating, Cancel
return item.StatusCode == 1 || item.StatusCode == 12;
}
}
}
}

0 comments on commit 384bd65

Please sign in to comment.