[DEV] all is operational

This commit is contained in:
Edouard DUPIN 2024-04-07 19:13:06 +02:00
parent 95e2e03686
commit eb3cd1b1fe
5 changed files with 21 additions and 28 deletions

View File

@ -31,7 +31,7 @@
"rxjs": "^7.8.1",
"zone.js": "^0.14.4",
"zod": "3.22.4",
"@kangaroo-and-rabbit/kar-cw": "^0.1.5"
"@kangaroo-and-rabbit/kar-cw": "^0.1.7"
},
"devDependencies": {
"@angular-devkit/build-angular": "^17.3.1",

View File

@ -40,7 +40,7 @@ export class ElementPlayerAudioComponent implements OnInit {
public name: string = 'rr';
public description: string;
public counttrack: number;
public countTrack: number;
public covers: string[];
@ -108,7 +108,6 @@ export class ElementPlayerAudioComponent implements OnInit {
console.log(`get response of video : ${JSON.stringify(response, null, 2)}`);
self.currentLMedia = response;
self.dataTitle = response.name;
console.log("aaa");
if (!isNullOrUndefined(response.albumId)) {
this.albumService.get(response.albumId)
.then((response2: Album) => {
@ -117,22 +116,21 @@ export class ElementPlayerAudioComponent implements OnInit {
})
.catch(() => { });
}
console.log("aaa");
if (!isNullOrUndefined(response.artists) && isArray(response.artists) && response.artists.length > 0) {
this.artistService.get(response.artists[0])
.then((response2: Artist) => {
self.dataAuthor = response2.name;
})
.catch(() => { });
} console.log("aaa");
}
if (isNullOrUndefined(self.currentLMedia)) {
console.log("Can not retrieve the media ...")
return;
} console.log("aaa");
}
if (isNullOrUndefined(self.currentLMedia.dataId)) {
console.log("Can not retrieve the media ... null or undefined data ID")
return;
} console.log("aaa");
}
self.mediaSource = self.dataService.getUrl(self.currentLMedia.dataId, "unknownMediaName.webm");
}).catch((error) => {
console.error(`error not unmanaged in audio player ... 111 ${error}`);

View File

@ -40,8 +40,11 @@ export class DataService {
params: {
dataId
}
});//.replace("http://localhost:19080", "https://atria-soft.org");
});
console.log(`get URL = ${url}`);
if (environment?.replaceDataToRealServer === true) {
return url.replace("http://localhost:19080", "https://atria-soft.org");
}
return url;
}
const url = RESTUrl({
@ -54,8 +57,10 @@ export class DataService {
dataId,
optionalName
}
});//.replace("http://localhost:19080", "https://atria-soft.org");
console.log(`get URL = ${url}`);
});
if (environment?.replaceDataToRealServer === true) {
return url.replace("http://localhost:19080", "https://atria-soft.org");
}
return url;
}
/**
@ -79,7 +84,7 @@ export class DataService {
* @returns the url of the cover
*/
getThumbnailUrl(coverId: string): string {
return RESTUrl({
const url = RESTUrl({
restModel: {
endPoint: "data/thumbnail/{coverId}",
tokenInUrl: true,
@ -88,7 +93,11 @@ export class DataService {
params: {
coverId
}
});//.replace("http://localhost:19080", "https://atria-soft.org");
});
if (environment?.replaceDataToRealServer === true) {
return url.replace("http://localhost:19080", "https://atria-soft.org");
}
return url;
}
/**
* Retrieve the list thumbnail cover URL of a specific data id

View File

@ -31,22 +31,7 @@ export class TrackService extends GenericDataService<Track> {
const self = this;
this.setStore(new DataStore<Track>(() => this.lambdaGets()));
}
/*
insert(data: Track): Promise<Track> {
const self = this;
return new Promise((resolve, reject) => {
TrackResource.post({
restConfig: this.getRestConfig(),
data
}).then((value: Track) => {
self.dataStore.updateValue(value);
resolve(value);
}).catch((error) => {
reject(error);
});
});
}
*/
patch(id: number, data: Track): Promise<Track> {
const self = this;
return new Promise((resolve, reject) => {

View File

@ -37,6 +37,7 @@ const environment_local: Environment = {
ssoSignUp: `${serverSSOAddress}/karso/signup/karusic-dev/`,
ssoSignOut: `${serverSSOAddress}/karso/signout/karusic-dev/`,
tokenStoredInPermanentStorage: false,
replaceDataToRealServer: true,
};
const environment_full_local: Environment = {