Module: Miyuki
- Defined in:
- lib/miyuki/miyuki.rb,
lib/miyuki/parser.rb,
lib/miyuki/tracker.rb,
lib/miyuki/version.rb,
lib/miyuki/notifier.rb,
lib/miyuki/notifiers/notifu.rb,
lib/miyuki/notifiers/libnotify.rb,
lib/miyuki/notifiers/terminal-notifier.rb
Overview
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.
Defined Under Namespace
Modules: Parser Classes: Libnotify, Notifier, Notifu, TerminalNotifier, Tracker
Constant Summary collapse
- VERSION =
'0.5.10'
Class Attribute Summary collapse
-
.config ⇒ Object
Returns the value of attribute config.
-
.config_file ⇒ Object
readonly
Returns the value of attribute config_file.
-
.join_scheduler ⇒ Object
Returns the value of attribute join_scheduler.
Class Method Summary collapse
Class Attribute Details
.config ⇒ Object
Returns the value of attribute config.
17 18 19 |
# File 'lib/miyuki/miyuki.rb', line 17 def config @config end |
.config_file ⇒ Object (readonly)
Returns the value of attribute config_file.
17 18 19 |
# File 'lib/miyuki/miyuki.rb', line 17 def config_file @config_file end |
.join_scheduler ⇒ Object
Returns the value of attribute join_scheduler.
18 19 20 |
# File 'lib/miyuki/miyuki.rb', line 18 def join_scheduler @join_scheduler end |
Class Method Details
.track! ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/miyuki/miyuki.rb', line 31 def track! raise Exception, 'You have to provide a proper configuration file to start the tracking.' unless @config watch_dir = File.(@config['watchDir']) FileUtils.mkdir_p(watch_dir) unless Dir.exists?(watch_dir) track_file = File.(@config['trackFile'] || '~') config = DeepClone.clone(@config) @tracker = Tracker.new(watch_dir, track_file, config['series']) do |torrent| notify_torrents(torrent) end @tracker.refresh! && run_scheduler! end |