Sha256: ee203b580b2560d2fcd679d5cb41100876644ee1d5f74b733c68e967c2f997d7
Contents?: true
Size: 649 Bytes
Versions: 4
Compression:
Stored size: 649 Bytes
Contents
require 'rubygems' require 'pathname' require Pathname.new(__FILE__).dirname.parent.join('lib', 'sabnzbd') sab = SABnzbd.new(ENV['SAB_UN'] || "", ENV['SAB_PW'] || "") # If set, provide username and password status = sab.status puts "******************" puts "* SABnzbd Status *" puts "******************" print status.paused? ? "Currently paused" : "Currently running" puts " with #{status.queue_size} items in queue" puts "" puts "Queue Contents:" status.jobs.each_with_index do |job, idx| percent = "%.2f%%" % [(1.0 - job.left / job.total)] puts "#{idx + 1}) #{job.filename} - Total size is #{"%.2f" % [job.total]}MB - #{percent} done" end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
Sutto-SABnzbd-0.1.0 | example/simple.rb |
Sutto-SABnzbd-0.1.1 | example/simple.rb |
Sutto-SABnzbd-0.2.0 | example/simple.rb |
Sutto-SABnzbd-0.3.0 | example/simple.rb |