Class: RUTorrent::RSSFilter
- Inherits:
-
Object
- Object
- RUTorrent::RSSFilter
- Defined in:
- lib/rutorrent/rssfilter.rb
Constant Summary collapse
- QUALITIES =
%w{HDTV TVRip DVDRip SVCD DSRip DVBRip PDTV HR.HDTV HR.PDTV DVDR DVDScr 720p 1080i 1080p WebRip SatRip}
Instance Attribute Summary collapse
-
#directory ⇒ Object
readonly
Returns the value of attribute directory.
-
#episode_filter ⇒ Object
readonly
Returns the value of attribute episode_filter.
-
#episode_filter_str ⇒ Object
readonly
Returns the value of attribute episode_filter_str.
-
#feed ⇒ Object
readonly
Returns the value of attribute feed.
-
#filter ⇒ Object
readonly
Returns the value of attribute filter.
-
#flags ⇒ Object
readonly
Returns the value of attribute flags.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#last_match ⇒ Object
readonly
Returns the value of attribute last_match.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#not_filter ⇒ Object
readonly
Returns the value of attribute not_filter.
-
#postpone_mode ⇒ Object
readonly
Returns the value of attribute postpone_mode.
-
#quality ⇒ Object
readonly
Returns the value of attribute quality.
-
#repack_ep_filter ⇒ Object
readonly
Returns the value of attribute repack_ep_filter.
-
#resolving_candidate ⇒ Object
readonly
Returns the value of attribute resolving_candidate.
-
#smart_ep_filter ⇒ Object
readonly
Returns the value of attribute smart_ep_filter.
Instance Method Summary collapse
- #add_stopped? ⇒ Boolean
- #enabled? ⇒ Boolean
- #high_priority? ⇒ Boolean
-
#initialize(array) ⇒ RSSFilter
constructor
A new instance of RSSFilter.
- #matches_original_name? ⇒ Boolean
- #qualities ⇒ Object
- #smart_episode_filter? ⇒ Boolean
Constructor Details
#initialize(array) ⇒ RSSFilter
Returns a new instance of 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
#directory ⇒ Object (readonly)
Returns the value of attribute directory.
6 7 8 |
# File 'lib/rutorrent/rssfilter.rb', line 6 def directory @directory end |
#episode_filter ⇒ Object (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_str ⇒ Object (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 |
#feed ⇒ Object (readonly)
Returns the value of attribute feed.
6 7 8 |
# File 'lib/rutorrent/rssfilter.rb', line 6 def feed @feed end |
#filter ⇒ Object (readonly)
Returns the value of attribute filter.
6 7 8 |
# File 'lib/rutorrent/rssfilter.rb', line 6 def filter @filter end |
#flags ⇒ Object (readonly)
Returns the value of attribute flags.
6 7 8 |
# File 'lib/rutorrent/rssfilter.rb', line 6 def flags @flags end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/rutorrent/rssfilter.rb', line 6 def id @id end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
6 7 8 |
# File 'lib/rutorrent/rssfilter.rb', line 6 def label @label end |
#last_match ⇒ Object (readonly)
Returns the value of attribute last_match.
6 7 8 |
# File 'lib/rutorrent/rssfilter.rb', line 6 def last_match @last_match end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/rutorrent/rssfilter.rb', line 6 def name @name end |
#not_filter ⇒ Object (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_mode ⇒ Object (readonly)
Returns the value of attribute postpone_mode.
6 7 8 |
# File 'lib/rutorrent/rssfilter.rb', line 6 def postpone_mode @postpone_mode end |
#quality ⇒ Object (readonly)
Returns the value of attribute quality.
6 7 8 |
# File 'lib/rutorrent/rssfilter.rb', line 6 def quality @quality end |
#repack_ep_filter ⇒ Object (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_candidate ⇒ Object (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_filter ⇒ Object (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 |
#qualities ⇒ Object
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 |