Skip to content

Instantly share code, notes, and snippets.

@Aldaviva
Last active May 3, 2017 09:04
Show Gist options
  • Save Aldaviva/68d86de926f435481a7171308411e9c6 to your computer and use it in GitHub Desktop.
Save Aldaviva/68d86de926f435481a7171308411e9c6 to your computer and use it in GitHub Desktop.
Diff a Google Play Music playlist with a Winamp playlist

Playlist Diff

See what's different between a playlist in Google Play Music and in Winamp.

  1. Go to your playlist in Google Play Music.
  2. Zoom your browser all the way out to avoid paginating the table.
  3. Open the Developer Tools.
  4. Go to the Console tab.
  5. Paste and run the following JavaScript.
    $x('//tr[@class="song-row "]').map(function(t){
        return $x('concat(.//td[@data-col="artist"]//a/text(),'+
            '" - ",'+
            './/td[@data-col="title"]/span/text(),'+
            '" - ",'+
            './/td[@data-col="album"]//a/text())', t);
    })
    .join("\n");
  6. To sort this result, you can paste it in to Sublime Text and use Ctrl+Shift+PSort Lines.
  7. Paste the sorted result into KDiff3.
  8. Go to your Winamp playlist.
  9. Use MiscGenerate HTML playlist.
  10. Open the HTML playlist in a browser.
  11. Copy the list item text to Sublime Text.
  12. Remove the durations, because Google Play Music frequently reports slightly different values which leads to false positives in the diff. Replace /\s*\(\d+:\d+\)/g with the empty string.
  13. Sort these lines too.
  14. Paste the sorted Winamp lines into the other panel of KDiff3.

Now you can see how your Google Play Music playlist differs from your Winamp playlist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment