forked from Threadfin/Threadfin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstruct-system.go
More file actions
367 lines (328 loc) · 11.8 KB
/
struct-system.go
File metadata and controls
367 lines (328 loc) · 11.8 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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
package src
import "threadfin/src/internal/imgcache"
// SystemStruct : Beinhaltet alle Systeminformationen
type SystemStruct struct {
Addresses struct {
DVR string
M3U string
XML string
}
APIVersion string
AppName string
ARCH string
BackgroundProcess bool
Branch string
Build string
Compatibility string
ConfigurationWizard bool
DBVersion string
Dev bool
DeviceID string
Domain string
PlexChannelLimit int
UnfilteredChannelLimit int
FFmpeg struct {
DefaultOptions string
Path string
}
VLC struct {
DefaultOptions string
Path string
}
File struct {
Authentication string
M3U string
PMS string
Settings string
URLS string
XEPG string
XML string
}
Compressed struct {
GZxml string
}
Flag struct {
Branch string
Debug int
Info bool
Port string
Restore string
SSDP bool
}
Folder struct {
Backup string
Cache string
Config string
Data string
ImagesCache string
ImagesUpload string
Temp string
}
Hostname string
ImageCachingInProgress int
IPAddress string
IPAddressesList []string
IPAddressesV4 []string
IPAddressesV6 []string
Name string
OS string
ScanInProgress int
TimeForAutoUpdate string
Notification map[string]Notification
ServerProtocol struct {
API string
DVR string
M3U string
WEB string
XML string
}
GitHub struct {
Branch string
Repo string
Update bool
User string
TagName string
}
Update struct {
Git string
Name string
Github string
}
URLBase string
UDPxy string
Version string
WEB struct {
Menu []string
}
}
// GitStruct : Updateinformationen von GitHub
type GitStruct struct {
Filename string `json:"filename"`
Version string `json:"version"`
}
type GithubReleaseInfo struct {
TagName string `json:"tag_name"`
Prerelease bool `json:"prerelease"`
}
// DataStruct : Alle Daten werden hier abgelegt. (Lineup, XMLTV)
type DataStruct struct {
Cache struct {
Images *imgcache.Cache
ImagesCache []string
ImagesFiles []string
ImagesURLS []string
PMS map[string]string
StreamingURLS map[string]StreamInfo
XMLTV map[string]XMLTV
Streams struct {
Active []string
}
}
Filter []Filter
Playlist struct {
M3U struct {
Groups struct {
Text []string
Value []string
}
}
}
StreamPreviewUI struct {
Active []string
Inactive []string
}
Streams struct {
Active []interface{}
All []interface{}
Inactive []interface{}
}
XMLTV struct {
Files []string
Mapping map[string]interface{}
}
XEPG struct {
Channels map[string]interface{}
ChannelsFiltered map[string]interface{}
XEPGCount int64
}
}
// Filter : Wird für die Filterregeln verwendet
type Filter struct {
CaseSensitive bool
LiveEvent bool
Rule string
Type string
}
// XEPGChannelStruct : XEPG Struktur
type XEPGChannelStruct struct {
FileM3UID string `json:"_file.m3u.id"`
FileM3UName string `json:"_file.m3u.name"`
FileM3UPath string `json:"_file.m3u.path"`
GroupTitle string `json:"group-title"`
Name string `json:"name"`
TvgID string `json:"tvg-id"`
TvgLogo string `json:"tvg-logo"`
TvgName string `json:"tvg-name"`
TvgChno string `json:"tvg-chno"`
URL string `json:"url"`
UUIDKey string `json:"_uuid.key"`
UUIDValue string `json:"_uuid.value,omitempty"`
Values string `json:"_values"`
XActive bool `json:"x-active"`
XCategory string `json:"x-category"`
XChannelID string `json:"x-channelID"`
XEPG string `json:"x-epg"`
XGroupTitle string `json:"x-group-title"`
XMapping string `json:"x-mapping"`
XmltvFile string `json:"x-xmltv-file"`
XPpvExtra string `json:"x-ppv-extra"`
XBackupChannel1 string `json:"x-backup-channel-1"`
XBackupChannel2 string `json:"x-backup-channel-2"`
XBackupChannel3 string `json:"x-backup-channel-3"`
XHideChannel bool `json:"x-hide-channel"`
XName string `json:"x-name"`
XUpdateChannelIcon bool `json:"x-update-channel-icon"`
XUpdateChannelName bool `json:"x-update-channel-name"`
XDescription string `json:"x-description"`
Live bool `json:"live"`
IsBackupChannel bool `json:"is_backup_channel"`
BackupChannel1 *BackupStream `json:"backup_channel_1"`
BackupChannel2 *BackupStream `json:"backup_channel_2"`
BackupChannel3 *BackupStream `json:"backup_channel_3"`
ChannelUniqueID string `json:"channelUniqueID"`
}
// M3UChannelStructXEPG : M3U Struktur für XEPG
type M3UChannelStructXEPG struct {
FileM3UID string `json:"_file.m3u.id,required"`
FileM3UName string `json:"_file.m3u.name,required"`
FileM3UPath string `json:"_file.m3u.path,required"`
GroupTitle string `json:"group-title,required"`
Name string `json:"name,required"`
TvgID string `json:"tvg-id,required"`
TvgLogo string `json:"tvg-logo,required"`
TvgChno string `json:"tvg-chno"`
TvgName string `json:"tvg-name,required"`
URL string `json:"url,required"`
UUIDKey string `json:"_uuid.key,required"`
UUIDValue string `json:"_uuid.value,required"`
Values string `json:"_values,required"`
LiveEvent string `json:"liveEvent,required"`
ChannelUniqueID string `json:"channelUniqueID"`
}
// FilterStruct : Filter Struktur
type FilterStruct struct {
Active bool `json:"active"`
LiveEvent bool `json:"liveEvent"`
CaseSensitive bool `json:"caseSensitive"`
Description string `json:"description"`
Exclude string `json:"exclude"`
Filter string `json:"filter"`
Include string `json:"include"`
Name string `json:"name"`
Rule string `json:"rule,omitempty"`
Type string `json:"type"`
StartingNumber string `json:"startingNumber"`
Category string `json:"x-category"`
}
// StreamingURLS : Informationen zu allen streaming URL's
type StreamingURLS struct {
Streams map[string]StreamInfo `json:"channels,required"`
}
// StreamInfo : Informationen zum Kanal für die streaming URL
type StreamInfo struct {
ChannelNumber string `json:"channelNumber,required"`
Name string `json:"name,required"`
PlaylistID string `json:"playlistID,required"`
URL string `json:"url,required"`
BackupChannel1 *BackupStream `json:"backup_channel_1,required"`
BackupChannel2 *BackupStream `json:"backup_channel_2,required"`
BackupChannel3 *BackupStream `json:"backup_channel_3,required"`
URLid string `json:"urlID,required"`
}
// Notification : Notifikationen im Webinterface
type Notification struct {
Headline string `json:"headline,required"`
Message string `json:"message,required"`
New bool `json:"new,required"`
Time string `json:"time,required"`
Type string `json:"type,required"`
}
// SettingsStruct : Inhalt der settings.json
type SettingsStruct struct {
API bool `json:"api"`
AuthenticationAPI bool `json:"authentication.api"`
AuthenticationM3U bool `json:"authentication.m3u"`
AuthenticationPMS bool `json:"authentication.pms"`
AuthenticationWEB bool `json:"authentication.web"`
AuthenticationXML bool `json:"authentication.xml"`
BackupKeep int `json:"backup.keep"`
BackupPath string `json:"backup.path"`
Branch string `json:"git.branch,omitempty"`
Buffer string `json:"buffer"`
BufferSize int `json:"buffer.size.kb"`
BufferTimeout float64 `json:"buffer.timeout"`
CacheImages bool `json:"cache.images"`
EpgSource string `json:"epgSource"`
FFmpegOptions string `json:"ffmpeg.options"`
FFmpegPath string `json:"ffmpeg.path"`
FFmpegForceHttp bool `json:"ffmpeg.forceHttp"`
VLCOptions string `json:"vlc.options"`
VLCPath string `json:"vlc.path"`
FileM3U []string `json:"file,omitempty"` // Beim Wizard wird die M3U in ein Slice gespeichert
FileXMLTV []string `json:"xmltv,omitempty"` // Altes Speichersystem der Provider XML Datei Slice (Wird für die Umwandlung auf das neue benötigt)
Files struct {
HDHR map[string]interface{} `json:"hdhr"`
M3U map[string]interface{} `json:"m3u"`
XMLTV map[string]interface{} `json:"xmltv"`
} `json:"files"`
FilesUpdate bool `json:"files.update"`
Filter map[int64]interface{} `json:"filter"`
Key string `json:"key,omitempty"`
Language string `json:"language"`
LogEntriesRAM int `json:"log.entries.ram"`
M3U8AdaptiveBandwidthMBPS int `json:"m3u8.adaptive.bandwidth.mbps"`
MappingFirstChannel float64 `json:"mapping.first.channel"`
Port string `json:"port"`
SSDP bool `json:"ssdp"`
TempPath string `json:"temp.path"`
Tuner int `json:"tuner"`
Update []string `json:"update"`
UpdateURL string `json:"update.url,omitempty"`
UserAgent string `json:"user.agent"`
UUID string `json:"uuid"`
UDPxy string `json:"udpxy"`
Version string `json:"version"`
XepgReplaceMissingImages bool `json:"xepg.replace.missing.images"`
XepgReplaceChannelTitle bool `json:"xepg.replace.channel.title"`
ThreadfinAutoUpdate bool `json:"ThreadfinAutoUpdate"`
StoreBufferInRAM bool `json:"storeBufferInRAM"`
ForceHttps bool `json:"forceHttps"`
ExcludeStreamHttps bool `json:"excludeStreamHttps"`
HttpsPort int `json:"httpsPort"`
BindIpAddress string `json:"bindIpAddress"`
HttpsThreadfinDomain string `json:"httpsThreadfinDomain"`
HttpThreadfinDomain string `json:"httpThreadfinDomain"`
EnableNonAscii bool `json:"enableNonAscii"`
EpgCategories string `json:"epgCategories"`
EpgCategoriesColors string `json:"epgCategoriesColors"`
Dummy bool `json:"dummy"`
DummyChannel string `json:"dummyChannel"`
IgnoreFilters bool `json:"ignoreFilters"`
}
// LanguageUI : Sprache für das WebUI
type LanguageUI struct {
Login struct {
Failed string
}
}
type FFProbeOutput struct {
Streams []ProbeStream `json:"streams"`
}
type ProbeStream struct {
CodecType string `json:"codec_type"`
Width int `json:"width,omitempty"`
Height int `json:"height,omitempty"`
RFrameRate string `json:"r_frame_rate,omitempty"`
ChannelLayout string `json:"channel_layout,omitempty"`
Channels int `json:"channels,omitempty"`
}