diff --git a/helpers/app-derived.js b/helpers/app-derived.js index a7c4c9c..8ed7ec0 100644 --- a/helpers/app-derived.js +++ b/helpers/app-derived.js @@ -1,7 +1,18 @@ // App Data that is derived from other app data + +export function isVideo ( app ) { + return app.hasOwnProperty('thumbnail') && app.hasOwnProperty('timestamps') +} + export function getAppType ( app ) { + // Videos don't have a category + // so we check for videos here + if ( isVideo( app ) ) { + return 'video' + } + if(app.category !== Object(app.category)) { console.warn('app has no categories', app)