Skip to content
Create a gist now

Instantly share code, notes, and snippets.

Export Rdio playlist to Ivy (ivyishere.org) Spotify Playlist maker thing
javascript:(function() {
var bookmarklet = {
init: function() {
this.parse();
},
parse: function() {
page = "";
$(".PlaylistPage:visible")
.children(".TrackList")
.find(".Track")
.children(".info")
.each(function() {
line = [];
function buildLine() {
line.push($(this).text());
}
$(this).children(".metadata").children("a:first").each(buildLine);
$(this).children(".name").children("a").each(buildLine);
page += line.join(" - ") + "\r\n";
});
window.open("data:text/plain;charset=utf-8," + encodeURIComponent(page), "");
}
};
if (!window.jQuery) {
load();
} else {
bookmarklet.init();
}
function load() {
var script = document.createElement("script");
script.src = "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";
script.async = true;
script.type = "text/javascript";
script.onload = function() { bookmarklet.init(); };
document.body.appendChild(script);
}
})();
@juliansantaana

this works great, thanks!

@eon123

Hi, is this now out of date, I'm just getting a blank page when executed? cheers

@motorcitizen

Help! I'm locked into Rdio. You're my only hope. Is there an update planned for this?

@silentparty

I basically merged what works of tebeseda's script, and and nloko's script. I'm not much of a developer, but the result works with Rdio + Ivy.

    javascript:(function() {
  var bookmarklet = {
    init: function() {
      this.parse();
    },
    parse: function() {
      page = "";
      $(".Track:visible")
        .children(".info")
        .each(function() {
          line = [];
          function buildLine() {
            line.push($(this).text());
          }

          $(this).children(".metadata").children("a:first").each(buildLine);
          $(this).children(".name").children("a").each(buildLine);
          page += line.join(" - ") + "\r\n";
      });
      window.open("data:text/plain;charset=utf-8," + encodeURIComponent(page), "");
    }
  };

  if (!window.jQuery) {
    load();
  } else {
    bookmarklet.init();
  }

  function load() {
    var script = document.createElement("script");
    script.src = "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";
    script.async = true;
    script.type = "text/javascript";
    script.onload = function() { bookmarklet.init(); };
    document.body.appendChild(script);
  }
})();
@fruqi

Neat!

@nickbouton

Awesome, thanks for this!

@miguelsolorio

One thing to note is that the playlist has to be fully loaded (Rdio has infinite scroll and does partial loading by default) otherwise this script will only catch what has been loaded to the DOM.

@jodyheavener

@miguelsolorio it looks like as you scroll only the items visible are loaded in the DOM, removing and adding as you scroll. Any way to prevent this?

@miguelsolorio

Looks like there isn't an easy way to get the age to display all tracks at once, better to use this Chrome extension to export a CSV: https://chrome.google.com/webstore/detail/rdio-enhancer/hmaalfaappddkggilhahaebfhdmmmngf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.