Initial Xbox Music support

This commit is contained in:
Jonathan Cremin 2014-12-21 01:19:37 +00:00
parent 2193add65f
commit cc9b1ddcbb
2 changed files with 111 additions and 0 deletions

14
lib/services/xbox/url.js Normal file
View file

@ -0,0 +1,14 @@
"use strict";
var parse = require('url').parse;
module.exports.match = function(url, type) {
var parsed = parse(url);
if (!parsed.host.match(/music.xbox.com$/)) {
return false;
}
var parts = parsed.path.split("/");
return (parts[1] == "album" || parts[1] == "track") && parts[4];
};