Exemple #1
0
        /// <summary>
        /// Stop torrent from being active
        /// </summary>
        /// <param name="deleteFiles"></param>
        public void Remove(bool deleteFiles)
        {
            string magnet = TorrentSource.Magnet;

            TorrentSession.RemoveTorrent(Handle, deleteFiles);
            TorrentDatabase.Remove(magnet);
            torrents.Remove(this);
        }
Exemple #2
0
        /// <summary>
        /// Continues all unifinished torrents
        /// </summary>
        public async static void ContinueUnfinished()
        {
            var torrents = TorrentDatabase.Load();

            torrents = torrents.Where(x => x.HasFinished == false).ToList();
            foreach (var item in torrents)
            {
                TorrentDatabase.Remove(item.Magnet);
                TorrentDownloader downloader = new TorrentDownloader(item);
                await downloader.Download();
            }
        }
Exemple #3
0
 private void Remove_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
 {
     this.Visibility = Visibility.Collapsed;
     TorrentDatabase.Remove(torrent.Magnet);
 }