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

- (RSSFilter) initialize(array)



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

- (Object) directory (readonly)

Returns the value of attribute directory



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

def directory
  @directory
end

- (Object) episode_filter (readonly)

Returns the value of attribute episode_filter



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

def episode_filter
  @episode_filter
end

- (Object) episode_filter_str (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

- (Object) feed (readonly)

Returns the value of attribute feed



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

def feed
  @feed
end

- (Object) filter (readonly)

Returns the value of attribute filter



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

def filter
  @filter
end

- (Object) flags (readonly)

Returns the value of attribute flags



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

def flags
  @flags
end

- (Object) id (readonly)

Returns the value of attribute id



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

def id
  @id
end

- (Object) label (readonly)

Returns the value of attribute label



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

def label
  @label
end

- (Object) last_match (readonly)

Returns the value of attribute last_match



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

def last_match
  @last_match
end

- (Object) name (readonly)

Returns the value of attribute name



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

def name
  @name
end

- (Object) not_filter (readonly)

Returns the value of attribute not_filter



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

def not_filter
  @not_filter
end

- (Object) postpone_mode (readonly)

Returns the value of attribute postpone_mode



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

def postpone_mode
  @postpone_mode
end

- (Object) quality (readonly)

Returns the value of attribute quality



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

def quality
  @quality
end

- (Object) repack_ep_filter (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

- (Object) resolving_candidate (readonly)

Returns the value of attribute resolving_candidate



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

def resolving_candidate
  @resolving_candidate
end

- (Object) smart_ep_filter (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

- (Boolean) add_stopped?



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

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

- (Boolean) enabled?



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

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

- (Boolean) high_priority?



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

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

- (Boolean) matches_original_name?



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

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

- (Object) qualities



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

- (Boolean) smart_episode_filter?



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

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