SRGSSR / srgdataprovider-apple

A library to retrieve SRG SSR unified metadata
MIT License
0 stars 1 forks source link

Program image is nullable #48

Closed pyby closed 1 year ago

pyby commented 1 year ago

Issue type

Incorrect API implementation

Description of the problem

From IL Swagger:

program.imageUrl is unable.

Environment information

pyby commented 1 year ago

Play SRG apps needs to no trust program image urls if they are "fallback urls.

Option 1: Added also internally imageIsFallbackUrl boolean to SRGProgram to no trust fallback program image and return nil in this case.

An internal SRG ticket created to maybe fix it later.

Example: https://il.srgssr.ch/integrationlayer/2.0/srf/programGuideNonSrg/tv/byDate/2023-07-16?reduced=true&vector=appplay

{
     "title" : "Schwaben & Altbayern",
     "startTime" : "2023-07-16T17:45:00+02:00",
     "endTime" : "2023-07-16T18:30:00+02:00",
     "imageUrl" : "https://il.srgssr.ch/images/https://il.srgssr.ch/image-service/dynamic/ac2b84e.svg/format/png",
     "imageIsFallbackUrl" : true,
     "subtitle" : "Regionalmagazin",
     "isFollowUp" : false
}

https://il.srgssr.ch/images/?imageUrl=https://il.srgssr.ch/images/https://il.srgssr.ch/image-service/dynamic/ac2b84e.svg/format/png&format=png&width=480

21.07.2023: blurred image in response body.

If not accepted: Option 2: Expose publicly the boolean imageIsFallbackUrl in SRGProgram.