Skip to content

Commit

Permalink
Uniqify the userids. Print out the tags and genre just in case
Browse files Browse the repository at this point in the history
  • Loading branch information
jkupferman committed Nov 29, 2015
1 parent 648e412 commit 5effbe2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/blacklist_track.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,12 @@
if user_id && user_id > 0
blacklist = YAML.load_file(BLACKLIST_PATH)
blacklist["blacklist"]["userid"] << user_id
blacklist["blacklist"]["userid"].sort!
blacklist["blacklist"]["userid"].sort!.uniq!

File.open(BLACKLIST_PATH, 'w') { |f| f.write(blacklist.to_yaml) }
puts "Genre: #{track['genre']}"
puts "Tags: #{track['tag_list']}"
else
puts "Error: userid was not valid!"
end

0 comments on commit 5effbe2

Please sign in to comment.