Skip to content
Snippets Groups Projects
Commit 43bff6ef authored by Robert J. Newmark's avatar Robert J. Newmark
Browse files

last_uploaded and random return a list of hasheswq

parent 2350c9b3
No related branches found
No related tags found
No related merge requests found
...@@ -104,10 +104,7 @@ djr.Player.prototype.lastPlaylist = function(num) { ...@@ -104,10 +104,7 @@ djr.Player.prototype.lastPlaylist = function(num) {
var player = this; var player = this;
var title = "Last " + num + " Songs Uploaded"; var title = "Last " + num + " Songs Uploaded";
this.backend.lastPlaylist(num, function(results) { this.backend.lastPlaylist(num, function(results) {
var songs = []; var songs = results;
$.each(results, function(idx, item) {
songs.push(item.sha1);
});
if (songs.length == 0) { if (songs.length == 0) {
djr.debug('No results found.'); djr.debug('No results found.');
return; return;
...@@ -123,10 +120,7 @@ djr.Player.prototype.randomPlaylist = function(num) { ...@@ -123,10 +120,7 @@ djr.Player.prototype.randomPlaylist = function(num) {
var player = this; var player = this;
var title = " " + num + " Random Songs "; var title = " " + num + " Random Songs ";
this.backend.randomPlaylist(num, this.playlist.allSongs(), function(results) { this.backend.randomPlaylist(num, this.playlist.allSongs(), function(results) {
var songs = []; var songs = results;
$.each(results, function(idx, item) {
songs.push(item.sha1);
});
if (songs.length == 0) { if (songs.length == 0) {
djr.debug('No results found.'); djr.debug('No results found.');
return; return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment