diff --git a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/service/MediaCompositionDataSourceImpl.kt b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/service/MediaCompositionDataSourceImpl.kt index fe3af6d7b..78341b7d5 100644 --- a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/service/MediaCompositionDataSourceImpl.kt +++ b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/service/MediaCompositionDataSourceImpl.kt @@ -28,7 +28,7 @@ class MediaCompositionDataSourceImpl(private val mediaCompositionService: MediaC override suspend fun getMediaCompositionByUrn(urn: String): RemoteResult { return try { - val result = mediaCompositionService.getMediaCompositionByUrn(urn) + val result = mediaCompositionService.getMediaCompositionByUrn(urn, true) RemoteResult.Success(result) } catch (e: HttpException) { RemoteResult.Error(e, e.code()) diff --git a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/service/MediaCompositionService.kt b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/service/MediaCompositionService.kt index 62a1d15b5..a4b93b10c 100644 --- a/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/service/MediaCompositionService.kt +++ b/pillarbox-core-business/src/main/java/ch/srgssr/pillarbox/core/business/integrationlayer/service/MediaCompositionService.kt @@ -7,6 +7,7 @@ package ch.srgssr.pillarbox.core.business.integrationlayer.service import ch.srgssr.pillarbox.core.business.integrationlayer.data.MediaComposition import retrofit2.http.GET import retrofit2.http.Path +import retrofit2.http.Query /** * Retrofit media composition service from Integration layer @@ -16,8 +17,9 @@ interface MediaCompositionService { /** * Get MediaComposition by urn * - * @param urn of the content + * @param urn Urn of the content. + * @param onlyChapters Only chapters, no segments are delivered. */ @GET("integrationlayer/2.1/mediaComposition/byUrn/{urn}") - suspend fun getMediaCompositionByUrn(@Path("urn") urn: String): MediaComposition + suspend fun getMediaCompositionByUrn(@Path("urn") urn: String, @Query("onlyChapters") onlyChapters: Boolean = true): MediaComposition }