2.1 Moved ratings to stars

This commit is contained in:
Trevor Squillario 2012-09-30 20:02:04 -04:00
parent 94bfd67946
commit 549fe25b7f
7 changed files with 173 additions and 39 deletions

View file

@ -167,6 +167,23 @@ function rateSong(songid, rating) {
}
});
}
function starItem(itemid, starred) {
var url;
if (starred) {
url = baseURL + '/star.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=jsonp&id=' + itemid;
} else {
url = baseURL + '/unstar.view?u=' + username + '&p=' + password + '&v=' + version + '&c=' + applicationName + '&f=jsonp&id=' + itemid;
}
$.ajax({
url: url,
method: 'GET',
dataType: 'jsonp',
timeout: 10000,
success: function () {
updateMessage('Favorite Updated!');
}
});
}
function playPauseSong() {
var el = '#PlayTrack';
if ($(el).hasClass('playing')) {