From 7785272873cb70db1ddc01f26d5f17dbe8025447 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Bertholon Date: Wed, 13 Jan 2021 00:27:56 +0100 Subject: [PATCH 1/3] Bump version number --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d0c665b..8052e7a 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ ch.srgssr playfff - 28 + 29 jar pfff From 8d1b214b9502e3857ec7e79916677d19f3a1197c Mon Sep 17 00:00:00 2001 From: Pierre-Yves Bertholon Date: Wed, 13 Jan 2021 00:58:31 +0100 Subject: [PATCH 2/3] Fix switch RTS video recommendation to pfff recommendation --- docs/RECOMMENDATION.md | 2 +- .../srgssr/playfff/service/RecommendationService.java | 10 ++-------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/docs/RECOMMENDATION.md b/docs/RECOMMENDATION.md index 78d020c..a985668 100644 --- a/docs/RECOMMENDATION.md +++ b/docs/RECOMMENDATION.md @@ -25,7 +25,7 @@ The API doesn't not support paginations, therefore mobile applications didn't im | RTR audios | Pfff RE | Pfff RE | | RTR videos | Pfff RE | Pfff RE | | RTS audios | Pfff RE | Pfff RE | -| RTS videos | **RTS RE** | **RTS RE** | +| RTS videos | Pfff RE | Pfff RE | | SRF audios | Pfff RE | **SRF RE** | | SRF videos | Pfff RE | **SRF RE** | | SWI videos | Pfff RE | Pfff RE | diff --git a/src/main/java/ch/srgssr/playfff/service/RecommendationService.java b/src/main/java/ch/srgssr/playfff/service/RecommendationService.java index 1b23e6a..b28cf5c 100644 --- a/src/main/java/ch/srgssr/playfff/service/RecommendationService.java +++ b/src/main/java/ch/srgssr/playfff/service/RecommendationService.java @@ -39,24 +39,18 @@ public RecommendedList getRecommendedUrns(String purpose, String urnString, bool switch (urn.getMam()) { case SRF: return srfRecommendedList(purpose, urnString, standalone); - case RTS: case RSI: case RTR: + case RTS: case SWI: return pfffRecommendedList(urnString, urn.getMediaType(), standalone); } } else { switch (urn.getMam()) { - case RTS: - if (urn.getMediaType() == MediaType.VIDEO) { - return rtsVideoRecommendedList(purpose, urnString, standalone); - } else if (urn.getMediaType() == MediaType.AUDIO) { - return pfffRecommendedList(urnString, MediaType.AUDIO, standalone); - } - break; case RSI: case RTR: + case RTS: case SRF: case SWI: return pfffRecommendedList(urnString, urn.getMediaType(), standalone); From a788b85aaef5102bc783ca97a9aef677afef6627 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Bertholon Date: Wed, 13 Jan 2021 01:08:43 +0100 Subject: [PATCH 3/3] Update unit tests, according to the new recommendation engine choice --- .../srgssr/playfff/controller/RecommendationServiceTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/ch/srgssr/playfff/controller/RecommendationServiceTests.java b/src/test/java/ch/srgssr/playfff/controller/RecommendationServiceTests.java index 8663bf1..bfbe3dd 100644 --- a/src/test/java/ch/srgssr/playfff/controller/RecommendationServiceTests.java +++ b/src/test/java/ch/srgssr/playfff/controller/RecommendationServiceTests.java @@ -24,7 +24,7 @@ public void getRecommendedUrnsContinuousplaybackRTSVideoTest() { RecommendedList recommendedList = recommendationService.getRecommendedUrns(purpose, mediaURN, standalone); Assert.assertNotNull(recommendedList.getRecommendationId()); - Assert.assertTrue(recommendedList.getRecommendationId().startsWith("net.azure-api.rts-datalab:")); + Assert.assertTrue(recommendedList.getRecommendationId().startsWith("ch.srgssr.playfff:EpisodeComposition/LatestByShow/")); assertValidList(recommendedList); } @@ -36,7 +36,7 @@ public void getRecommendedUrnsContinuousplaybackStandaloneRTSVideoTest() { RecommendedList recommendedList = recommendationService.getRecommendedUrns(purpose, mediaURN, standalone); Assert.assertNotNull(recommendedList.getRecommendationId()); - Assert.assertTrue(recommendedList.getRecommendationId().startsWith("net.azure-api.rts-datalab:")); + Assert.assertTrue(recommendedList.getRecommendationId().startsWith("ch.srgssr.playfff:EpisodeComposition/LatestByShow/")); assertValidList(recommendedList); }