def Engine::add_feed(opts)
matching_feed = false
$config['feeds'].each { |feed|
matching_feed = true if feed['url'] == opts['url']
}
unless matching_feed
%w{title refresh priority}.each { |i| opts[i] ||= $config["default_feed_#{i}"] }
$config['feeds'].add(opts['title'], opts['url'], opts['refresh'],
opts['lock_title?'], opts['save_items?'],
(opts['site'] || ''), (opts['desc'] || ''),
(opts['items'] || []), opts['image'],
opts['category'], opts['force'],
opts['priority'], opts['max_items'])
$config['feeds'].get(-1)['max_items'] = opts['max_items'] if opts['max_items']
else
$new_status = $config['msg_added_existing']
end
!matching_feed
end