Channel9Downloader.DataAccess.DownloadManager.RemoveAlreadyFinishedDownloads C# (CSharp) Method

RemoveAlreadyFinishedDownloads() private method

Removes already finished downloads from the list of available items.
private RemoveAlreadyFinishedDownloads ( IList availableItems ) : void
availableItems IList List of all available items.
return void
        private void RemoveAlreadyFinishedDownloads(IList<IDownloadItem> availableItems)
        {
            var finishedDownloads = _finishedDownloadsRepository.GetAllFinishedDownloads();
            for (int i = availableItems.Count - 1; i >= 0; i--)
            {
                int i1 = i;
                if (finishedDownloads.Any(p => p.Guid == availableItems[i1].RssItem.Guid))
                {
                    availableItems.Remove(availableItems[i]);
                }
            }
        }