mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Add isVideo function
This commit is contained in:
parent
361505e6cd
commit
ef4f3d570e
1 changed files with 11 additions and 0 deletions
|
|
@ -1,7 +1,18 @@
|
||||||
// App Data that is derived from other app data
|
// App Data that is derived from other app data
|
||||||
|
|
||||||
|
|
||||||
|
export function isVideo ( app ) {
|
||||||
|
return app.hasOwnProperty('thumbnail') && app.hasOwnProperty('timestamps')
|
||||||
|
}
|
||||||
|
|
||||||
export function getAppType ( app ) {
|
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)) {
|
if(app.category !== Object(app.category)) {
|
||||||
console.warn('app has no categories', app)
|
console.warn('app has no categories', app)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue