Create a gist now

Instantly share code, notes, and snippets.

Embed
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 comment has been minimized.

Show comment
Hide comment
@juliansantaana

juliansantaana Nov 2, 2013

this works great, thanks!

this works great, thanks!

@eon123

This comment has been minimized.

Show comment
Hide comment
@eon123

eon123 Apr 3, 2014

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

eon123 commented Apr 3, 2014

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

@motorcitizen

This comment has been minimized.

Show comment
Hide comment
@motorcitizen

motorcitizen Apr 7, 2014

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

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

@silentparty

This comment has been minimized.

Show comment
Hide comment
@silentparty

silentparty Apr 13, 2014

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

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

This comment has been minimized.

Show comment
Hide comment

fruqi commented May 29, 2014

Neat!

@nickbouton

This comment has been minimized.

Show comment
Hide comment
@nickbouton

nickbouton Aug 7, 2014

Awesome, thanks for this!

Awesome, thanks for this!

@miguelsolorio-zz

This comment has been minimized.

Show comment
Hide comment
@miguelsolorio-zz

miguelsolorio-zz Nov 16, 2015

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.

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

This comment has been minimized.

Show comment
Hide comment
@jodyheavener

jodyheavener Nov 20, 2015

@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 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-zz

This comment has been minimized.

Show comment
Hide comment
@miguelsolorio-zz

miguelsolorio-zz Nov 29, 2015

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

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