diff --git a/main.rb b/main.rb index 516441e..9f6288b 100644 --- a/main.rb +++ b/main.rb @@ -5,7 +5,7 @@ require 'shellwords' def parse_songs_from_string(mpd,message) urls = URI.extract(message) - if urls != "" + if urls.length != 0 puts "Found #{urls}; downloading" urls.each do |url| res = `youtube-dl --ignore-errors --output \"spool/%(title)s.%(ext)s\" --extract-audio --audio-format mp3 #{url}`