void torrentDetailsWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            TorrentDetails det = e.Result as TorrentDetails;

            // show files
            dgTorrentFiles.ItemsSource = det.TorrentFiles;

            // show details
            SetAttachedSeries(det.AnimeSeries);
        }
        void torrentDetailsWorker_DoWork(object sender, DoWorkEventArgs e)
        {
            Torrent            tor   = e.Argument as Torrent;
            List <TorrentFile> files = UTorrentHelperVM.Instance.GetFilesForTorrent(tor.Hash);

            TorrentDetails det = new TorrentDetails();

            det.TorrentFiles = files;

            // try and find the series
            foreach (AniDB_AnimeVM anime in AniDB_AnimeVM.BestLevenshteinDistanceMatchesCache(tor.ClosestAnimeMatchString, 10))
            {
                // get the series for the anime
                AnimeSeriesVM ser = MainListHelperVM.Instance.GetSeriesForAnime(anime.AnimeID);
                if (ser != null)
                {
                    det.AnimeSeries = ser;
                    break;
                }
            }

            e.Result = det;
        }
		void torrentDetailsWorker_DoWork(object sender, DoWorkEventArgs e)
		{
			Torrent tor = e.Argument as Torrent;
			List<TorrentFile> files = UTorrentHelperVM.Instance.GetFilesForTorrent(tor.Hash);

			TorrentDetails det = new TorrentDetails();
			det.TorrentFiles = files;

			// try and find the series
			foreach (AniDB_AnimeVM anime in AniDB_AnimeVM.BestLevenshteinDistanceMatchesCache(tor.ClosestAnimeMatchString, 10))
			{
				// get the series for the anime
				AnimeSeriesVM ser = MainListHelperVM.Instance.GetSeriesForAnime(anime.AnimeID);
				if (ser != null)
				{
					det.AnimeSeries = ser;
					break;
				}
				
			}

			e.Result = det;
		}