@@ -20,7 +24,7 @@
@if (covers && covers.length > 0) {
-
+
}
@@ -134,15 +138,16 @@
}
}
-
-
- {{generatedName}}
-
-
-
- highlight_off
-
-
+ @if(!isFullScreen || !isPlaying) {
+
+ {{generatedName}}
+
+
+
+ highlight_off
+
+
+ }
@if (displayVolumeMenu && (!displayNeedHide || !isPlaying)) {
@@ -187,27 +197,31 @@
-
-
-
-
-
-
-
-
-
- Track ID:
- Title:
-
-
-
-
- {{data.episode}}
- {{data.name}}
-
-
-
-
+ @if(listFileInBdd) {
+
+
+
+
+
+
+
+
+
+ Track ID:
+ Title:
+
+
+
+ @for (data of listFileInBdd; track data.id;) {
+
+ {{data.episode}}
+ {{data.name}}
+
+ }
+
+
+
+ }
}
@if(parsedElement.length !== 0) {
@@ -219,20 +233,14 @@
-
-
- Rejected:
-
- {{data.file.name}} ==> {{data.reason}}
-
-
+ @for (data of parsedFailedElement; track data.id;) {
+
+ Rejected:
+
+ {{data.file.name}} ==> {{data.reason}}
+
+
+ }
diff --git a/front/src/app/scene/upload/upload.ts b/front/src/app/scene/upload/upload.ts
index 25fe989..7db1b64 100644
--- a/front/src/app/scene/upload/upload.ts
+++ b/front/src/app/scene/upload/upload.ts
@@ -6,7 +6,7 @@
import { Component, OnInit } from '@angular/core';
-import { GenderService, ArtistService, TrackService, ArianeService, AlbumService } from 'app/service';
+import { GenderService, ArtistService, TrackService, AlbumService } from 'app/service';
import { NodeData } from 'common/model';
import { UploadProgress } from 'common/popin/upload-progress/upload-progress';
import { PopInService } from 'common/service';
@@ -22,28 +22,29 @@ export class ElementList {
export class FileParsedElement {
public isSended: boolean = false;
public nameDetected: boolean = false;
- public episodeDetected: boolean = false;s
+ public trackIdDetected: boolean = false; s
constructor(
public file: File,
public artist: string,
public album: string,
public trackId: number,
public title: string) {
- // nothiing to do.
+ // nothing to do.
}
}
export class FileFailParsedElement {
constructor(
+ public id: number,
public file: File,
public reason: string) {
- // nothiing to do.
+ // nothing to do.
}
}
@Component({
selector: 'app-track-edit',
templateUrl: './upload.html',
- styleUrls: [ './upload.less' ]
+ styleUrls: ['./upload.less']
})
export class UploadScene implements OnInit {
@@ -56,11 +57,11 @@ export class UploadScene implements OnInit {
albumId: number = null;
needSend: boolean = false;
- // list of all files already registered in the bdd to compare with the curent list of files.
+ // list of all files already registered in the bdd to compare with the current list of files.
listFileInBdd: any[] = undefined;
// section tha define the upload value to display in the pop-in of upload
- public upload:UploadProgress = new UploadProgress();
+ public upload: UploadProgress = new UploadProgress();
listGender: ElementList[] = [
{ value: null, label: '---' },
@@ -74,19 +75,19 @@ export class UploadScene implements OnInit {
/*
config = {
- displayKey: "label", // if objects array passed which key to be displayed defaults to description
- search: true,
- limitTo: 3,
+ displayKey: "label", // if objects array passed which key to be displayed defaults to description
+ search: true,
+ limitTo: 3,
};
*/
config = {
displayKey: 'description', // if objects array passed which key to be displayed defaults to description
- search: true, // true/false for the search functionlity defaults to false,
+ search: true, // true/false for the search functionality defaults to false,
height: 'auto', // height of the list so that if there are more no of items it can show a scroll defaults to auto. With auto height scroll will never appear
placeholder: 'Select', // text to be displayed when no item is selected defaults to Select,
- customComparator: () => {}, // a custom function using which user wants to sort the items. default is undefined and Array.sort() will be used in that case,
+ customComparator: () => { }, // a custom function using which user wants to sort the items. default is undefined and Array.sort() will be used in that case,
limitTo: 10, // number thats limits the no of options displayed in the UI (if zero, options will not be limited)
- moreText: 'more', // text to be displayed whenmore than one items are selected like Option 1 + 5 more
+ moreText: 'more', // text to be displayed when more than one items are selected like Option 1 + 5 more
noResultsFound: 'No results found!', // text to be displayed when no items are found while searching
searchPlaceholder: 'Search', // label thats displayed in search input,
searchOnKey: 'description', // key on which search should be performed this will be selective search. if undefined this will be extensive search on all keys
@@ -99,51 +100,45 @@ export class UploadScene implements OnInit {
private artistService: ArtistService,
private albumService: AlbumService,
private trackService: TrackService,
- private arianeService: ArianeService,
private popInService: PopInService) {
// nothing to do.
}
updateNeedSend(): boolean {
- if(this.parsedElement.length === 0) {
+ if (this.parsedElement.length === 0) {
this.needSend = false;
return;
}
this.needSend = true;
- for(let iii = 0; iii < this.parsedElement.length; iii++) {
- if(isNullOrUndefined(this.parsedElement[iii].title) || this.parsedElement[iii].title === '') {
+ for (let iii = 0; iii < this.parsedElement.length; iii++) {
+ if (isNullOrUndefined(this.parsedElement[iii].title) || this.parsedElement[iii].title === '') {
this.needSend = false;
}
}
- /*
- if(isNullOrUndefined(this.genderId)) {
- this.needSend = false;
- }
- */
return this.needSend;
}
ngOnInit() {
let self = this;
- this.listGender = [ { value: null, label: '---' } ];
- this.listArtist = [ { value: null, label: '---' } ];
- this.listAlbum = [ { value: null, label: '---' } ];
+ this.listGender = [{ value: null, label: '---' }];
+ this.listArtist = [{ value: null, label: '---' }];
+ this.listAlbum = [{ value: null, label: '---' }];
this.artistService.getOrder()
.then((response2) => {
- for(let iii = 0; iii < response2.length; iii++) {
+ for (let iii = 0; iii < response2.length; iii++) {
self.listArtist.push({ value: response2[iii].id, label: response2[iii].name });
}
}).catch((response2) => {
- console.log(`get response22 : ${ JSON.stringify(response2, null, 2)}`);
+ console.log(`get response22 : ${JSON.stringify(response2, null, 2)}`);
});
this.genderService.getOrder()
.then((response2: NodeData[]) => {
//console.error(`Keep gender : ${ JSON.stringify(response2, null, 2)} ==> ${response2.length}`);
- for(let iii = 0; iii < response2.length; iii++) {
+ for (let iii = 0; iii < response2.length; iii++) {
self.listGender.push({ value: response2[iii].id, label: response2[iii].name });
}
}).catch((response2) => {
- console.log(`get response22 : ${ JSON.stringify(response2, null, 2)}`);
+ console.log(`get response22 : ${JSON.stringify(response2, null, 2)}`);
});
console.log(' END INIT ');
}
@@ -151,16 +146,16 @@ export class UploadScene implements OnInit {
onGender(value: any): void {
this.globalGender = value;
let self = this;
- if(this.globalGender !== '') {
+ if (this.globalGender !== '') {
this.genderService.getLike(this.globalGender)
.then((response: any[]) => {
- console.log(`find element: ${ response.length}`);
- for(let iii = 0; iii < response.length; iii++) {
- console.log(` - ${ JSON.stringify(response[iii])}`);
+ console.log(`find element: ${response.length}`);
+ for (let iii = 0; iii < response.length; iii++) {
+ console.log(` - ${JSON.stringify(response[iii])}`);
}
- if(response.length === 0) {
+ if (response.length === 0) {
self.genderId = undefined;
- } else if(response.length === 1) {
+ } else if (response.length === 1) {
self.genderId = response[0].id;
}
}).catch((response) => {
@@ -174,9 +169,9 @@ export class UploadScene implements OnInit {
onChangeGender(value: any): void {
this.globalGender = value;
- if(!isNullOrUndefined(value)) {
- for(let iii = 0; iii < this.listGender.length; iii++) {
- if(this.listGender[iii].value === value) {
+ if (!isNullOrUndefined(value)) {
+ for (let iii = 0; iii < this.listGender.length; iii++) {
+ if (this.listGender[iii].value === value) {
this.globalGender = this.listGender[iii].label;
break;
}
@@ -186,31 +181,31 @@ export class UploadScene implements OnInit {
}
private updateTheListOfAlbum() {
- this.listAlbum = [ { value: null, label: '---' } ];
+ this.listAlbum = [{ value: null, label: '---' }];
if (isNullOrUndefined(this.artistId)) {
return;
}
let self = this;
this.artistService.getAlbum(this.artistId)
.then((response2) => {
- for(let iii = 0; iii < response2.length; iii++) {
+ for (let iii = 0; iii < response2.length; iii++) {
self.listAlbum.push({ value: response2[iii].id, label: response2[iii].name });
}
}).catch((response2) => {
- console.log(`get response22 : ${ JSON.stringify(response2, null, 2)}`);
+ console.log(`get response22 : ${JSON.stringify(response2, null, 2)}`);
});
}
onArtist(value: any): void {
this.globalArtist = value;
let self = this;
- if(this.globalArtist !== '') {
+ if (this.globalArtist !== '') {
console.log(`update artist List Element: ${this.globalArtist}`);
this.artistService.getLike(this.globalArtist)
.then((response: any[]) => {
- console.log(` ==> find artist like ${this.globalArtist} : ${ JSON.stringify(response, null, 2)}`);
- if(response.length === 0) {
+ console.log(` ==> find artist like ${this.globalArtist} : ${JSON.stringify(response, null, 2)}`);
+ if (response.length === 0) {
self.artistId = undefined;
- } else if(response.length === 1) {
+ } else if (response.length === 1) {
self.artistId = response[0].id;
self.updateTheListOfAlbum();
}
@@ -220,7 +215,7 @@ export class UploadScene implements OnInit {
self.updateListOfTrackToCheck();
}
}).catch((response) => {
- console.log(` ==> CAN NOT find artist like ${this.globalArtist} : ${ response.length}`);
+ console.log(` ==> CAN NOT find artist like ${this.globalArtist} : ${response.length}`);
self.artistId = undefined;
});
}
@@ -228,9 +223,9 @@ export class UploadScene implements OnInit {
}
onChangeArtist(value: any): void {
this.artistId = value;
- if(!isNullOrUndefined(value)) {
- for(let iii = 0; iii < this.listArtist.length; iii++) {
- if(this.listArtist[iii].value === value) {
+ if (!isNullOrUndefined(value)) {
+ for (let iii = 0; iii < this.listArtist.length; iii++) {
+ if (this.listArtist[iii].value === value) {
this.globalArtist = this.listArtist[iii].label;
break;
}
@@ -250,18 +245,19 @@ export class UploadScene implements OnInit {
data.title = value;
this.updateNeedSend();
}
- removeElmentFromList(data: FileParsedElement, value: any): void {
- for(let iii = 0; iii < this.parsedElement.length; iii++) {
- if(this.parsedElement[iii] === data) {
+
+ removeElementFromList(data: FileParsedElement, value: any): void {
+ for (let iii = 0; iii < this.parsedElement.length; iii++) {
+ if (this.parsedElement[iii] === data) {
this.parsedElement.splice(iii, 1);
break;
}
}
- this.parsedFailedElement.push(new FileFailParsedElement(data.file, 'Removed by user.'));
+ this.parsedFailedElement.push(new FileFailParsedElement(this.parsedFailedElement.length, data.file, 'Removed by user.'));
this.updateNeedSend();
}
- onEpisode(data: FileParsedElement, value: any): void {
+ onTrackId(data: FileParsedElement, value: any): void {
data.trackId = value;
// console.log("change episode ID: " + value + " ==> " + this.parseEpisode.toString());
this.updateNeedSend();
@@ -281,7 +277,7 @@ export class UploadScene implements OnInit {
this.artistId = null;
this.albumId = null;
//this.listGender = [ { value: null, label: '---' } ];
- this.listAlbum = [ { value: null, label: '---' } ];
+ this.listAlbum = [{ value: null, label: '---' }];
}
addFileWithMetaData(file: File) {
@@ -291,38 +287,38 @@ export class UploadScene implements OnInit {
let trackIdNumber: number | null = undefined;
let title: string = '';
- console.log(`select file ${ file.name}`);
+ console.log(`select file ${file.name}`);
let tmpName = file.name.replace(/[ \t]*-[ \t]*/g, '-');
//tmpName = tmpName.replace(/_/g, '-');
//tmpName = tmpName.replace(/--/g, '-');
- console.log(`select file ${ tmpName}`);
+ console.log(`select file ${tmpName}`);
const splitElement = tmpName.split('~');
- if(splitElement.length > 1) {
+ if (splitElement.length > 1) {
artist = splitElement[0];
- tmpName = tmpName.substring(artist.length+1);
+ tmpName = tmpName.substring(artist.length + 1);
}
const splitElement2 = tmpName.split('\#');
- if(splitElement2.length > 1) {
+ if (splitElement2.length > 1) {
album = splitElement2[0];
- tmpName = tmpName.substring(album.length+1);
+ tmpName = tmpName.substring(album.length + 1);
}
//console.log("ploppppp " + tmpName);
const splitElement3 = tmpName.split('-');
- if(splitElement3.length > 1) {
+ if (splitElement3.length > 1) {
trackIdNumber = parseInt(splitElement3[0], 10);
- tmpName = tmpName.substring(splitElement3[0].length+1);
+ tmpName = tmpName.substring(splitElement3[0].length + 1);
}
//console.log("KKKppppp " + tmpName);
//console.log(" ===> " + splitElement3[0]);
title = tmpName;
-
- if(isNaN(trackIdNumber)) {
+
+ if (isNaN(trackIdNumber)) {
trackIdNumber = undefined;
}
// remove extention
title = title.replace(new RegExp('\\.(webm|WEBM|Webm)'), '');
let tmp = new FileParsedElement(file, artist, album, trackIdNumber, title);
- console.log(`==>${ JSON.stringify(tmp)}`);
+ console.log(`==>${JSON.stringify(tmp)}`);
// add it in the list.
this.parsedElement.push(tmp);
}
@@ -333,11 +329,11 @@ export class UploadScene implements OnInit {
onChangeFile(value: any): void {
this.clearData();
- for(let iii = 0; iii < value.files.length; iii++) {
+ 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) {
+ if (this.parsedElement.length === 0) {
this.updateNeedSend();
return;
}
@@ -346,7 +342,7 @@ export class UploadScene implements OnInit {
/*for(let iii = 1; iii < this.parsedElement.length; iii++) {
console.log(`check gender [${ iii + 1 }/${ this.parsedElement.length }] '${ this.parsedElement[0].gender } !== ${ this.parsedElement[iii].gender }'`);
if(this.parsedElement[0].gender !== this.parsedElement[iii].gender) {
- this.parsedFailedElement.push(new FileFailParsedElement(this.parsedElement[iii].file, 'Remove from list due to wrong gender value'));
+ this.parsedFailedElement.push(new FileFailParsedElement(this.parsedFailedElement.length, this.parsedElement[iii].file, 'Remove from list due to wrong gender value'));
console.log(`Remove from list (!= playlist) : [${ iii + 1 }/${ this.parsedElement.length }] '${ this.parsedElement[iii].file.name }'`);
this.parsedElement.splice(iii, 1);
iii--;
@@ -354,21 +350,21 @@ export class UploadScene implements OnInit {
}
*/
// clean different artist:
- for(let iii = 1; iii < this.parsedElement.length; iii++) {
- console.log(`check artist [${ iii + 1 }/${ this.parsedElement.length }] '${ this.parsedElement[0].artist } !== ${ this.parsedElement[iii].artist }'`);
- if(this.parsedElement[0].artist !== this.parsedElement[iii].artist) {
- this.parsedFailedElement.push(new FileFailParsedElement(this.parsedElement[iii].file, 'Remove from list due to wrong artist value'));
- console.log(`Remove from list (!= artist) : [${ iii + 1 }/${ this.parsedElement.length }] '${ this.parsedElement[iii].file.name }'`);
+ for (let iii = 1; iii < this.parsedElement.length; iii++) {
+ console.log(`check artist [${iii + 1}/${this.parsedElement.length}] '${this.parsedElement[0].artist} !== ${this.parsedElement[iii].artist}'`);
+ if (this.parsedElement[0].artist !== this.parsedElement[iii].artist) {
+ this.parsedFailedElement.push(new FileFailParsedElement(this.parsedFailedElement.length, this.parsedElement[iii].file, 'Remove from list due to wrong artist value'));
+ console.log(`Remove from list (!= artist) : [${iii + 1}/${this.parsedElement.length}] '${this.parsedElement[iii].file.name}'`);
this.parsedElement.splice(iii, 1);
iii--;
}
}
// clean different album:
- for(let iii = 1; iii < this.parsedElement.length; iii++) {
- console.log(`check album [${ iii + 1 }/${ this.parsedElement.length }] '${ this.parsedElement[0].album } !== ${ this.parsedElement[iii].album }'`);
- if(this.parsedElement[0].album !== this.parsedElement[iii].album) {
- this.parsedFailedElement.push(new FileFailParsedElement(this.parsedElement[iii].file, 'Remove from list due to wrong album value'));
- console.log(`Remove from list (!= album) : [${ iii + 1 }/${ this.parsedElement.length }] '${ this.parsedElement[iii].file.name }'`);
+ for (let iii = 1; iii < this.parsedElement.length; iii++) {
+ console.log(`check album [${iii + 1}/${this.parsedElement.length}] '${this.parsedElement[0].album} !== ${this.parsedElement[iii].album}'`);
+ if (this.parsedElement[0].album !== this.parsedElement[iii].album) {
+ this.parsedFailedElement.push(new FileFailParsedElement(this.parsedFailedElement.length, this.parsedElement[iii].file, 'Remove from list due to wrong album value'));
+ console.log(`Remove from list (!= album) : [${iii + 1}/${this.parsedElement.length}] '${this.parsedElement[iii].file.name}'`);
this.parsedElement.splice(iii, 1);
iii--;
}
@@ -384,7 +380,7 @@ export class UploadScene implements OnInit {
}
sendFile(): void {
- console.log(`Send file requested ... ${ this.parsedElement.length}`);
+ console.log(`Send file requested ... ${this.parsedElement.length}`);
this.upload = new UploadProgress();
// display the upload pop-in
this.popInService.open('popin-upload-progress');
@@ -395,16 +391,16 @@ export class UploadScene implements OnInit {
let self = this;
this.uploadFile(this.parsedElement[id], id, total, () => {
let id2 = id + 1;
- if(id2 < total) {
+ if (id2 < total) {
self.globalUpLoad(id2, total);
} else {
self.upload.result = 'Media creation done';
}
- }, (value:string) => {
- self.upload.error = `Error in the upload of the data...${ value}`;
+ }, (value: string) => {
+ self.upload.error = `Error in the upload of the data...${value}`;
});
}
- uploadFile(elemnent: FileParsedElement, id: number, total: number, sendDone: any, errorOccured: any): void {
+ uploadFile(element: FileParsedElement, id: number, total: number, sendDone: any, errorOccurred: any): void {
let self = this;
self.upload.labelMediaTitle = '';
@@ -415,95 +411,95 @@ export class UploadScene implements OnInit {
}
*/
// add artist
- if(!isNullOrUndefined(self.globalArtist)) {
- if(self.upload.labelMediaTitle.length !== 0) {
- self.upload.labelMediaTitle = `${self.upload.labelMediaTitle }:`;
+ if (!isNullOrUndefined(self.globalArtist)) {
+ if (self.upload.labelMediaTitle.length !== 0) {
+ self.upload.labelMediaTitle = `${self.upload.labelMediaTitle}:`;
}
self.upload.labelMediaTitle = self.upload.labelMediaTitle + self.globalArtist;
}
// add album
- if(!isNullOrUndefined(self.globalAlbum) && self.globalAlbum.toString().length !== 0) {
- if(self.upload.labelMediaTitle.length !== 0) {
- self.upload.labelMediaTitle = `${self.upload.labelMediaTitle }-`;
+ if (!isNullOrUndefined(self.globalAlbum) && self.globalAlbum.toString().length !== 0) {
+ if (self.upload.labelMediaTitle.length !== 0) {
+ self.upload.labelMediaTitle = `${self.upload.labelMediaTitle}-`;
}
- self.upload.labelMediaTitle = `${self.upload.labelMediaTitle }s${ self.globalAlbum.toString()}`;
+ self.upload.labelMediaTitle = `${self.upload.labelMediaTitle}s${self.globalAlbum.toString()}`;
}
// add episode ID
- if(!isNullOrUndefined(elemnent.trackId) && elemnent.trackId.toString().length !== 0) {
- if(self.upload.labelMediaTitle.length !== 0) {
- self.upload.labelMediaTitle = `${self.upload.labelMediaTitle }-`;
+ if (!isNullOrUndefined(element.trackId) && element.trackId.toString().length !== 0) {
+ if (self.upload.labelMediaTitle.length !== 0) {
+ self.upload.labelMediaTitle = `${self.upload.labelMediaTitle}-`;
}
- self.upload.labelMediaTitle = `${self.upload.labelMediaTitle }e${ elemnent.trackId.toString()}`;
+ self.upload.labelMediaTitle = `${self.upload.labelMediaTitle}e${element.trackId.toString()}`;
}
// add title
- if(self.upload.labelMediaTitle.length !== 0) {
- self.upload.labelMediaTitle = `${self.upload.labelMediaTitle }-`;
+ if (self.upload.labelMediaTitle.length !== 0) {
+ self.upload.labelMediaTitle = `${self.upload.labelMediaTitle}-`;
}
- self.upload.labelMediaTitle = `[${ id + 1 }/${ total }]${ self.upload.labelMediaTitle }${elemnent.title}`;
+ self.upload.labelMediaTitle = `[${id + 1}/${total}]${self.upload.labelMediaTitle}${element.title}`;
- self.trackService.uploadFile(elemnent.file,
+ self.trackService.uploadFile(element.file,
self.globalGender,
self.globalArtist,
self.globalAlbum,
- elemnent.trackId,
- elemnent.title,
+ element.trackId,
+ element.title,
(count, totalTmp) => {
- // console.log("upload : " + count*100/totalTmp);
+ // console.log("upload : " + count*100/totalTmp);
self.upload.mediaSendSize = count;
self.upload.mediaSize = totalTmp;
})
.then((response) => {
- console.log(`get response of track : ${ JSON.stringify(response, null, 2)}`);
+ console.log(`get response of track : ${JSON.stringify(response, null, 2)}`);
sendDone();
}).catch((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...');
- errorOccured(JSON.stringify(response, null, 2));
+ errorOccurred(JSON.stringify(response, null, 2));
});
}
- public checkSimilarString(valueA:string, valueB:string): boolean {
+ public checkSimilarString(valueA: string, valueB: string): boolean {
let valueAL = valueA.toLowerCase();
let valueBL = valueB.toLowerCase();
valueAL = valueAL.replace(/[ \t\n\r-_#~@]/g, '');
valueBL = valueBL.replace(/[ \t\n\r-_#~@]/g, '');
- if(valueAL === valueBL) {
+ if (valueAL === valueBL) {
return true;
}
- if(valueAL.startsWith(valueBL)) {
+ if (valueAL.startsWith(valueBL)) {
return true;
}
- if(valueBL.startsWith(valueAL)) {
+ if (valueBL.startsWith(valueAL)) {
return true;
}
return false;
}
- checkConcordence():void {
- if(isNullOrUndefined(this.parsedElement)) {
+ checkConcordance(): void {
+ if (isNullOrUndefined(this.parsedElement)) {
return;
}
// ckear checker
- for(let iii = 0; iii < this.parsedElement.length; iii++) {
+ for (let iii = 0; iii < this.parsedElement.length; iii++) {
this.parsedElement[iii].nameDetected = false;
- this.parsedElement[iii].episodeDetected = false;
+ this.parsedElement[iii].trackIdDetected = false;
}
- if(isNullOrUndefined(this.listFileInBdd)) {
+ if (isNullOrUndefined(this.listFileInBdd)) {
return;
}
- for(let iii = 0; iii < this.listFileInBdd.length; iii++) {
+ for (let iii = 0; iii < this.listFileInBdd.length; iii++) {
this.listFileInBdd[iii].nameDetected = false;
- this.listFileInBdd[iii].episodeDetected = false;
+ this.listFileInBdd[iii].trackIdDetected = false;
}
- for(let iii = 0; iii < this.parsedElement.length; iii++) {
- for(let jjj = 0; jjj < this.listFileInBdd.length; jjj++) {
- if(this.checkSimilarString(this.parsedElement[iii].title, this.listFileInBdd[jjj].name)) {
+ for (let iii = 0; iii < this.parsedElement.length; iii++) {
+ for (let jjj = 0; jjj < this.listFileInBdd.length; jjj++) {
+ if (this.checkSimilarString(this.parsedElement[iii].title, this.listFileInBdd[jjj].name)) {
this.parsedElement[iii].nameDetected = true;
this.listFileInBdd[jjj].nameDetected = true;
}
- if(this.parsedElement[iii].trackId === this.listFileInBdd[jjj].episode) {
- this.parsedElement[iii].episodeDetected = true;
- this.listFileInBdd[jjj].episodeDetected = true;
+ if (this.parsedElement[iii].trackId === this.listFileInBdd[jjj].episode) {
+ this.parsedElement[iii].trackIdDetected = true;
+ this.listFileInBdd[jjj].trackIdDetected = true;
}
}
}
@@ -511,13 +507,13 @@ export class UploadScene implements OnInit {
updateListOfTrackToCheck(): void {
// No artist ID set ==> nothing to do.
- if(isNullOrUndefined(this.artistId)) {
+ if (isNullOrUndefined(this.artistId)) {
this.listFileInBdd = undefined;
return;
}
let self = this;
// no album check only the artist files.
- if(isNullOrUndefined(this.globalAlbum)) {
+ if (isNullOrUndefined(this.globalAlbum)) {
console.error(`NO ALBUM ==> check artist ID...`);
self.artistService.getAllTracks(self.artistId)
.then((response: any[]) => {
@@ -526,7 +522,7 @@ export class UploadScene implements OnInit {
// for (let iii = 0; iii
{
self.listFileInBdd = undefined;
});
@@ -539,14 +535,14 @@ export class UploadScene implements OnInit {
this.artistService.getAlbum(this.artistId)
.then((response: any[]) => {
console.log(`find album: ${JSON.stringify(response, null, 2)}`);
- for(let iii = 0; iii < response.length; iii++) {
+ for (let iii = 0; iii < response.length; iii++) {
// console.log(" - " + JSON.stringify(response[iii]) + 'compare with : ' + JSON.stringify(self.globalAlbum));
- if(response[iii].name === `${self.globalAlbum}`) {
+ if (response[iii].name === `${self.globalAlbum}`) {
self.albumId = response[iii].id;
break;
}
}
- if(isNullOrUndefined(self.albumId)) {
+ if (isNullOrUndefined(self.albumId)) {
return;
}
self.albumService.getTrack(self.albumId)
@@ -557,7 +553,7 @@ export class UploadScene implements OnInit {
// for (let iii = 0; iii {
self.listFileInBdd = undefined;
});
@@ -567,19 +563,19 @@ export class UploadScene implements OnInit {
}
eventPopUpAlbum(event: string): void {
- console.log(`GET event: ${ event}`);
+ console.log(`GET event: ${event}`);
this.popInService.close('popin-new-album');
}
eventPopUpArtist(event: string): void {
- console.log(`GET event: ${ event}`);
+ console.log(`GET event: ${event}`);
this.popInService.close('popin-new-artist');
}
eventPopUpType(event: string): void {
- console.log(`GET event: ${ event}`);
+ console.log(`GET event: ${event}`);
this.popInService.close('popin-new-type');
}
eventPopUpPlaylist(event: string): void {
- console.log(`GET event: ${ event}`);
+ console.log(`GET event: ${event}`);
this.popInService.close('popin-new-playlist');
}
diff --git a/front/src/common b/front/src/common
index 39b97f7..147a955 160000
--- a/front/src/common
+++ b/front/src/common
@@ -1 +1 @@
-Subproject commit 39b97f7c06e793ae05b6bad94d111adb878c9b7e
+Subproject commit 147a955b195eb7c90e445d404f043d9a363087ca
diff --git a/front/src/polyfills.ts b/front/src/polyfills.ts
deleted file mode 100644
index 64c24d4..0000000
--- a/front/src/polyfills.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-/**
- * This file includes polyfills needed by Angular and is loaded before the app.
- * You can add your own extra polyfills to this file.
- *
- * This file is divided into 2 sections:
- * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
- * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
- * file.
- *
- * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
- * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
- * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
- *
- * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
- */
-
-/***************************************************************************************************
- * BROWSER POLYFILLS
- */
-
-/** IE9, IE10 and IE11 requires all of the following polyfills. **/
-// import 'core-js/es6/symbol';
-// import 'core-js/es6/object';
-// import 'core-js/es6/function';
-// import 'core-js/es6/parse-int';
-// import 'core-js/es6/parse-float';
-// import 'core-js/es6/number';
-// import 'core-js/es6/math';
-// import 'core-js/es6/string';
-// import 'core-js/es6/date';
-// import 'core-js/es6/array';
-// import 'core-js/es6/regexp';
-// import 'core-js/es6/map';
-// import 'core-js/es6/weak-map';
-// import 'core-js/es6/set';
-
-/** IE10 and IE11 requires the following for NgClass support on SVG elements */
-// import 'classlist.js'; // Run `npm install --save classlist.js`.
-
-/** IE10 and IE11 requires the following for the Reflect API. */
-// import 'core-js/es6/reflect';
-
-//import 'babel-polyfill';
-
-/** Evergreen browsers require these. **/
-// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
-//import 'core-js/es7/reflect';
-
-
-/**
- * Required to support Web Animations `@angular/platform-browser/animations`.
- * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation
- **/
-// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
-
-
-
-/***************************************************************************************************
- * Zone JS is required by default for Angular itself.
- */
-import 'zone.js/dist/zone'; // Included with Angular CLI.
-
-
-/***************************************************************************************************
- * APPLICATION IMPORTS
- */
\ No newline at end of file