lib/ayadn/status.rb in ayadn-2.0.9 vs lib/ayadn/status.rb in ayadn-2.0.10
- old
+ new
@@ -525,9 +525,23 @@
def itunes_store_track(store)
puts "\n"
@thor.say_status "next", "Ayadn will use these elements to insert album artwork and a link", :cyan
end
+ def server_error(bool)
+ if bool == true
+ say do
+ @thor.say_status :error, "Ayadn couldn't get the JSON reponse", :red
+ @thor.say_status :next, "trying again in 10 seconds", :yellow
+ end
+ else
+ say do
+ @thor.say_status :error, "Ayadn couldn't get the JSON reponse", :red
+ @thor.say_status :status, "Current command canceled after one retry", :yellow
+ end
+ end
+ end
+
##---
def info(status, message, color = nil)
if color.nil?
lamb = lambda { @thor.say_status(status.to_sym, message.to_s) }