Class: SabnzbdPlusModel::QueueSlot
- Inherits:
-
Slot
show all
- Defined in:
- lib/sabnzbd_plus/model/queue_slot.rb
Overview
A single queue slot item returned by SAB
Instance Attribute Summary (collapse)
Attributes inherited from Slot
#nzo_id, #script, #size, #status
Class Method Summary
(collapse)
Instance Method Summary
(collapse)
Methods inherited from Slot
factory, from_hash, #initialize
Methods inherited from Response
#eql?, from_hash
Instance Attribute Details
- (String) avg_age
19
20
21
|
# File 'lib/sabnzbd_plus/model/queue_slot.rb', line 19
def avg_age
@avg_age
end
|
- (String) cat
37
38
39
|
# File 'lib/sabnzbd_plus/model/queue_slot.rb', line 37
def cat
@cat
end
|
- (String) eta
13
14
15
|
# File 'lib/sabnzbd_plus/model/queue_slot.rb', line 13
def eta
@eta
end
|
- (String) filename
31
32
33
|
# File 'lib/sabnzbd_plus/model/queue_slot.rb', line 31
def filename
@filename
end
|
- (String) index
10
11
12
|
# File 'lib/sabnzbd_plus/model/queue_slot.rb', line 10
def index
@index
end
|
- (String) mb
28
29
30
|
# File 'lib/sabnzbd_plus/model/queue_slot.rb', line 28
def mb
@mb
end
|
- (String) mb_left
40
41
42
|
# File 'lib/sabnzbd_plus/model/queue_slot.rb', line 40
def mb_left
@mb_left
end
|
- (String) msg_id
22
23
24
|
# File 'lib/sabnzbd_plus/model/queue_slot.rb', line 22
def msg_id
@msg_id
end
|
- (String) percentage
43
44
45
|
# File 'lib/sabnzbd_plus/model/queue_slot.rb', line 43
def percentage
@percentage
end
|
- (String) priority
34
35
36
|
# File 'lib/sabnzbd_plus/model/queue_slot.rb', line 34
def priority
@priority
end
|
- (String) size_left
49
50
51
|
# File 'lib/sabnzbd_plus/model/queue_slot.rb', line 49
def size_left
@size_left
end
|
- (String) time_left
16
17
18
|
# File 'lib/sabnzbd_plus/model/queue_slot.rb', line 16
def time_left
@time_left
end
|
- (String) unpack_opts
46
47
48
|
# File 'lib/sabnzbd_plus/model/queue_slot.rb', line 46
def unpack_opts
@unpack_opts
end
|
- (String) verbosity
25
26
27
|
# File 'lib/sabnzbd_plus/model/queue_slot.rb', line 25
def verbosity
@verbosity
end
|
Class Method Details
+ (Hash<String, Label>) parameter_mapping
Get the parameter mapping that maps the SABnzbd+ API parameter names to
their Rubyish equivalent
55
56
57
58
59
60
61
62
63
|
# File 'lib/sabnzbd_plus/model/queue_slot.rb', line 55
def self.parameter_mapping
return super.merge({
"msgid" => :msg_id,
"mbleft" => :mb_left,
"unpackopts" => :unpack_opts,
"sizeleft" => :size_left,
"timeleft" => :time_left
})
end
|
Instance Method Details
- (Boolean) ==(item)
Compare this object with another queue object comparing only the values in
it's attributes.
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
# File 'lib/sabnzbd_plus/model/queue_slot.rb', line 87
def ==(item)
unless(
item.index == self.index &&
item.eta == self.eta &&
item.time_left == self.time_left &&
item.avg_age == self.avg_age &&
item.msg_id == self.msg_id &&
item.verbosity == self.verbosity &&
item.mb == self.mb &&
item.filename == self.filename &&
item.priority == self.priority &&
item.cat == self.cat &&
item.mb_left == self.mb_left &&
item.percentage == self.percentage &&
item.unpack_opts == self.unpack_opts)
return false
end
return super item
end
|
- (String) name
Maps filename onto Name, so history and queue have a common name.
69
70
71
|
# File 'lib/sabnzbd_plus/model/queue_slot.rb', line 69
def name
return self.filename
end
|
- (Object) name=(name)
Maps filename onto Name, so history and queue have a common name.
77
78
79
|
# File 'lib/sabnzbd_plus/model/queue_slot.rb', line 77
def name=(name)
self.filename = name
end
|