lib/saber/tracker/chd.rb in saber-1.1.1 vs lib/saber/tracker/chd.rb in saber-1.2.0
- old
+ new
@@ -1,11 +1,11 @@
module Saber
module Tracker
class CHD < Base
- @@BASE_URL = "https://chdbits.org"
- @@LOGIN_CHECK_PATH = "/messages.php"
- CACHE_FILE = "#{ENV['HOME']}/.cache/saber.chd"
+ BASE_URL = "https://chdbits.org"
+ LOGIN_CHECK_PATH = "/messages.php"
+ CACHE_FILE = "#{ENV['HOME']}/.saber/chd.cache"
# cache {id: is_download}
attr_accessor :cache
def initialize
@@ -20,10 +20,10 @@
at_exit {
Saber.ui.debug "Exit."
File.write(CACHE_FILE, Marshal.dump(cache))
}
- agent.pluggable_parser["application/x-bittorrent"] = Mechanize::DirectorySaver.save_to(Rc.p.watch.p)
+ agent.pluggable_parser["application/x-bittorrent"] = Mechanize::DirectorySaver.save_to(Rc.chd.dir)
end
def add_torrents
update_cache