Skip to content

Commit

Permalink
Merge pull request #51 from SRGSSR/develop
Browse files Browse the repository at this point in the history
Switch RTS recommendation to playfff reco engine 2/2
  • Loading branch information
pyby authored Jan 13, 2021
2 parents 70abe0a + a788b85 commit 1fca9c0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/RECOMMENDATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>ch.srgssr</groupId>
<artifactId>playfff</artifactId>
<version>28</version>
<version>29</version>
<packaging>jar</packaging>

<name>pfff</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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);
}

Expand Down

0 comments on commit 1fca9c0

Please sign in to comment.