From 7cdc702d82c0aeaa8fdefe7e82de0bdab119ee40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Loi=CC=88c=20Dumas?= Date: Fri, 5 Apr 2024 11:43:05 +0200 Subject: [PATCH] Remove implementation of SRGImageMetadata for Program, as imageUrl variable is nullable. SRGImageMetadata.imageUrl shouldn't be nullable as image url for other il objects is non null. --- buildSrc/src/main/kotlin/Config.kt | 2 +- .../integrationlayer/data/remote/Program.kt | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/buildSrc/src/main/kotlin/Config.kt b/buildSrc/src/main/kotlin/Config.kt index 76ceede..c0b9cd9 100644 --- a/buildSrc/src/main/kotlin/Config.kt +++ b/buildSrc/src/main/kotlin/Config.kt @@ -5,7 +5,7 @@ object Config { const val major = 0 const val minor = 8 - const val patch = 2 + const val patch = 3 const val versionName = "$major.$minor.$patch" const val maven_group = "ch.srg.data.provider" diff --git a/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/Program.kt b/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/Program.kt index 544fb1c..19c881d 100644 --- a/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/Program.kt +++ b/data/src/main/java/ch/srg/dataProvider/integrationlayer/data/remote/Program.kt @@ -21,10 +21,10 @@ data class Program( val endTime: Date, override val lead: String? = null, override val description: String? = null, - override val imageUrl: ImageUrl, - override val imageFocalPoint: FocalPoint? = null, - override val imageTitle: String? = null, - override val imageCopyright: String? = null, + val imageUrl: ImageUrl? = null, + val imageFocalPoint: FocalPoint? = null, + val imageTitle: String? = null, + val imageCopyright: String? = null, val url: String? = null, val show: Show? = null, val mediaUrn: String? = null, @@ -54,7 +54,7 @@ data class Program( val rebroadcastDescription: String? = null, val channelTitle: String? = null, val channelUrn: String? = null -) : SRGImageMetadata, SRGMetadata { +) : SRGMetadata { fun isDateInProgramTime(date: Date): Boolean { return date.after(startTime) && date.before(endTime)