19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# File 'lib/data_services/program.rb', line 19
def populate program_hash
@tms_guide_id = program_hash["tmsGuideId"]
@tms_program_id = program_hash["tmsProgramId"]
@call_sign = program_hash["callSign"]
@vod_tms_guide_id = program_hash["vodTmsSeriesId"]
@title = program_hash["title"]
@short_desc = program_hash["shortDesc"]
@icons = program_hash["icons"]
meta_data = program_hash["metadata"]
unless (meta_data.nil?)
@tms_series_id = meta_data["tmsSeriesId"]
@season = meta_data["season"]
@episode = meta_data["episode"]
@episode_title = meta_data["title"]
@type = meta_data["type"]
end
@start_time_sec = program_hash["startTimeSec"]
@duration_min = program_hash["durationMinutes"]
if (! @start_time_sec.nil? && ! @duration_min.nil?)
sec = @duration_min.to_i * 60
@end_time = @start_time_sec + sec
end
@genres = program_hash["genres"]
@rating = program_hash["rating"]
@ratings_blocked = program_hash["ratingsBlocked"]
end
|