Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPG "Geen uitzending" #18

Open
timrijckaert opened this issue Feb 11, 2022 · 0 comments
Open

EPG "Geen uitzending" #18

timrijckaert opened this issue Feb 11, 2022 · 0 comments
Labels
EPG What's up next GO PLAY Umbrella brand for Play4, Play5, Play6 or Play7

Comments

@timrijckaert
Copy link
Owner

timrijckaert commented Feb 11, 2022

EPG data contains "Geen uitzending" en.
It returns this information like this:

[
  {
    "program_title": "Geen uitzending",
    "episode_title": null,
    "original_title": null,
    "episode_nr": null,
    "season": null,
    "genre": "Informatief",
    "timestamp": 1644568800,
    "date_string": "2022-02-11",
    "time_string": "09:40",
    "won_id": "10126588914276527",
    "won_program_id": null,
    "program_concept": null,
    "content_episode": null,
    "duration": 7200
  },
  ...
]

Since we are using one common model for EPG data.
We would have to make a lot of fields listed as nullable for the Geen uitzending case. 🤔

@Serializable
public data class EpgProgram(
    @SerialName("program_title") val programTitle: String? = null,
    @SerialName("episode_title") val episodeTitle: String? = null,
    @SerialName("original_title") val originalTitle: String? = null,
    @SerialName("episode_nr") val episodeNr: String? = null,
    @SerialName("season") val season: String? = null,
    @SerialName("genre") val genre: String? = null,
    @SerialName("timestamp") val timestamp: Int,
    @SerialName("date_string") val date: String,
    @SerialName("time_string") val time: String,
    @SerialName("won_id") val wonId: String? = null,
    @SerialName("won_program_id") val wonProgramId: String? = null,
    @SerialName("program_concept") val programConcept: String? = null,
    @SerialName("content_episode") val contentEpisode: String? = null,
    @SerialName("duration") val duration: String,
    @SerialName("program_node") val programName: ProgramNode? = null,
    @SerialName("video_node") val videoNode: VideoNode? = null,
)

We could go 2 ways:

  • Filter out the Geen uitzending
    • This seems to be what Kodi is doing
  • Encode this case in the model
public sealed interface Epg {
    @Serializable
    public data class EpgProgram(
        val programTitle: String,
        val episodeTitle: String,
        val originalTitle: String,
        val episodeNr: String,
        val season: String,
        val genre: String,
        val timestamp: Int,
        val date: String,
        val time: String,
        val wonId: String,
        val wonProgramId: String,
        val programConcept: String,
        val contentEpisode: String,
        val duration: String,
        val programName: ProgramNode,
        val videoNode: VideoNode,
    ) : Epg

    public object NoBroadcast : Epg
}
@timrijckaert timrijckaert added GO PLAY Umbrella brand for Play4, Play5, Play6 or Play7 EPG What's up next labels Feb 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EPG What's up next GO PLAY Umbrella brand for Play4, Play5, Play6 or Play7
Projects
None yet
Development

No branches or pull requests

1 participant