public
Last active — forked from nloko/rdio_pl_export.js

Export Rdio playlist to Ivy (ivyishere.org) Spotify Playlist maker thing

  • Download Gist
rdio_pl_export.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
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);
}
})();

this works great, thanks!

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

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

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);
  }
})();

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.