Esempio n. 1
0
        public void FileSetPriority(string hash, int idx, TorrentFilePriority priority)
        {
            if (!ValidCredentials())
            {
                BaseConfig.MyAnimeLog.Write("Credentials are not valid for uTorrent");
                return;
            }

            try
            {
                string url    = string.Format(urlTorrentFilePriority, address, port, token, hash, (int)priority, idx);
                string output = GetWebResponse(url);

                return;
            }
            catch (Exception ex)
            {
                BaseConfig.MyAnimeLog.Write("Error in StartTorrent: {0}", ex.ToString());
                return;
            }
        }
Esempio n. 2
0
        public void FileSetPriority(string hash, int idx, TorrentFilePriority priority)
        {
            if (!ValidCredentials())
            {
                logger.Warn("Credentials are not valid for uTorrent");
                return;
            }

            try
            {
                string url    = string.Format(urlTorrentFilePriority, AppSettings.UTorrentAddress, AppSettings.UTorrentPort, token, hash, (int)priority, idx);
                string output = GetWebResponse(url);

                return;
            }
            catch (Exception ex)
            {
                logger.Error("Error in StartTorrent: {0}", ex.ToString());
                return;
            }
        }
Esempio n. 3
0
		public void FileSetPriority(string hash, int idx, TorrentFilePriority priority)
		{
			if (!ValidCredentials())
			{
				logger.Warn("Credentials are not valid for uTorrent");
				return;
			}

			try
			{
				string url = string.Format(urlTorrentFilePriority, AppSettings.UTorrentAddress, AppSettings.UTorrentPort, token, hash, (int)priority, idx);
				string output = GetWebResponse(url);

				return;
			}
			catch (Exception ex)
			{
				logger.Error("Error in StartTorrent: {0}", ex.ToString());
				return;
			}
		}
Esempio n. 4
0
        public void FileSetPriority(string hash, int idx, TorrentFilePriority priority)
        {
            if (!ValidCredentials())
            {
                BaseConfig.MyAnimeLog.Write("Credentials are not valid for uTorrent");
                return;
            }

            try
            {
                string url = string.Format(urlTorrentFilePriority, address, port, token, hash, (int)priority, idx);
                string output = GetWebResponse(url);

                return;
            }
            catch (Exception ex)
            {
                BaseConfig.MyAnimeLog.Write("Error in StartTorrent: {0}", ex.ToString());
                return;
            }
        }