Skip to content

Instantly share code, notes, and snippets.

@adrianleb
Last active August 29, 2015 13:59
Show Gist options
  • Save adrianleb/10464694 to your computer and use it in GitHub Desktop.
Save adrianleb/10464694 to your computer and use it in GitHub Desktop.
little function to find bad streams on an issue
Shuffler.router.currentView.issue.attributes.articles.forEach(function(a, i) {
a.parts.forEach(function (p, i) {
if(p.type) {
p.parts.forEach(function(cp, i) {
if (cp.type in ['stream_url', 'video_url']) {
if (cp.value === null || cp.value === undefined || !cp.value.length) {
console.log("Found a bad stream on article: ","http://wall.shuffler.fm/issues/10" + "/articles/" + a.id, p.type);
};
};
})
}
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment