getMediaSourceHistory method

List<MediaItem> getMediaSourceHistory(
  1. {required MediaSource mediaSource}
)

Get the history of MediaItem for a particular MediaSource.

Implementation

List<MediaItem> getMediaSourceHistory({required MediaSource mediaSource}) {
  return _database.mediaItems
      .filter()
      .mediaSourceIdentifierEqualTo(mediaSource.uniqueKey)
      .findAllSync();
}