From b397a798eaeca68d7bfac16e79a33c6ec0116cd2 Mon Sep 17 00:00:00 2001 From: !+VinZ+! Date: Tue, 9 May 2023 19:03:30 +0200 Subject: [PATCH] fix(Deezer) : Fix deezer latence --- PLogger/MusiQualiAuthAccess_log.txt | 6 ++++++ .../admin/controllers/rest/MusicRestController.java | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/PLogger/MusiQualiAuthAccess_log.txt b/PLogger/MusiQualiAuthAccess_log.txt index 7777471..528da15 100644 --- a/PLogger/MusiQualiAuthAccess_log.txt +++ b/PLogger/MusiQualiAuthAccess_log.txt @@ -15,3 +15,9 @@ INFO [09-05-2023 09:37:49] : vincent@jeannin.ch has been successfully logged in INFO [09-05-2023 09:38:23] : vincent.jeannin@he-arc.ch has been successfully logged in WARNING [09-05-2023 09:38:41] : vincent@jeannin.ch tried to login but provides bad credentials INFO [09-05-2023 09:38:49] : admin@musiquali.ch has been successfully logged in +WARNING [09-05-2023 18:25:01] : nmbkmbm@jbjkrhb.j tried to login but provides bad credentials +INFO [09-05-2023 18:25:25] : vincent@jeannin.ch has been successfully logged in +INFO [09-05-2023 18:27:39] : vincent.jeannin@he-arc.ch has been successfully logged in +INFO [09-05-2023 18:28:57] : admin@musiquali.ch has been successfully logged in +WARNING [09-05-2023 18:30:58] : vincent@jeannin.ch tried to login but provides bad credentials +INFO [09-05-2023 18:31:06] : vincent.jeannin@he-arc.ch has been successfully logged in diff --git a/PMusicAdmin/src/main/java/ch/hearc/spring/musiquali/admin/controllers/rest/MusicRestController.java b/PMusicAdmin/src/main/java/ch/hearc/spring/musiquali/admin/controllers/rest/MusicRestController.java index 065bd50..afe2fab 100644 --- a/PMusicAdmin/src/main/java/ch/hearc/spring/musiquali/admin/controllers/rest/MusicRestController.java +++ b/PMusicAdmin/src/main/java/ch/hearc/spring/musiquali/admin/controllers/rest/MusicRestController.java @@ -184,6 +184,14 @@ private static Music fetchToMusic(DbMusic music) Genre genre = DeezerApi.genres.getById(g.getGenreId()).execute(); Set musics = g.getMusics().stream()// .map(m -> { + try + { + Thread.sleep(100); + } + catch (InterruptedException e) + { + } + // Gets some informations with Deezer Track mTrack = DeezerApi.tracks.getById(music.getTrackId()).execute();