2 # Genre types taken from DVB standards documentation
4 # some broadcaster do define other types so this list
5 # may grow or be replaced..
7 maintype = [ _("Reserved"),
9 _("News Current Affairs"),
13 _("Music/Ballet/Dance"),
15 _("Social/Political/Economics"),
16 _("Education/Science/..."),
24 _("movie/drama (general)"),
25 _("detective/thriller"),
26 _("adventure/western/war"),
27 _("science fiction/fantasy/horror"),
29 _("soap/melodram/folkloric"),
31 _("serious/classical/religious/historical movie/drama"),
32 _("adult movie/drama")]
34 # News Current Affairs
36 _("news/current affairs (general)"),
37 _("news/weather report"),
40 _("discussion/interview/debate")]
44 _("show/game show (general)"),
45 _("game show/quiz/contest"),
51 _("sports (general)"),
66 _("childrens's/youth program (general)"),
67 _("pre-school children's program"),
68 _("entertainment (6-14 year old)"),
69 _("entertainment (10-16 year old)"),
70 _("information/education/school program"),
75 _("music/ballet/dance (general)"),
77 _("serious music/classic music"),
78 _("folk/traditional music"),
85 _("arts/culture (without music, general)"),
89 _("popular culture/traditional arts"),
92 _("experimental film/video"),
93 _("broadcasting/press"),
95 _("arts/culture magazine"),
98 # Social/Political/Economics
100 _("social/political issues/economics (general)"),
101 _("magazines/reports/documentary"),
102 _("economics/social advisory"),
103 _("remarkable people")]
105 # Education/Science/...
107 _("education/science/factual topics (general)"),
108 _("nature/animals/environment"),
109 _("technology/natural science"),
110 _("medicine/physiology/psychology"),
111 _("foreign countries/expeditions"),
112 _("social/spiritual science"),
113 _("further education"),
118 _("leisure hobbies (general)"),
122 _("fitness & health"),
124 _("advertisement/shopping"),
129 _("original language"),
134 def getGenreStringMain(hn, ln):
136 # return _("Undefined content")
138 return _("User defined")
139 if 0 < hn < len(maintype):
141 # return _("Reserved") + " " + str(hn)
144 def getGenreStringSub(hn, ln):
146 # return _("Undefined content") + " " + str(ln)
148 return _("User defined") + " " + str(ln)
149 if 0 < hn < len(maintype):
151 return _("User defined")
152 if ln < len(subtype[hn]):
153 return subtype[hn][ln]
154 # return _("Reserved") " " + str(ln)
155 # return _("Reserved") + " " + str(hn) + "," + str(ln)
158 def getGenreStringLong(hn, ln):
160 # return _("Undefined content") + " " + str(ln)
162 return _("User defined") + " " + str(ln)
163 if 0 < hn < len(maintype):
164 return maintype[hn] + ": " + getGenreStringSub(hn, ln)
165 # return _("Reserved") + " " + str(hn) + "," + str(ln)