Created
July 5, 2015 02:36
-
-
Save Ntropish/bb43a53f33fe980bf28e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return { | |
name:list.name, | |
videos:videos.filter(function(video){ | |
return list.id === video.listId; | |
}).concatMap(function(video){ | |
return Array.zip( | |
bookmarks.filter(function(bookmark){ | |
return video.id === bookmark.videoId; | |
}), | |
boxarts.filter(function(boxart){ | |
return video.id === boxart.videoId; | |
}).reduce(function(keep, bookmark){ | |
return keep.width > bookmark.width ? bookmark : keep; | |
}), | |
function(a, b){ | |
return { | |
id:video.id, | |
title:video.title, | |
time:a.time, | |
boxart:b.url | |
}; | |
} | |
); | |
})}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment