예제 #1
0
        protected override string AddFromMagnetLink(RemoteEpisode remoteEpisode, string hash, string magnetLink)
        {
            _proxy.AddTorrentFromUrl(magnetLink, Settings);

            if (Settings.TvCategory.IsNotNullOrWhiteSpace())
            {
                _proxy.SetTorrentLabel(hash.ToLower(), Settings.TvCategory, Settings);
            }

            var isRecentEpisode = remoteEpisode.IsRecentEpisode();

            if (isRecentEpisode && Settings.RecentTvPriority == (int)QBittorrentPriority.First ||
                !isRecentEpisode && Settings.OlderTvPriority == (int)QBittorrentPriority.First)
            {
                _proxy.MoveTorrentToTopInQueue(hash.ToLower(), Settings);
            }

            return(hash);
        }
예제 #2
0
        protected override string AddFromMagnetLink(RemoteMovie remoteMovie, string hash, string magnetLink)
        {
            _proxy.AddTorrentFromUrl(magnetLink, Settings);

            if (Settings.MovieCategory.IsNotNullOrWhiteSpace())
            {
                _proxy.SetTorrentLabel(hash.ToLower(), Settings.MovieCategory, Settings);
            }

            var isRecentMovie = remoteMovie.Movie.IsRecentMovie;

            if (isRecentMovie && Settings.RecentMoviePriority == (int)QBittorrentPriority.First ||
                !isRecentMovie && Settings.OlderMoviePriority == (int)QBittorrentPriority.First)
            {
                _proxy.MoveTorrentToTopInQueue(hash.ToLower(), Settings);
            }

            SetInitialState(hash.ToLower());

            return(hash);
        }