lib/ayadn/nowplaying.rb in ayadn-2.0.12 vs lib/ayadn/nowplaying.rb in ayadn-2.1
- old
+ new
@@ -86,18 +86,18 @@
exit
end
@status.fetching_from('iTunes')
itunes = get_itunes_track_infos()
itunes.each do |el|
- if el.length == 0
+ if el.nil? || el.length == 0
@status.empty_fields
exit
end
end
post_itunes(options, itunes)
rescue => e
@status.wtf
- Errors.global_error({error: e, caller: caller, data: [itunes, store, options]})
+ Errors.global_error({error: e, caller: caller, data: [itunes, options]})
end
end
private