Example #1
0
 public override void MarkItemAsImported(DownloadClientItem downloadClientItem)
 {
     // set post-import category
     if (Settings.TvImportedCategory.IsNotNullOrWhiteSpace() &&
         Settings.TvImportedCategory != Settings.TvCategory)
     {
         try
         {
             _proxy.SetTorrentLabel(downloadClientItem.DownloadId.ToLower(), Settings.TvImportedCategory, Settings);
         }
         catch (DownloadClientUnavailableException)
         {
             _logger.Warn("Failed to set torrent post-import label \"{0}\" for {1} in Deluge. Does the label exist?",
                          Settings.TvImportedCategory, downloadClientItem.Title);
         }
     }
 }
Example #2
0
        protected override string AddFromMagnetLink(ReleaseInfo release, string hash, string magnetLink)
        {
            var actualHash = _proxy.AddTorrentFromMagnet(magnetLink, Settings);

            if (actualHash.IsNullOrWhiteSpace())
            {
                throw new DownloadClientException("Deluge failed to add magnet " + magnetLink);
            }

            // _proxy.SetTorrentSeedingConfiguration(actualHash, remoteMovie.SeedConfiguration, Settings);
            if (Settings.Category.IsNotNullOrWhiteSpace())
            {
                _proxy.SetTorrentLabel(actualHash, Settings.Category, Settings);
            }

            if (Settings.Priority == (int)DelugePriority.First)
            {
                _proxy.MoveTorrentToTopInQueue(actualHash, Settings);
            }

            return(actualHash.ToUpper());
        }