void asyncEpisodeCounts(object sender, DoWorkEventArgs e)
{
Thread.CurrentThread.Priority = ThreadPriority.Lowest;
List<DBSeries> allSeries = (List<DBSeries>)e.Argument;
BackgroundWorker worker = sender as BackgroundWorker;
int nIndex = 1;
var episodesForCount = DBSeries.GetEpisodesForCount();
foreach (DBSeries series in allSeries)
{
worker.ReportProgress(0, new object[] { series, nIndex++ });
DBSeries.UpdateEpisodeCounts(series, episodesForCount);
}
e.Result = allSeries.Count;
}
Does that mean if you have a special episode in your database it will count as watched regardless of its watched status?
If so I did not intend to make the cCountSpecialEpisodesAsWatched as default enabled in my last commit . I will change it back to false.
DBEpisode.GetSeriesEpisodeCounts() does not get called during an import.
I put the check in DBSeries.GetEpisodesForCount(), so it shouldn't go slower with this feature...fyi, a couple years ago I think I made some changes to episode counting as it was too slow.
Fixed!Another thing I noticed about the patch is that when you toggle option in GUI, it updates the series counts on the main thread. It should do this on a background thread.
ltfearme said: ↑
fyi, a couple years ago I think I made some changes to episode counting as it was too slow.
I put the check in DBSeries.GetEpisodesForCount(), so it shouldn't go slower with this feature...