Added videos

This commit is contained in:
DrMint 2022-04-24 00:22:38 +02:00
parent 901d7a1bc2
commit 72c955b901
15 changed files with 594 additions and 353 deletions

695
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -10,8 +10,8 @@
"strapi": "strapi"
},
"dependencies": {
"@strapi/plugin-graphql": "4.1.5",
"@strapi/strapi": "4.1.5",
"@strapi/plugin-graphql": "4.1.7",
"@strapi/strapi": "4.1.7",
"sqlite3": "5.0.2"
},
"author": {

1
run_strapi_build.sh Executable file
View File

@ -0,0 +1 @@
NODE_ENV=production npm run build

1
run_strapi_prod.sh Executable file
View File

@ -0,0 +1 @@
NODE_ENV=production npm start

View File

@ -107,11 +107,6 @@
"target": "api::ranged-content.ranged-content",
"mappedBy": "library_item"
},
"images": {
"type": "component",
"repeatable": false,
"component": "collections-component.library-images"
},
"digital": {
"type": "boolean",
"default": false,
@ -132,6 +127,17 @@
"type": "relation",
"relation": "oneToMany",
"target": "api::category.category"
},
"urls": {
"displayName": "Url",
"type": "component",
"repeatable": true,
"component": "basics.url"
},
"images": {
"type": "component",
"repeatable": true,
"component": "collections-component.library-images"
}
}
}

View File

@ -0,0 +1,34 @@
{
"kind": "collectionType",
"collectionName": "video_channels",
"info": {
"singularName": "video-channel",
"pluralName": "video-channels",
"displayName": "🟦 Video Channels",
"description": ""
},
"options": {
"draftAndPublish": false
},
"attributes": {
"uid": {
"type": "string",
"required": true,
"unique": true
},
"videos": {
"type": "relation",
"relation": "oneToMany",
"target": "api::video.video",
"mappedBy": "channel"
},
"title": {
"type": "string",
"required": true
},
"subscribers": {
"type": "integer",
"required": true
}
}
}

View File

@ -0,0 +1,9 @@
'use strict';
/**
* video-channel controller
*/
const { createCoreController } = require('@strapi/strapi').factories;
module.exports = createCoreController('api::video-channel.video-channel');

View File

@ -0,0 +1,9 @@
'use strict';
/**
* video-channel router.
*/
const { createCoreRouter } = require('@strapi/strapi').factories;
module.exports = createCoreRouter('api::video-channel.video-channel');

View File

@ -0,0 +1,9 @@
'use strict';
/**
* video-channel service.
*/
const { createCoreService } = require('@strapi/strapi').factories;
module.exports = createCoreService('api::video-channel.video-channel');

View File

@ -0,0 +1,93 @@
{
"kind": "collectionType",
"collectionName": "videos",
"info": {
"singularName": "video",
"pluralName": "videos",
"displayName": "🟦 Videos",
"description": ""
},
"options": {
"draftAndPublish": false
},
"attributes": {
"uid": {
"type": "string",
"required": true,
"unique": true,
"regex": "^[a-zA-Z0-9-_]+$"
},
"title": {
"type": "string",
"required": true
},
"description": {
"type": "text",
"required": true
},
"published_date": {
"type": "component",
"repeatable": false,
"component": "basics.datepicker",
"required": true
},
"channel": {
"type": "relation",
"relation": "manyToOne",
"target": "api::video-channel.video-channel",
"inversedBy": "videos"
},
"categories": {
"type": "relation",
"relation": "oneToMany",
"target": "api::category.category"
},
"views": {
"type": "integer",
"required": true
},
"likes": {
"type": "integer",
"required": true
},
"width": {
"type": "integer",
"required": true
},
"height": {
"type": "integer",
"required": true
},
"duration": {
"type": "integer",
"required": true
},
"audio_languages": {
"type": "relation",
"relation": "oneToMany",
"target": "api::language.language"
},
"sub_languages": {
"type": "relation",
"relation": "oneToMany",
"target": "api::language.language"
},
"source": {
"type": "enumeration",
"enum": [
"YouTube",
"NicoNico"
]
},
"live_chat": {
"type": "boolean",
"default": false,
"required": true
},
"gone": {
"type": "boolean",
"default": false,
"required": true
}
}
}

View File

@ -0,0 +1,9 @@
'use strict';
/**
* video controller
*/
const { createCoreController } = require('@strapi/strapi').factories;
module.exports = createCoreController('api::video.video');

View File

@ -0,0 +1,9 @@
'use strict';
/**
* video router.
*/
const { createCoreRouter } = require('@strapi/strapi').factories;
module.exports = createCoreRouter('api::video.video');

View File

@ -0,0 +1,9 @@
'use strict';
/**
* video service.
*/
const { createCoreService } = require('@strapi/strapi').factories;
module.exports = createCoreService('api::video.video');

View File

@ -0,0 +1,13 @@
{
"collectionName": "components_basics_urls",
"info": {
"displayName": "Url",
"icon": "shopping-cart"
},
"options": {},
"attributes": {
"url": {
"type": "string"
}
}
}

View File

@ -23,6 +23,42 @@
"type": "component",
"repeatable": false,
"component": "collections-component.library-obi-belt"
},
"language": {
"type": "relation",
"relation": "oneToOne",
"target": "api::language.language"
},
"source_language": {
"type": "relation",
"relation": "oneToOne",
"target": "api::language.language"
},
"status": {
"type": "enumeration",
"enum": [
"Incomplete",
"Draft",
"Review",
"Done"
],
"default": "Incomplete",
"required": true
},
"scanners": {
"type": "relation",
"relation": "oneToMany",
"target": "api::recorder.recorder"
},
"cleaners": {
"type": "relation",
"relation": "oneToMany",
"target": "api::recorder.recorder"
},
"typesetters": {
"type": "relation",
"relation": "oneToMany",
"target": "api::recorder.recorder"
}
}
}