forked from Threadfin/Threadfin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstruct-xml.go
More file actions
177 lines (149 loc) · 4.16 KB
/
struct-xml.go
File metadata and controls
177 lines (149 loc) · 4.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
package src
import "encoding/xml"
// XMLTV : XMLTV Datei
type XMLTV struct {
Generator string `xml:"generator-info-name,attr"`
Source string `xml:"source-info-name,attr"`
XMLName xml.Name `xml:"tv"`
Channel []*Channel `xml:"channel"`
Program []*Program `xml:"programme"`
}
// Channel : Kanäle
type Channel struct {
ID string `xml:"id,attr"`
DisplayName []DisplayName `xml:"display-name"`
Icon Icon `xml:"icon"`
Live bool `xml:"live"`
Active bool `xml:"active"`
}
// DisplayName : Kanalname
type DisplayName struct {
Value string `xml:",chardata"`
}
// Icon : Senderlogo
type Icon struct {
Src string `xml:"src,attr"`
}
// Program : Programme
type Program struct {
Channel string `xml:"channel,attr"`
Start string `xml:"start,attr"`
Stop string `xml:"stop,attr"`
Title []*Title `xml:"title"`
SubTitle []*SubTitle `xml:"sub-title"`
Desc []*Desc `xml:"desc"`
Category []*Category `xml:"category"`
Country []*Country `xml:"country"`
EpisodeNum []*EpisodeNum `xml:"episode-num"`
Poster []Poster `xml:"icon"`
Credits Credits `xml:"credits,omitempty"` //`xml:",innerxml,omitempty"`
Rating []Rating `xml:"rating"`
StarRating []StarRating `xml:"star-rating"`
Language []*Language `xml:"language"`
Video Video `xml:"video"`
Date string `xml:"date"`
PreviouslyShown *PreviouslyShown `xml:"previously-shown"`
New *New `xml:"new"`
Live *Live `xml:"live"`
Premiere *Live `xml:"premiere"`
}
// Title : Programmtitel
type Title struct {
Lang string `xml:"lang,attr"`
Value string `xml:",chardata"`
}
// SubTitle : Kurzbeschreibung
type SubTitle struct {
Lang string `xml:"lang,attr"`
Value string `xml:",chardata"`
}
// Desc : Programmbeschreibung
type Desc struct {
Lang string `xml:"lang,attr"`
Value string `xml:",chardata"`
}
// Category : Kategorien
type Category struct {
Lang string `xml:"lang,attr"`
Value string `xml:",chardata"`
}
// Rating : Bewertung
type Rating struct {
System string `xml:"system,attr"`
Value string `xml:"value"`
Icon []Icon `xml:"icon"`
}
// StarRating : Bewertung / Kritiken
type StarRating struct {
Value string `xml:"value"`
System string `xml:"system,attr"`
}
// Language : Sprachen
type Language struct {
Value string `xml:",chardata"`
}
// Country : Länder
type Country struct {
Lang string `xml:"lang,attr"`
Value string `xml:",chardata"`
}
// EpisodeNum : Episodennummerierung
type EpisodeNum struct {
System string `xml:"system,attr"`
Value string `xml:",chardata"`
}
// Poster : Programmposter / Cover
type Poster struct {
Height string `xml:"height,attr"`
Src string `xml:"src,attr"`
Value string `xml:",chardata"`
Width string `xml:"width,attr"`
}
// Credits : Credits
type Credits struct {
Director []Director `xml:"director,omitempty"`
Actor []Actor `xml:"actor,omitempty"`
Writer []Writer `xml:"writer,omitempty"`
Presenter []Presenter `xml:"presenter,omitempty"`
Producer []Producer `xml:"producer,omitempty"`
}
// Director : Director
type Director struct {
Value string `xml:",chardata"`
}
// Actor : Actor
type Actor struct {
Value string `xml:",chardata"`
Role string `xml:"role,attr,omitempty"`
}
// Writer : Writer
type Writer struct {
Value string `xml:",chardata"`
}
// Presenter : Presenter
type Presenter struct {
Value string `xml:",chardata"`
}
// Producer : Producer
type Producer struct {
Value string `xml:",chardata"`
}
// Video : Video Metadaten
type Video struct {
Aspect string `xml:"aspect,omitempty"`
Colour string `xml:"colour,omitempty"`
Present string `xml:"present,omitempty"`
Quality string `xml:"quality,omitempty"`
}
// PreviouslyShown : Widerholung bzw. Erstausstrahlung
type PreviouslyShown struct {
Start string `xml:"start,attr"`
}
// New : Sendung als neu deklarieren
type New struct {
Value string `xml:",chardata"`
}
// Live : Sendung als Liveübertragung deklarieren
type Live struct {
Value string `xml:",chardata"`
}