- made the category collection cells dynamic - handled the category selection will call the episode api - solved activity indicator view at the splash start-up - handled the app lifecycle for live tv app going in foreground and background - handled play pause while the live tv view apperas and disappears - Made the likes and favourites dynamic on episode screen
106 lines
3.6 KiB
Swift
106 lines
3.6 KiB
Swift
//
|
|
// SeasonEpisodeListingDM.swift
|
|
// WOKA
|
|
//
|
|
// Created by Bilal on 21/06/2024.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
// MARK: - SeasonEpisodeListingDM
|
|
struct SeasonEpisodeListingDM: Codable {
|
|
let result: [ResultData]?
|
|
let totalRecords: Int?
|
|
|
|
enum CodingKeys: String, CodingKey {
|
|
case result
|
|
case totalRecords = "total_records"
|
|
}
|
|
|
|
// MARK: - Result
|
|
struct ResultData: Codable {
|
|
let id, watchShowsMasterID: Int?
|
|
let seasonNumber: String?
|
|
let noOfEpisodes: Int?
|
|
let seasonDescription: String?
|
|
let releaseYear: Int?
|
|
let seasonTitle: String?
|
|
let trailerURL: String?
|
|
let thumbnailPath: String?
|
|
let thumbnailImgURL: String?
|
|
let tagsKeyword, releaseDate, mediaType: String?
|
|
let seasonMoreDetails: [MoreDetail]?
|
|
let episodeData: [EpisodeDatum]?
|
|
let episodeTotalRecords: Int?
|
|
|
|
enum CodingKeys: String, CodingKey {
|
|
case id
|
|
case watchShowsMasterID = "watch_shows_master_id"
|
|
case seasonNumber = "season_number"
|
|
case noOfEpisodes = "no_of_episodes"
|
|
case seasonDescription = "season_description"
|
|
case releaseYear = "release_year"
|
|
case seasonTitle = "season_title"
|
|
case trailerURL = "trailer_url"
|
|
case thumbnailPath = "thumbnail_path"
|
|
case thumbnailImgURL = "thumbnail_img_url"
|
|
case tagsKeyword = "tags_keyword"
|
|
case releaseDate = "release_date"
|
|
case mediaType = "media_type"
|
|
case seasonMoreDetails = "season_more_details"
|
|
case episodeData = "episode_data"
|
|
case episodeTotalRecords = "episode_total_records"
|
|
}
|
|
}
|
|
|
|
// MARK: - EpisodeDatum
|
|
struct EpisodeDatum: Codable {
|
|
let id, watchShowsMasterID, seasonMasterID, episodeNumber: Int?
|
|
let episodeTitle, episodeDescription: String?
|
|
let thumbnailPath: String?
|
|
let thumbnailImgURL: String?
|
|
let episodeURL: String?
|
|
let languageMasterID: Int?
|
|
let tagsKeyword, episodeDuration, releaseDate: String?
|
|
let contentMoreDetails: [MoreDetail]?
|
|
|
|
enum CodingKeys: String, CodingKey {
|
|
case id
|
|
case watchShowsMasterID = "watch_shows_master_id"
|
|
case seasonMasterID = "season_master_id"
|
|
case episodeNumber = "episode_number"
|
|
case episodeTitle = "episode_title"
|
|
case episodeDescription = "episode_description"
|
|
case thumbnailPath = "thumbnail_path"
|
|
case thumbnailImgURL = "thumbnail_img_url"
|
|
case episodeURL = "episode_url"
|
|
case languageMasterID = "language_master_id"
|
|
case tagsKeyword = "tags_keyword"
|
|
case episodeDuration = "episode_duration"
|
|
case releaseDate = "release_date"
|
|
case contentMoreDetails = "content_more_details"
|
|
}
|
|
}
|
|
|
|
// MARK: - MoreDetail
|
|
struct MoreDetail: Codable {
|
|
let id, contentID, postType, languageMasterID: Int?
|
|
let title, description, tagsKeywords: String?
|
|
let contentHDURL, contentSDURL, trailerHDURL, trailerSDURL: String?
|
|
|
|
enum CodingKeys: String, CodingKey {
|
|
case id
|
|
case contentID = "content_id"
|
|
case postType = "post_type"
|
|
case languageMasterID = "language_master_id"
|
|
case title, description
|
|
case tagsKeywords = "tags_keywords"
|
|
case contentHDURL = "content_hd_url"
|
|
case contentSDURL = "content_sd_url"
|
|
case trailerHDURL = "trailer_hd_url"
|
|
case trailerSDURL = "trailer_sd_url"
|
|
}
|
|
}
|
|
|
|
}
|