|
@@ -46,8 +46,17 @@ module RSeed
|
|
|
end
|
|
|
return response
|
|
|
end
|
|
|
-
|
|
|
|
|
|
+ def getTorrentPath(hash)
|
|
|
+ begin
|
|
|
+ response = @client.call("d.base_path", "#{torrentHash.capitalize}")
|
|
|
+ rescue XMLRPC::FaultException => e
|
|
|
+ puts "Error:"
|
|
|
+ puts e.faultCode
|
|
|
+ puts e.faultString
|
|
|
+ end
|
|
|
+ end
|
|
|
+
|
|
|
def getFilesInfo(torrentHash)
|
|
|
begin
|
|
|
response = @client.call("f.multicall", "#{torrentHash.capitalize}", "", "f.get_path=", "f.frozen_path=", "f.get_size_bytes=")
|
|
@@ -58,6 +67,7 @@ module RSeed
|
|
|
end
|
|
|
columns = ["name", "path", "size_bytes"]
|
|
|
formated_response = response.map { |row| Hash[*columns.zip(row).flatten] }
|
|
|
+ formated_response.sort_by! { |hsh| hsh["name"] }
|
|
|
return formated_response
|
|
|
end
|
|
|
|