Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 40 lines (28 sloc) 1.26 KB
#!/usr/bin/env ruby
require 'rubygems'
require './rdio'
require './rdio_consumer_credentials'
# create an instance of the Rdio object with our consumer credentials
# authenticate against the Rdio service
url = rdio.begin_authentication('oob')
puts 'Go to: ' + url
print 'Then enter the code: '
verifier = gets.strip
tracks ='getTracksInCollection')['result']
synced_track_ids = []
all_track_ids = []
puts "First, I've got to get all of the tracks in your collection. One sec..."
tracks.each do |track|
if track['canDownload']
synced_track_ids = synced_track_ids.join(',')
all_track_ids = all_track_ids.join(',')
puts "Great! Now it's time to make the playlists..."'createPlaylist', :name => "Synced tracks only", :description => "Playlist for all of my synced tracks", :tracks => synced_track_ids)'createPlaylist', :name => "All tracks in collection", :description => "Playlist for all of the tracks in my collection", :tracks => all_track_ids )
puts "Woooot! You can now listen to all of your songs at once on Rdio's mobile app!"
Jump to Line
Something went wrong with that request. Please try again.