Update EPG Cache(thanks to open source community)
[vuplus_dvbapp] / lib / python / Components / Converter / genre.py
1 #
2 # Genre types taken from DVB standards documentation
3 #
4 # some broadcaster do define other types so this list
5 # may grow or be replaced..
6 #
7 maintype = [    _("Reserved"),
8                 _("Movie/Drama"),
9                 _("News Current Affairs"),
10                 _("Show Games show"),
11                 _("Sports"),
12                 _("Children/Youth"),
13                 _("Music/Ballet/Dance"),
14                 _("Arts/Culture"),
15                 _("Social/Political/Economics"),
16                 _("Education/Science/..."),
17                 _("Leisure hobbies"),
18                 _("Other")]
19
20
21 subtype = {}
22 # Movie/Drama
23 subtype[1] = [
24                                         _("movie/drama (general)"),
25                                         _("detective/thriller"),
26                                         _("adventure/western/war"),
27                                         _("science fiction/fantasy/horror"),
28                                         _("comedy"),
29                                         _("soap/melodram/folkloric"),
30                                         _("romance"),
31                                         _("serious/classical/religious/historical movie/drama"),
32                                         _("adult movie/drama")]
33
34 # News Current Affairs
35 subtype[2] = [
36                                         _("news/current affairs (general)"),
37                                         _("news/weather report"),
38                                         _("news magazine"),
39                                         _("documentary"),
40                                         _("discussion/interview/debate")]
41
42 # Show Games show
43 subtype[3] = [
44                                         _("show/game show (general)"),
45                                         _("game show/quiz/contest"),
46                                         _("variety show"),
47                                         _("talk show")]
48
49 # Sports
50 subtype[4] = [
51                                         _("sports (general)"),
52                                         _("special events"),
53                                         _("sports magazine"),
54                                         _("football/soccer"),
55                                         _("tennis/squash"),
56                                         _("team sports"),
57                                         _("athletics"),
58                                         _("motor sport"),
59                                         _("water sport"),
60                                         _("winter sport"),
61                                         _("equestrian"),
62                                         _("martial sports")]
63
64 # Children/Youth
65 subtype[5] = [
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"),
71                                         _("cartoon/puppets")]
72
73 # Music/Ballet/Dance
74 subtype[6] = [
75                                         _("music/ballet/dance (general)"),
76                                         _("rock/pop"),
77                                         _("serious music/classic music"),
78                                         _("folk/traditional music"),
79                                         _("jazz"),
80                                         _("musical/opera"),
81                                         _("ballet")]
82
83 # Arts/Culture
84 subtype[7] = [
85                                         _("arts/culture (without music, general)"),
86                                         _("performing arts"),
87                                         _("fine arts"),
88                                         _("religion"),
89                                         _("popular culture/traditional arts"),
90                                         _("literature"),
91                                         _("film/cinema"),
92                                         _("experimental film/video"),
93                                         _("broadcasting/press"),
94                                         _("new media"),
95                                         _("arts/culture magazine"),
96                                         _("fashion")]
97
98 # Social/Political/Economics
99 subtype[8] = [
100                                         _("social/political issues/economics (general)"),
101                                         _("magazines/reports/documentary"),
102                                         _("economics/social advisory"),
103                                         _("remarkable people")]
104
105 # Education/Science/...
106 subtype[9] = [
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"),
114                                         _("languages")]
115
116 # Leisure hobies
117 subtype[10] = [
118                                         _("leisure hobbies (general)"),
119                                         _("tourism/travel"),
120                                         _("handicraft"),
121                                         _("motoring"),
122                                         _("fitness & health"),
123                                         _("cooking"),
124                                         _("advertisement/shopping"),
125                                         _("gardening")]
126
127 # Other
128 subtype[11] = [
129                                         _("original language"),
130                                         _("black & white"),
131                                         _("unpublished"),
132                                         _("live broadcast")]
133
134 def getGenreStringMain(hn, ln):
135 #       if hn == 0:
136 #               return _("Undefined content")
137         if hn == 15:
138                 return _("User defined")
139         if 0 < hn < len(maintype):
140                 return maintype[hn]
141 #       return _("Reserved") + " " + str(hn)
142         return ""
143
144 def getGenreStringSub(hn, ln):
145 #       if hn == 0:
146 #               return _("Undefined content") + " " + str(ln)
147         if hn == 15:
148                 return _("User defined") + " " + str(ln)
149         if 0 < hn < len(maintype):
150                 if ln == 15:
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)
156         return ""
157
158 def getGenreStringLong(hn, ln):
159 #       if hn == 0:
160 #               return _("Undefined content") + " " + str(ln)
161         if hn == 15:
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)
166         return ""
167
168 #
169 # The End
170 #