Class: RUTorrent::RSSFilter

Inherits:
Object
  • Object
show all
Defined in:
lib/rutorrent/rssfilter.rb

Constant Summary

QUALITIES =
%w{HDTV TVRip DVDRip SVCD DSRip DVBRip PDTV HR.HDTV HR.PDTV DVDR
DVDScr 720p 1080i 1080p WebRip SatRip}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(array) ⇒ RSSFilter



11
12
13
14
15
# File 'lib/rutorrent/rssfilter.rb', line 11

def initialize(array)
  @id, @flags, @name, @filter, @not_filter, @directory, @feed, @quality,
  @label, @postpone_mode, @last_match, @smart_ep_filter, @repack_ep_filter,
  @episode_filter_str, @episode_filter, @resolving_candidate = array
end

Instance Attribute Details

#directoryObject (readonly)

Returns the value of attribute directory



6
7
8
# File 'lib/rutorrent/rssfilter.rb', line 6

def directory
  @directory
end

#episode_filterObject (readonly)

Returns the value of attribute episode_filter



6
7
8
# File 'lib/rutorrent/rssfilter.rb', line 6

def episode_filter
  @episode_filter
end

#episode_filter_strObject (readonly)

Returns the value of attribute episode_filter_str



6
7
8
# File 'lib/rutorrent/rssfilter.rb', line 6

def episode_filter_str
  @episode_filter_str
end

#feedObject (readonly)

Returns the value of attribute feed



6
7
8
# File 'lib/rutorrent/rssfilter.rb', line 6

def feed
  @feed
end

#filterObject (readonly)

Returns the value of attribute filter



6
7
8
# File 'lib/rutorrent/rssfilter.rb', line 6

def filter
  @filter
end

#flagsObject (readonly)

Returns the value of attribute flags



6
7
8
# File 'lib/rutorrent/rssfilter.rb', line 6

def flags
  @flags
end

#idObject (readonly)

Returns the value of attribute id



6
7
8
# File 'lib/rutorrent/rssfilter.rb', line 6

def id
  @id
end

#labelObject (readonly)

Returns the value of attribute label



6
7
8
# File 'lib/rutorrent/rssfilter.rb', line 6

def label
  @label
end

#last_matchObject (readonly)

Returns the value of attribute last_match



6
7
8
# File 'lib/rutorrent/rssfilter.rb', line 6

def last_match
  @last_match
end

#nameObject (readonly)

Returns the value of attribute name



6
7
8
# File 'lib/rutorrent/rssfilter.rb', line 6

def name
  @name
end

#not_filterObject (readonly)

Returns the value of attribute not_filter



6
7
8
# File 'lib/rutorrent/rssfilter.rb', line 6

def not_filter
  @not_filter
end

#postpone_modeObject (readonly)

Returns the value of attribute postpone_mode



6
7
8
# File 'lib/rutorrent/rssfilter.rb', line 6

def postpone_mode
  @postpone_mode
end

#qualityObject (readonly)

Returns the value of attribute quality



6
7
8
# File 'lib/rutorrent/rssfilter.rb', line 6

def quality
  @quality
end

#repack_ep_filterObject (readonly)

Returns the value of attribute repack_ep_filter



6
7
8
# File 'lib/rutorrent/rssfilter.rb', line 6

def repack_ep_filter
  @repack_ep_filter
end

#resolving_candidateObject (readonly)

Returns the value of attribute resolving_candidate



6
7
8
# File 'lib/rutorrent/rssfilter.rb', line 6

def resolving_candidate
  @resolving_candidate
end

#smart_ep_filterObject (readonly)

Returns the value of attribute smart_ep_filter



6
7
8
# File 'lib/rutorrent/rssfilter.rb', line 6

def smart_ep_filter
  @smart_ep_filter
end

Instance Method Details

#add_stopped?Boolean



21
# File 'lib/rutorrent/rssfilter.rb', line 21

def add_stopped?;           !@flags[4].zero? end

#enabled?Boolean



17
# File 'lib/rutorrent/rssfilter.rb', line 17

def enabled?;               !@flags[0].zero? end

#high_priority?Boolean



19
# File 'lib/rutorrent/rssfilter.rb', line 19

def high_priority?;         !@flags[2].zero? end

#matches_original_name?Boolean



18
# File 'lib/rutorrent/rssfilter.rb', line 18

def matches_original_name?; !@flags[1].zero? end

#qualitiesObject



23
24
25
26
27
28
29
30
31
32
# File 'lib/rutorrent/rssfilter.rb', line 23

def qualities
  unless @qualities
    @qualities = []
    QUALITIES.each_with_index do |q,i|
      @qualities << q unless @quality[i].zero?
    end
  end

  @qualities
end

#smart_episode_filter?Boolean



20
# File 'lib/rutorrent/rssfilter.rb', line 20

def smart_episode_filter?;  !@flags[3].zero? end