[DEV] multiple file upload
This commit is contained in:
parent
9538581a97
commit
e98fe27a94
@ -1,5 +1,5 @@
|
|||||||
# base image
|
# base image
|
||||||
FROM node:latest as build
|
FROM node:lts as build
|
||||||
|
|
||||||
# add `/application/node_modules/.bin` to $PATH
|
# add `/application/node_modules/.bin` to $PATH
|
||||||
ENV PATH /application/node_modules/.bin:$PATH
|
ENV PATH /application/node_modules/.bin:$PATH
|
||||||
|
@ -6,38 +6,10 @@
|
|||||||
"all": "npm run build && npm run test",
|
"all": "npm run build && npm run test",
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve --watch",
|
"start": "ng serve --watch",
|
||||||
"_____test": "npm run test-unit && npm run test-readme && npm run test-component",
|
|
||||||
"build": "ng build --prod",
|
"build": "ng build --prod",
|
||||||
"test": "ng test",
|
"test": "ng test",
|
||||||
"lint": "ng lint",
|
"lint": "ng lint",
|
||||||
"e2e": "ng e2e",
|
"e2e": "ng e2e"
|
||||||
|
|
||||||
"__all": "npm run build && npm run test && npm run generate-specs && npm run docs",
|
|
||||||
"__build": "npm run lint-src && npm run clean-dist && npm run plint && npm run check-copyright && webpack-cli --type production && npx downlevel-dts dist/typings dist/typings3.6",
|
|
||||||
"__build-dev": "npm run clean-dist && webpack-cli --type development",
|
|
||||||
"__clean-dist": "rimraf dist/*",
|
|
||||||
"__clean-lint": "rimraf target/lint/*",
|
|
||||||
"__clean-test-component": "rimraf target/test/component/*",
|
|
||||||
"__clean-test-unit": "rimraf target/test/unit/*",
|
|
||||||
"__deps-checker": "node ./scripts/ifabric-last",
|
|
||||||
"__generate-specs": "specgen . -i .gitignore -t node_modules/@ifabric-dev/specgen/templates/specs.md.mustache -x target/test/unit/junit-report.xml -f docs/fma/renderer-fma.json -o REQUIREMENTS.md",
|
|
||||||
"__lint": "npm run clean-lint && npm run lint-src && npm run lint-unit && npm run lint-component",
|
|
||||||
"__lint-component": "tslint -c ./test/tslint.json -p ./tsconfig.json \"./test/**/*.ts\"",
|
|
||||||
"__lint-src": "tslint -p ./tsconfig.json \"./src/**/*.ts\"",
|
|
||||||
"__lint-unit": "tslint -c ./test/tslint.json -p ./tsconfig.json \"./src/**/*.spec.ts\"",
|
|
||||||
"__plint": "plint package.json",
|
|
||||||
"__start": "webpack-dev-server --type development",
|
|
||||||
"__start-ts": "rollup -w -c dev/ts/rollup.config.js",
|
|
||||||
"__test": "npm run test-unit && npm run test-readme && npm run test-component",
|
|
||||||
"__test-component": "npm run lint-component && npm run clean-test-component && karma start ./test/karma-crs.conf.js --grep \"!@performance|readme\"",
|
|
||||||
"__test-perf": "npm run lint-component && npm run clean-test-component && karma start ./test/karma-crs-performance.conf.js --grep @performance",
|
|
||||||
"__test-readme": "npm run lint-component && npm run clean-test-component && karma start ./test/karma-crs.conf.js --grep @readme",
|
|
||||||
"__test-unit": "npm run lint-unit && npm run clean-test-unit && karma start ./test/karma-unit.conf.js",
|
|
||||||
"__test-watch": "karma start ./test/karma-unit.conf.js --no-single-run --auto-watch",
|
|
||||||
"__test-watch-comp": "npm run clean-test-component && karma start ./test/karma-crs.conf.js --no-single-run --auto-watch",
|
|
||||||
"__docs": "rimraf docs/md && typedoc --options ./typedoc.json && api-extractor run --local",
|
|
||||||
"__check-copyright": "check-copyright -f src/**/*.ts"
|
|
||||||
|
|
||||||
},
|
},
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -25,6 +25,7 @@ export class TypeScene implements OnInit {
|
|||||||
name: string = "";
|
name: string = "";
|
||||||
description: string = "";
|
description: string = "";
|
||||||
cover:string = null;
|
cover:string = null;
|
||||||
|
covers:string[] = [];
|
||||||
seriess_error = "";
|
seriess_error = "";
|
||||||
seriess = [];
|
seriess = [];
|
||||||
videos_error = "";
|
videos_error = "";
|
||||||
@ -53,9 +54,21 @@ export class TypeScene implements OnInit {
|
|||||||
.then(function(response) {
|
.then(function(response) {
|
||||||
self.name = response.name;
|
self.name = response.name;
|
||||||
self.description = response.description;
|
self.description = response.description;
|
||||||
|
|
||||||
|
if (response.covers === undefined || response.covers === null || response.covers.length === 0) {
|
||||||
|
self.cover = null;
|
||||||
|
self.covers = []
|
||||||
|
} else {
|
||||||
|
self.cover = self.typeService.getCoverUrl(response.covers[0]);
|
||||||
|
for (let iii=0; iii<response.covers.length; iii++) {
|
||||||
|
self.covers.push(self.typeService.getCoverUrl(response.covers[iii]));
|
||||||
|
}
|
||||||
|
}
|
||||||
}).catch(function(response) {
|
}).catch(function(response) {
|
||||||
self.name = "???";
|
self.name = "???";
|
||||||
self.description = "";
|
self.description = "";
|
||||||
|
self.covers = [];
|
||||||
|
self.cover = null;
|
||||||
});
|
});
|
||||||
this.typeService.getSubSeries(this.type_id, ["id", "name"])
|
this.typeService.getSubSeries(this.type_id, ["id", "name"])
|
||||||
.then(function(response) {
|
.then(function(response) {
|
||||||
|
@ -3,130 +3,144 @@
|
|||||||
Upload Media
|
Upload Media
|
||||||
</div>
|
</div>
|
||||||
<div class="clear"><br/></div>
|
<div class="clear"><br/></div>
|
||||||
<div class="fill-all">
|
<div class="request_raw_table">
|
||||||
<div class="request_raw">
|
<table>
|
||||||
<div class="label">
|
<colgroup>
|
||||||
format:
|
<col style="width:10%">
|
||||||
</div>
|
<col style="width:80%">
|
||||||
<div class="input">
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="left-colomn">format:</td>
|
||||||
|
<td class="right-colomn">
|
||||||
The format of the media permit to automatic find meta-data:<br/>
|
The format of the media permit to automatic find meta-data:<br/>
|
||||||
Media series name-media universe name-sXX-eXX-my name of my media.mkv<br/>
|
Univers:Series name-sXX-eXX-my name of my media.mkv<br/>
|
||||||
<b> example:</b> Captain America-Marvel-e02-The winter soldier.mkv
|
<b>example:</b> Stargate:SG1-s55-e22-Asgard.mkv <br/>
|
||||||
</div>
|
</td>
|
||||||
</div>
|
</tr>
|
||||||
<div class="request_raw2">
|
<tr>
|
||||||
<div class="label">
|
<td class="left-colomn">Media:</td>
|
||||||
Media:
|
<td class="right-colomn">
|
||||||
</div>
|
|
||||||
<div class="input">
|
|
||||||
<input type="file"
|
<input type="file"
|
||||||
(change)="onChangeFile($event.target)"
|
(change)="onChangeFile($event.target)"
|
||||||
placeholder="Select a media file"
|
placeholder="Select a media file"
|
||||||
accept=".mkv,.webm"
|
accept=".mkv,.webm"
|
||||||
width="90%" />
|
width="90%"
|
||||||
|
multiple/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="request_raw2" *ngIf="mediaFile != null">
|
<div *ngIf="this.parsedElement.length != 0" class="title">
|
||||||
{{mediaFile.name}}
|
|
||||||
</div>
|
|
||||||
<div class="clear"></div>
|
|
||||||
</div>
|
|
||||||
<div *ngIf="mediaFile != null" class="title">
|
|
||||||
Meta-data:
|
Meta-data:
|
||||||
</div>
|
</div>
|
||||||
<div class="clear"><br/></div>
|
<div class="clear"><br/></div>
|
||||||
<div *ngIf="mediaFile != null" class="fill-all">
|
<div *ngIf="this.parsedElement.length != 0" class="fill-all">
|
||||||
<div class="request_raw">
|
<div class="request_raw_table">
|
||||||
<div class="label">
|
<table>
|
||||||
Type:
|
<colgroup>
|
||||||
</div>
|
<col style="width:10%">
|
||||||
<div class="input" element.value>
|
<col style="width:70%">
|
||||||
|
<col style="width:10%">
|
||||||
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td class="left-colomn">Type:</td>
|
||||||
|
<td class="right-colomn">
|
||||||
<select [ngModel]="type_id"
|
<select [ngModel]="type_id"
|
||||||
(ngModelChange)="onChangeType($event)"
|
(ngModelChange)="onChangeType($event)"
|
||||||
[class.error]="type_id == null">
|
[class.error]="type_id == null">
|
||||||
<option *ngFor="let element of listType" [ngValue]="element.value">{{element.label}}</option>
|
<option *ngFor="let element of listType" [ngValue]="element.value">{{element.label}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</td>
|
||||||
</div>
|
</tr>
|
||||||
<div class="request_raw">
|
<tr>
|
||||||
<div class="label">
|
<td class="left-colomn">Universe:</td>
|
||||||
Universe:
|
<td class="right-colomn">
|
||||||
</div>
|
|
||||||
<div class="input">
|
|
||||||
<input type="text"
|
<input type="text"
|
||||||
placeholder="Universe of the Media"
|
placeholder="Universe of the Media"
|
||||||
[value]="parse_universe"
|
[value]="global_universe"
|
||||||
(input)="onUniverse($event.target.value)"
|
(input)="onUniverse($event.target.value)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</td>
|
||||||
</div>
|
</tr>
|
||||||
|
<tr>
|
||||||
<div class="request_raw">
|
<td class="left-colomn">Series:</td>
|
||||||
<div class="label">
|
<td class="right-colomn">
|
||||||
Series:
|
|
||||||
</div>
|
|
||||||
<div class="input">
|
|
||||||
<input type="text"
|
<input type="text"
|
||||||
placeholder="Series of the Media"
|
placeholder="Series of the Media"
|
||||||
[value]="parse_series"
|
[value]="global_series"
|
||||||
(input)="onSeries($event.target.value)"
|
(input)="onSeries($event.target.value)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</td>
|
||||||
</div>
|
</tr>
|
||||||
<div class="request_raw">
|
<tr>
|
||||||
<div class="label label2">
|
<td class="left-colomn"></td>
|
||||||
==>
|
<td class="right-colomn">
|
||||||
</div>
|
|
||||||
<div class="input input2">
|
|
||||||
<select [ngModel]="series_id"
|
<select [ngModel]="series_id"
|
||||||
(ngModelChange)="onChangeSeries($event)">
|
(ngModelChange)="onChangeSeries($event)">
|
||||||
<option *ngFor="let element of listSeries" [ngValue]="element.value">{{element.label}}</option>
|
<option *ngFor="let element of listSeries" [ngValue]="element.value">{{element.label}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</td>
|
||||||
<!-- <div class="input_add">
|
<td class="tool-colomn">
|
||||||
|
<!--
|
||||||
<button class="button color-button-normal color-shadow-black" (click)="newSeries()" type="submit">
|
<button class="button color-button-normal color-shadow-black" (click)="newSeries()" type="submit">
|
||||||
<i class="material-icons">add_circle_outline</i>
|
<i class="material-icons">add_circle_outline</i>
|
||||||
</button>
|
</button>
|
||||||
</div>-->
|
-->
|
||||||
</div>
|
</td>
|
||||||
<div class="request_raw">
|
</tr>
|
||||||
<div class="label">
|
<tr>
|
||||||
Season:
|
<td class="left-colomn">Season:</td>
|
||||||
</div>
|
<td class="right-colomn">
|
||||||
<div class="input">
|
|
||||||
<input type="number"
|
<input type="number"
|
||||||
pattern="[0-9]{0-4}"
|
pattern="[0-9]{0-4}"
|
||||||
placeholder="season of the Media"
|
placeholder="season of the Media"
|
||||||
[value]="parse_season"
|
[value]="global_season"
|
||||||
(input)="onSeason($event.target.value)"
|
(input)="onSeason($event.target.value)"
|
||||||
/>
|
/>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="clear"></div>
|
||||||
<div class="request_raw">
|
<div class="request_raw_table">
|
||||||
<div class="label">
|
<table>
|
||||||
Episode:
|
<colgroup>
|
||||||
</div>
|
<col style="width:10%">
|
||||||
<div class="input">
|
<col style="width:70%">
|
||||||
|
<col style="width:10%">
|
||||||
|
</colgroup>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Episode ID:</th>
|
||||||
|
<th>Episode Title:</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr *ngFor="let data of this.parsedElement">
|
||||||
|
<td class="left-colomn">
|
||||||
<input type="number"
|
<input type="number"
|
||||||
pattern="[0-9]{0-4}"
|
pattern="[0-9]{0-4}"
|
||||||
placeholder="Episode of the Media"
|
placeholder="e?"
|
||||||
[value]="parse_episode"
|
[value]="data.episode"
|
||||||
(input)="onEpisode($event.target.value)"
|
(input)="onEpisode(data, $event.target.value)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</td>
|
||||||
</div>
|
<td class="right-colomn" >
|
||||||
<div class="request_raw">
|
|
||||||
<div class="label">
|
|
||||||
Title:
|
|
||||||
</div>
|
|
||||||
<div class="input">
|
|
||||||
<input type="text"
|
<input type="text"
|
||||||
placeholder="Name of the Media"
|
placeholder="Name of the Media"
|
||||||
[value]="parse_title"
|
[value]="data.title"
|
||||||
(input)="onTitle($event.target.value)"
|
(input)="onTitle(data, $event.target.value)"
|
||||||
[class.error]="parse_title == ''"
|
[class.error]="data.title == ''"
|
||||||
/>
|
/>
|
||||||
</div>
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
<div class="send_value">
|
<div class="send_value">
|
||||||
@ -137,9 +151,34 @@
|
|||||||
<i class="material-icons">cloud_upload</i> Upload
|
<i class="material-icons">cloud_upload</i> Upload
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
|
<div *ngIf="this.parsedElement.length != 0" class="fill-all">
|
||||||
|
<div class="request_raw_table">
|
||||||
|
<table>
|
||||||
|
<colgroup>
|
||||||
|
<col style="width:10%">
|
||||||
|
<col style="width:80%">
|
||||||
|
</colgroup>
|
||||||
|
<tbody>
|
||||||
|
<!-- no need
|
||||||
|
<tr *ngFor="let data of this.parsedElement">
|
||||||
|
<td class="left-colomn">Keep:</td>
|
||||||
|
<td class="right-colomn">
|
||||||
|
{{data.file.name}}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
-->
|
||||||
|
<tr *ngFor="let data of this.parsedFaledElement">
|
||||||
|
<td class="left-colomn">Rejected:</td>
|
||||||
|
<td class="right-colomn">
|
||||||
|
{{data.file.name}}<br/> ==> {{data.reason}}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<upload-progress [mediaTitle]="upload.labelMediaTitle"
|
<upload-progress [mediaTitle]="upload.labelMediaTitle"
|
||||||
[mediaUploaded]="upload.mediaSendSize"
|
[mediaUploaded]="upload.mediaSendSize"
|
||||||
|
@ -38,6 +38,47 @@ d.fill-all{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.request_raw_table {
|
||||||
|
display: block;
|
||||||
|
width: 90%;
|
||||||
|
margin: 0 auto;
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
th {
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.left-colomn {
|
||||||
|
text-align: right;
|
||||||
|
font-weight: bold;
|
||||||
|
input {
|
||||||
|
width: 95%;
|
||||||
|
font-size: 20px;
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.right-colomn {
|
||||||
|
input {
|
||||||
|
width: 95%;
|
||||||
|
font-size: 20px;
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
select {
|
||||||
|
width: 95%;
|
||||||
|
font-size: 20px;
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.tool-colomn {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.error {
|
||||||
|
border-color: rgba(200,0,0,1.0);
|
||||||
|
background-color: rgba(256,220,220,1.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.request_raw {
|
.request_raw {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
@ -49,6 +90,26 @@ d.fill-all{
|
|||||||
float: left;
|
float: left;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
.input2 {
|
||||||
|
width: 75%;
|
||||||
|
float: left;
|
||||||
|
display: block;
|
||||||
|
.number-input {
|
||||||
|
clear: none;
|
||||||
|
width: 75px;
|
||||||
|
font-size: 20px;
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
.title-input {
|
||||||
|
width: calc(100% - 75px);
|
||||||
|
font-size: 20px;
|
||||||
|
border: 0px;
|
||||||
|
}
|
||||||
|
.error {
|
||||||
|
border-color: rgba(200,0,0,1.0);
|
||||||
|
background-color: rgba(256,220,220,1.0);
|
||||||
|
}
|
||||||
|
}
|
||||||
.input {
|
.input {
|
||||||
width: 75%;
|
width: 75%;
|
||||||
float: left;
|
float: left;
|
||||||
|
@ -22,14 +22,31 @@ import { ArianeService } from '../../service/ariane';
|
|||||||
import { UploadProgress } from '../../popin/upload-progress/upload-progress';
|
import { UploadProgress } from '../../popin/upload-progress/upload-progress';
|
||||||
|
|
||||||
export class ElementList {
|
export class ElementList {
|
||||||
value: number;
|
constructor(
|
||||||
label: string;
|
public value: number,
|
||||||
constructor(_value: number, _label: string) {
|
public label: string) {
|
||||||
this.value = _value;
|
// nothing to do.
|
||||||
this.label = _label;
|
}
|
||||||
|
}
|
||||||
|
export class FileParsedElement {
|
||||||
|
public isSended: false;
|
||||||
|
constructor(
|
||||||
|
public file: File,
|
||||||
|
public universe: string,
|
||||||
|
public series: string,
|
||||||
|
public season: number,
|
||||||
|
public episode: number,
|
||||||
|
public title: string) {
|
||||||
|
// nothiing to do.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export class FileFailParsedElement {
|
||||||
|
constructor(
|
||||||
|
public file: File,
|
||||||
|
public reason: string) {
|
||||||
|
// nothiing to do.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-video-edit',
|
selector: 'app-video-edit',
|
||||||
@ -44,7 +61,9 @@ export class UploadScene implements OnInit {
|
|||||||
|
|
||||||
error: string = "";
|
error: string = "";
|
||||||
|
|
||||||
mediaFile: File = null;
|
mediaFile: File[] = null;
|
||||||
|
parsedElement: FileParsedElement[] = [];
|
||||||
|
parsedFaledElement: FileFailParsedElement[] = [];
|
||||||
upload_file_value: string = ""
|
upload_file_value: string = ""
|
||||||
selectedFiles: FileList;
|
selectedFiles: FileList;
|
||||||
type_id: number = null
|
type_id: number = null
|
||||||
@ -56,8 +75,6 @@ export class UploadScene implements OnInit {
|
|||||||
// section tha define the upload value to display in the pop-in of upload
|
// section tha define the upload value to display in the pop-in of upload
|
||||||
public upload:UploadProgress = new UploadProgress();
|
public upload:UploadProgress = new UploadProgress();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
listType: ElementList[] = [
|
listType: ElementList[] = [
|
||||||
{ value: null, label: '---' },
|
{ value: null, label: '---' },
|
||||||
];
|
];
|
||||||
@ -90,11 +107,9 @@ export class UploadScene implements OnInit {
|
|||||||
listSeason: ElementList[] = [
|
listSeason: ElementList[] = [
|
||||||
{ value: null, label: '---' },
|
{ value: null, label: '---' },
|
||||||
];
|
];
|
||||||
parse_universe: string = "";
|
global_universe: string = "";
|
||||||
parse_series: string = "";
|
global_series: string = "";
|
||||||
parse_season: number = null;
|
global_season: number = null;
|
||||||
parse_episode: number = null;
|
|
||||||
parse_title: string = "";
|
|
||||||
constructor(private route: ActivatedRoute,
|
constructor(private route: ActivatedRoute,
|
||||||
private router: Router,
|
private router: Router,
|
||||||
private locate: Location,
|
private locate: Location,
|
||||||
@ -115,9 +130,11 @@ export class UploadScene implements OnInit {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.need_send = true;
|
this.need_send = true;
|
||||||
if (this.parse_title === undefined || this.parse_title === null || this.parse_title === "") {
|
for (let iii = 0; iii< this.parsedElement.length; iii++) {
|
||||||
|
if (this.parsedElement[iii].title === undefined || this.parsedElement[iii].title === null || this.parsedElement[iii].title === "") {
|
||||||
this.need_send = false;
|
this.need_send = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (this.type_id === undefined || this.type_id === null) {
|
if (this.type_id === undefined || this.type_id === null) {
|
||||||
this.need_send = false;
|
this.need_send = false;
|
||||||
}
|
}
|
||||||
@ -148,54 +165,6 @@ export class UploadScene implements OnInit {
|
|||||||
}).catch(function (response2) {
|
}).catch(function (response2) {
|
||||||
console.log("get response22 : " + JSON.stringify(response2, null, 2));
|
console.log("get response22 : " + JSON.stringify(response2, null, 2));
|
||||||
});
|
});
|
||||||
//this.seriesService.getOrder()
|
|
||||||
/*
|
|
||||||
this.seriesService.getData()
|
|
||||||
.then(function (response3) {
|
|
||||||
for (let iii = 0; iii < response3.length; iii++) {
|
|
||||||
self.listSeries.push({ value: response3[iii].id, label: response3[iii].name });
|
|
||||||
//console.log("Get series: " + response3[iii].id + ", label:" + response3[iii].name)
|
|
||||||
}
|
|
||||||
}).catch(function (response3) {
|
|
||||||
console.log("get response3 : " + JSON.stringify(response3, null, 2));
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
this.videoService.get(this.id_video)
|
|
||||||
.then(function (response) {
|
|
||||||
console.log("get response of video : " + JSON.stringify(response, null, 2));
|
|
||||||
self.data.name = response.name;
|
|
||||||
self.data.description = response.description;
|
|
||||||
self.data.episode = response.episode;
|
|
||||||
self.data.universe_id = response.univers_id;
|
|
||||||
self.data.data_id = response.data_id;
|
|
||||||
self.data.time = response.time;
|
|
||||||
self.data.generated_name = response.generated_name;
|
|
||||||
self.onChangeType(response.type_id);
|
|
||||||
self.onChangeSeries(response.series_id);
|
|
||||||
self.data.season_id = response.season_id;
|
|
||||||
self.data_ori = self.data.clone();
|
|
||||||
if (response.covers !== undefined && response.covers !== null) {
|
|
||||||
for (let iii = 0; iii < response.covers.length; iii++) {
|
|
||||||
self.data.covers.push(response.covers[iii]);
|
|
||||||
self.covers_display.push({
|
|
||||||
id: response.covers[iii],
|
|
||||||
url: self.videoService.getCoverUrl(response.covers[iii])
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
self.covers_display = []
|
|
||||||
}
|
|
||||||
self.updateNeedSend();
|
|
||||||
console.log("covers_list : " + JSON.stringify(self.covers_display, null, 2));
|
|
||||||
}).catch(function (response) {
|
|
||||||
self.error = "Can not get the data";
|
|
||||||
self.data = new DataToSend();
|
|
||||||
self.covers_display = [];
|
|
||||||
self.data_ori = self.data.clone();
|
|
||||||
self.updateNeedSend();
|
|
||||||
});
|
|
||||||
*/
|
|
||||||
console.log(" END INIT ");
|
console.log(" END INIT ");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -234,7 +203,7 @@ export class UploadScene implements OnInit {
|
|||||||
} else {
|
} else {
|
||||||
for (let iii = 0 ; iii<this.listSeries.length ; iii++) {
|
for (let iii = 0 ; iii<this.listSeries.length ; iii++) {
|
||||||
if (this.listSeries[iii].value == _value) {
|
if (this.listSeries[iii].value == _value) {
|
||||||
this.parse_series = this.listSeries[iii].label;
|
this.global_series = this.listSeries[iii].label;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -242,31 +211,31 @@ export class UploadScene implements OnInit {
|
|||||||
this.updateNeedSend();
|
this.updateNeedSend();
|
||||||
}
|
}
|
||||||
onSeason (_value: any): void {
|
onSeason (_value: any): void {
|
||||||
this.parse_season = _value;
|
this.global_season = _value;
|
||||||
//console.log("change episode ID: " + _value + " ==> " + this.parse_season.toString());
|
//console.log("change episode ID: " + _value + " ==> " + this.parse_season.toString());
|
||||||
this.updateNeedSend();
|
this.updateNeedSend();
|
||||||
}
|
}
|
||||||
|
|
||||||
onTitle (_value: any): void {
|
onTitle (data: FileParsedElement, _value: any): void {
|
||||||
this.parse_title = _value;
|
data.title = _value;
|
||||||
this.updateNeedSend();
|
this.updateNeedSend();
|
||||||
}
|
}
|
||||||
|
|
||||||
onUniverse (_value: any): void {
|
onUniverse (_value: any): void {
|
||||||
this.parse_universe = _value;
|
this.global_universe = _value;
|
||||||
this.updateNeedSend();
|
this.updateNeedSend();
|
||||||
}
|
}
|
||||||
|
|
||||||
onEpisode (_value: any): void {
|
onEpisode (data: FileParsedElement, _value: any): void {
|
||||||
this.parse_episode = _value;
|
data.episode = _value;
|
||||||
//console.log("change episode ID: " + _value + " ==> " + this.parse_episode.toString());
|
//console.log("change episode ID: " + _value + " ==> " + this.parse_episode.toString());
|
||||||
this.updateNeedSend();
|
this.updateNeedSend();
|
||||||
}
|
}
|
||||||
onSeries (_value: any): void {
|
onSeries (_value: any): void {
|
||||||
this.parse_series = _value;
|
this.global_series = _value;
|
||||||
let self = this;
|
let self = this;
|
||||||
if (this.parse_series != "") {
|
if (this.global_series != "") {
|
||||||
this.seriesService.getLike(this.parse_series)
|
this.seriesService.getLike(this.global_series)
|
||||||
.then(function(response: any[]) {
|
.then(function(response: any[]) {
|
||||||
console.log("find element: " + response.length);
|
console.log("find element: " + response.length);
|
||||||
for (let iii = 0; iii<response.length; iii++) {
|
for (let iii = 0; iii<response.length; iii++) {
|
||||||
@ -285,31 +254,13 @@ export class UploadScene implements OnInit {
|
|||||||
this.updateNeedSend();
|
this.updateNeedSend();
|
||||||
}
|
}
|
||||||
|
|
||||||
sendFile(): void {
|
|
||||||
console.log("Send file requested ... " + this.mediaFile);
|
|
||||||
this.uploadFile(this.mediaFile);
|
|
||||||
}
|
|
||||||
|
|
||||||
// At the drag drop area
|
|
||||||
// (drop)="onDropFile($event)"
|
|
||||||
onDropFile (_event: DragEvent) {
|
|
||||||
_event.preventDefault();
|
|
||||||
this.uploadFile(_event.dataTransfer.files[0]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// At the drag drop area
|
|
||||||
// (dragover)="onDragOverFile($event)"
|
|
||||||
onDragOverFile (_event) {
|
|
||||||
_event.stopPropagation();
|
|
||||||
_event.preventDefault();
|
|
||||||
}
|
|
||||||
|
|
||||||
clearData() {
|
clearData() {
|
||||||
this.parse_universe = "";
|
this.global_universe = "";
|
||||||
this.parse_series = "";
|
this.global_series = "";
|
||||||
this.parse_season = null;
|
this.global_season = null;
|
||||||
this.parse_episode = null;
|
this.parsedElement = [];
|
||||||
this.parse_title = "";
|
this.parsedFaledElement = [];
|
||||||
|
|
||||||
this.type_id = null;
|
this.type_id = null;
|
||||||
this.series_id = null;
|
this.series_id = null;
|
||||||
@ -317,54 +268,61 @@ export class UploadScene implements OnInit {
|
|||||||
this.listSeason = [{value: null, label: '---'}];
|
this.listSeason = [{value: null, label: '---'}];
|
||||||
}
|
}
|
||||||
|
|
||||||
// At the file input element
|
addFileWithMetaData(file: File) {
|
||||||
// (change)="selectFile($event)"
|
//parsedElement: FileParsedElement[] = [];
|
||||||
onChangeFile (_value: any): void {
|
let universe: string = null;
|
||||||
this.selectedFiles = _value.files;
|
let series: string = null;
|
||||||
this.mediaFile = this.selectedFiles[0];
|
let season: number | null = null;
|
||||||
this.clearData();
|
let episode: number | null = null;
|
||||||
|
let title: string = "";
|
||||||
|
|
||||||
console.log("select file " + this.mediaFile.name);
|
console.log("select file " + file.name);
|
||||||
const splitElement = this.mediaFile.name.split('-');
|
let tmpName = file.name.replace(/[ \t]*-[ \t]*/g,'-');
|
||||||
|
tmpName = tmpName.replace(/[Ss]([0-9]+)[- \t]+[Ee]([0-9]+)/g,'-s$1-e$2-');
|
||||||
|
tmpName = tmpName.replace(/[Ee]([0-9]+)[- \t]+[Ss]([0-9]+)/g,'-s$2-e$1-');
|
||||||
|
tmpName = tmpName.replace(/_/g,'-');
|
||||||
|
tmpName = tmpName.replace(/--/g,'-');
|
||||||
|
console.log("select file " + tmpName);
|
||||||
|
const splitElement = tmpName.split('-');
|
||||||
if (splitElement.length == 1) {
|
if (splitElement.length == 1) {
|
||||||
this.parse_title = splitElement[0];
|
title = splitElement[0];
|
||||||
} else {
|
} else {
|
||||||
if (splitElement.length>=2) {
|
if (splitElement.length>=2) {
|
||||||
this.parse_series = splitElement[0];
|
series = splitElement[0];
|
||||||
}
|
}
|
||||||
splitElement.splice(0,1);
|
splitElement.splice(0,1);
|
||||||
if (splitElement.length == 1) {
|
if (splitElement.length == 1) {
|
||||||
this.parse_title = splitElement[0];
|
title = splitElement[0];
|
||||||
} else {
|
} else {
|
||||||
while (splitElement.length>0) {
|
while (splitElement.length>0) {
|
||||||
let element = splitElement[0];
|
let element = splitElement[0];
|
||||||
let find = false;
|
let find = false;
|
||||||
if (this.parse_season == null) {
|
if (season === null) {
|
||||||
if (element.length >= 1 && (element[0] == 's' || element[0] == 'S') ) {
|
if (element.length >= 1 && (element[0] === 's' || element[0] === 'S') ) {
|
||||||
element = element.substring(1);
|
element = element.substring(1);
|
||||||
this.parse_season = parseInt(element, 10);
|
season = parseInt(element, 10);
|
||||||
find = true;
|
find = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.parse_episode == null && find == false) {
|
if (episode === null && find === false) {
|
||||||
if (element.length >= 1 && (element[0] == 'e' || element[0] == 'E') ) {
|
if (element.length >= 1 && (element[0] === 'e' || element[0] === 'E') ) {
|
||||||
element = element.substring(1);
|
element = element.substring(1);
|
||||||
this.parse_episode = parseInt(element, 10);
|
episode = parseInt(element, 10);
|
||||||
find = true;
|
find = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (find == false) {
|
if (find === false) {
|
||||||
if (this.parse_season == null && this.parse_episode == null) {
|
if (season === null && episode === null) {
|
||||||
if (this.parse_universe == "") {
|
if (universe === "") {
|
||||||
this.parse_universe = element;
|
universe = element;
|
||||||
} else {
|
} else {
|
||||||
this.parse_universe = this.parse_universe + "-" + element;
|
universe = universe + "-" + element;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (this.parse_title == "") {
|
if (title === "") {
|
||||||
this.parse_title = element;
|
title = element;
|
||||||
} else {
|
} else {
|
||||||
this.parse_title = this.parse_title + "-" + element;
|
title = title + "-" + element;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -372,13 +330,82 @@ export class UploadScene implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (isNaN(episode)) {
|
||||||
|
episode = null;
|
||||||
|
}
|
||||||
|
if (isNaN(season)) {
|
||||||
|
season = null;
|
||||||
|
}
|
||||||
// remove extention
|
// remove extention
|
||||||
this.parse_title = this.parse_title.replace(new RegExp("\.(mkv|MKV|Mkv|webm|WEBM|Webm|mp4)"),"");
|
title = title.replace(new RegExp("\.(mkv|MKV|Mkv|webm|WEBM|Webm|mp4)"),"");
|
||||||
|
let tmp = new FileParsedElement(file, universe, series, season, episode, title);
|
||||||
|
console.log("==>" + JSON.stringify(tmp));
|
||||||
|
// add it in the list.
|
||||||
|
this.parsedElement.push(tmp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// At the file input element
|
||||||
|
// (change)="selectFile($event)"
|
||||||
|
onChangeFile (_value: any): void {
|
||||||
|
this.mediaFile = [];
|
||||||
|
for (var i = 0; i < _value.files.length; i++) {
|
||||||
|
this.mediaFile.push(_value.files[i]);
|
||||||
|
}
|
||||||
|
//console.log("get files: " + JSON.stringify(tmpFileList));
|
||||||
|
//this.selectedFiles =_value.files;
|
||||||
|
//this.mediaFile = this.selectedFiles[0];
|
||||||
|
this.clearData();
|
||||||
|
|
||||||
|
for (let iii=0; iii<_value.files.length; iii++) {
|
||||||
|
this.addFileWithMetaData(_value.files[iii]);
|
||||||
|
}
|
||||||
|
// check if all global parameters are generic:
|
||||||
|
if (this.parsedElement.length == 0) {
|
||||||
|
this.updateNeedSend();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// we verify fith the first value to remove all unknown ...
|
||||||
|
// clean different univers:
|
||||||
|
for (let iii=1; iii<this.parsedElement.length; iii++) {
|
||||||
|
console.log("check universe [" + (iii+1) + "/" + this.parsedElement.length + "] '" + this.parsedElement[0].universe + " !== " + this.parsedElement[iii].universe + "'");
|
||||||
|
if (this.parsedElement[0].universe !== this.parsedElement[iii].universe) {
|
||||||
|
this.parsedFaledElement.push(new FileFailParsedElement(this.parsedElement[iii].file, "Remove from list due to wrong universe value"));
|
||||||
|
console.log("Remove from list (!= universe) : [" + (iii+1) + "/" + this.parsedElement.length + "] '" + this.parsedElement[iii].file.name + "'");
|
||||||
|
this.parsedElement.splice(iii,1);
|
||||||
|
iii--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// clean different series:
|
||||||
|
for (let iii=1; iii<this.parsedElement.length; iii++) {
|
||||||
|
console.log("check series [" + (iii+1) + "/" + this.parsedElement.length + "] '" + this.parsedElement[0].series + " !== " + this.parsedElement[iii].series + "'");
|
||||||
|
if (this.parsedElement[0].series !== this.parsedElement[iii].series) {
|
||||||
|
this.parsedFaledElement.push(new FileFailParsedElement(this.parsedElement[iii].file, "Remove from list due to wrong series value"));
|
||||||
|
console.log("Remove from list (!= series) : [" + (iii+1) + "/" + this.parsedElement.length + "] '" + this.parsedElement[iii].file.name + "'");
|
||||||
|
this.parsedElement.splice(iii,1);
|
||||||
|
iii--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// clean different season:
|
||||||
|
for (let iii=1; iii<this.parsedElement.length; iii++) {
|
||||||
|
console.log("check season [" + (iii+1) + "/" + this.parsedElement.length + "] '" + this.parsedElement[0].season + " !== " + this.parsedElement[iii].season + "'");
|
||||||
|
if (this.parsedElement[0].season !== this.parsedElement[iii].season) {
|
||||||
|
this.parsedFaledElement.push(new FileFailParsedElement(this.parsedElement[iii].file, "Remove from list due to wrong season value"));
|
||||||
|
console.log("Remove from list (!= season) : [" + (iii+1) + "/" + this.parsedElement.length + "] '" + this.parsedElement[iii].file.name + "'");
|
||||||
|
this.parsedElement.splice(iii,1);
|
||||||
|
iii--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.global_universe = this.parsedElement[0].universe;
|
||||||
|
this.global_series = this.parsedElement[0].series;
|
||||||
|
this.global_season = this.parsedElement[0].season;
|
||||||
|
|
||||||
this.updateNeedSend();
|
this.updateNeedSend();
|
||||||
this.series_id = null;
|
this.series_id = null;
|
||||||
let self = this;
|
let self = this;
|
||||||
if (this.parse_series != "") {
|
if (this.global_series != "") {
|
||||||
this.seriesService.getLike(this.parse_series)
|
this.seriesService.getLike(this.global_series)
|
||||||
.then(function(response: any[]) {
|
.then(function(response: any[]) {
|
||||||
console.log("find element: " + response.length);
|
console.log("find element: " + response.length);
|
||||||
for (let iii = 0; iii<response.length; iii++) {
|
for (let iii = 0; iii<response.length; iii++) {
|
||||||
@ -397,89 +424,83 @@ export class UploadScene implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sendFile(): void {
|
||||||
uploadFile (_file: File) {
|
console.log("Send file requested ... " + this.mediaFile);
|
||||||
if (_file == undefined) {
|
|
||||||
console.log("No file selected!");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let self = this;
|
|
||||||
|
|
||||||
/*
|
|
||||||
this.parse_series = "";
|
|
||||||
this.parse_season = null;
|
|
||||||
this.parse_episode = null;
|
|
||||||
this.parse_title = "";
|
|
||||||
*/
|
|
||||||
this.upload = new UploadProgress();
|
this.upload = new UploadProgress();
|
||||||
// add universe
|
|
||||||
if (this.parse_universe !== null) {
|
|
||||||
this.upload.labelMediaTitle += this.parse_universe;
|
|
||||||
}
|
|
||||||
// add series
|
|
||||||
if (this.parse_series !== null) {
|
|
||||||
if (this.upload.labelMediaTitle.length != 0) {
|
|
||||||
this.upload.labelMediaTitle += "/";
|
|
||||||
}
|
|
||||||
this.upload.labelMediaTitle += this.parse_series;
|
|
||||||
}
|
|
||||||
// add season
|
|
||||||
if (this.parse_season !== null && this.parse_season !== undefined && this.parse_season.toString().length != 0) {
|
|
||||||
if (this.upload.labelMediaTitle.length != 0) {
|
|
||||||
this.upload.labelMediaTitle += "-";
|
|
||||||
}
|
|
||||||
this.upload.labelMediaTitle += "s" + this.parse_season.toString();
|
|
||||||
}
|
|
||||||
// add episode ID
|
|
||||||
if (this.parse_episode !== null && this.parse_episode !== undefined && this.parse_episode.toString().length != 0) {
|
|
||||||
if (this.upload.labelMediaTitle.length != 0) {
|
|
||||||
this.upload.labelMediaTitle += "-";
|
|
||||||
}
|
|
||||||
this.upload.labelMediaTitle += "e" + this.parse_episode.toString();
|
|
||||||
}
|
|
||||||
// add title
|
|
||||||
if (this.upload.labelMediaTitle.length != 0) {
|
|
||||||
this.upload.labelMediaTitle += "-";
|
|
||||||
}
|
|
||||||
this.upload.labelMediaTitle += this.parse_title;
|
|
||||||
// display the upload pop-in
|
// display the upload pop-in
|
||||||
this.popInService.open("popin-upload-progress");
|
this.popInService.open("popin-upload-progress");
|
||||||
|
this.globalUpLoad(0, this.parsedElement.length);
|
||||||
|
}
|
||||||
|
|
||||||
this.videoService.uploadFile(_file,
|
globalUpLoad(id: number, total: number): void {
|
||||||
this.parse_universe,
|
let self = this;
|
||||||
this.parse_series,
|
this.uploadFile(this.parsedElement[id], id, total, () => {
|
||||||
this.series_id,
|
let id2 = id + 1;
|
||||||
this.parse_season,
|
if (id2 < total) {
|
||||||
this.parse_episode,
|
self.globalUpLoad(id2, total);
|
||||||
this.parse_title,
|
} else {
|
||||||
this.type_id,
|
self.upload.result = "Media creation done";
|
||||||
|
}
|
||||||
|
}, (value:string) => {
|
||||||
|
self.upload.error = "Error in the upload of the data..." + value;
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
uploadFile (eleemnent: FileParsedElement, id: number, total: number, _sendDone: any, _errorOccured: any): void {
|
||||||
|
let self = this;
|
||||||
|
|
||||||
|
self.upload.labelMediaTitle = '';
|
||||||
|
// add universe
|
||||||
|
if (self.global_universe !== null) {
|
||||||
|
self.upload.labelMediaTitle += self.global_universe;
|
||||||
|
}
|
||||||
|
// add series
|
||||||
|
if (self.global_series !== null) {
|
||||||
|
if (self.upload.labelMediaTitle.length != 0) {
|
||||||
|
self.upload.labelMediaTitle += ":";
|
||||||
|
}
|
||||||
|
self.upload.labelMediaTitle += self.global_series;
|
||||||
|
}
|
||||||
|
// add season
|
||||||
|
if (self.global_season !== null && self.global_season !== undefined && self.global_season.toString().length != 0) {
|
||||||
|
if (self.upload.labelMediaTitle.length != 0) {
|
||||||
|
self.upload.labelMediaTitle += "-";
|
||||||
|
}
|
||||||
|
self.upload.labelMediaTitle += "s" + self.global_season.toString();
|
||||||
|
}
|
||||||
|
// add episode ID
|
||||||
|
if (eleemnent.episode !== null && eleemnent.episode !== undefined && eleemnent.episode.toString().length != 0) {
|
||||||
|
if (self.upload.labelMediaTitle.length != 0) {
|
||||||
|
self.upload.labelMediaTitle += "-";
|
||||||
|
}
|
||||||
|
self.upload.labelMediaTitle += "e" + eleemnent.episode.toString();
|
||||||
|
}
|
||||||
|
// add title
|
||||||
|
if (self.upload.labelMediaTitle.length != 0) {
|
||||||
|
self.upload.labelMediaTitle += "-";
|
||||||
|
}
|
||||||
|
self.upload.labelMediaTitle = '[' + (id+1) + '/' + total + ']' + self.upload.labelMediaTitle + eleemnent.title;
|
||||||
|
|
||||||
|
self.videoService.uploadFile(eleemnent.file,
|
||||||
|
self.global_universe,
|
||||||
|
self.global_series,
|
||||||
|
self.series_id,
|
||||||
|
self.global_season,
|
||||||
|
eleemnent.episode,
|
||||||
|
eleemnent.title,
|
||||||
|
self.type_id,
|
||||||
function(count, total) {
|
function(count, total) {
|
||||||
//console.log("upload : " + count*100/total);
|
//console.log("upload : " + count*100/total);
|
||||||
self.upload.mediaSendSize = count;
|
self.upload.mediaSendSize = count;
|
||||||
self.upload.mediaSize = total;
|
self.upload.mediaSize = total;
|
||||||
|
|
||||||
})
|
})
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
console.log("get response of video : " + JSON.stringify(response, null, 2));
|
console.log("get response of video : " + JSON.stringify(response, null, 2));
|
||||||
self.upload.result = "Media creation done";
|
_sendDone();
|
||||||
}).catch(function (response) {
|
}).catch(function (response) {
|
||||||
//self.error = "Can not get the data";
|
//self.error = "Can not get the data";
|
||||||
console.log("Can not add the data in the system...");
|
console.log("Can not add the data in the system...");
|
||||||
self.upload.error = "Error in the upload of the data..." + JSON.stringify(response, null, 2);
|
_errorOccured(JSON.stringify(response, null, 2));
|
||||||
});
|
|
||||||
}
|
|
||||||
removeCover (_id) {
|
|
||||||
console.log("Request remove cover: " + _id);
|
|
||||||
}
|
|
||||||
removeMedia () {
|
|
||||||
console.log("Request remove Media...");
|
|
||||||
this.videoService.delete(this.id_video)
|
|
||||||
.then(function (response3) {
|
|
||||||
//self.data_ori = tmpp;
|
|
||||||
//self.updateNeedSend();
|
|
||||||
}).catch(function (response3) {
|
|
||||||
|
|
||||||
//self.updateNeedSend();
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -216,7 +216,7 @@ export class VideoScene implements OnInit {
|
|||||||
} else {
|
} else {
|
||||||
self.video_source = "";
|
self.video_source = "";
|
||||||
}
|
}
|
||||||
if (response.covers == undefined || response.covers == null || response.covers.length == 0) {
|
if (response.covers === undefined || response.covers === null || response.covers.length === 0) {
|
||||||
self.cover = null;
|
self.cover = null;
|
||||||
} else {
|
} else {
|
||||||
self.cover = self.videoService.getCoverUrl(response.covers[0]);
|
self.cover = self.videoService.getCoverUrl(response.covers[0]);
|
||||||
|
@ -15,14 +15,10 @@
|
|||||||
top: 50px;
|
top: 50px;
|
||||||
width: 400px;
|
width: 400px;
|
||||||
float: left;
|
float: left;
|
||||||
//height: 400px;
|
|
||||||
padding: 1%;
|
padding: 1%;
|
||||||
.cover-area {
|
.cover-area {
|
||||||
//position:relative;
|
|
||||||
float: right;
|
float: right;
|
||||||
//right: 0px;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
//height: 100%;
|
|
||||||
.cover {
|
.cover {
|
||||||
align: center;
|
align: center;
|
||||||
width: 60%;
|
width: 60%;
|
||||||
@ -39,15 +35,8 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.description-area {
|
.description-area {
|
||||||
//position: sticky;
|
|
||||||
float: left;
|
float: left;
|
||||||
//height: 100%;
|
|
||||||
//margin: 0;
|
|
||||||
//border: solid 1px;
|
|
||||||
//border-color: rgba(255, 0, 0, 0.7);
|
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
background-color: green;
|
|
||||||
font-size: 45px;
|
font-size: 45px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
line-height: 60px;
|
line-height: 60px;
|
||||||
|
Loading…
Reference in New Issue
Block a user