Documentation
¶
Index ¶
- Variables
- func API(w http.ResponseWriter, r *http.Request)
- func Auto(w http.ResponseWriter, r *http.Request)
- func BinaryUpdate() (err error)
- func BuildGoFile() error
- func DataImages(w http.ResponseWriter, r *http.Request)
- func Download(w http.ResponseWriter, r *http.Request)
- func GetHTMLString(base string) string
- func GetUserHomeDirectory() (userHomeDirectory string)
- func HTMLInit(name, pkg, folder, file string)
- func Images(w http.ResponseWriter, r *http.Request)
- func Index(w http.ResponseWriter, r *http.Request)
- func Init() (err error)
- func InitMaintenance() (err error)
- func SSDP() (err error)
- func ShowError(err error, errCode int)
- func ShowSystemInfo()
- func StartSystem(updateProviderFiles bool) (err error)
- func StartWebserver() (err error)
- func Stream(w http.ResponseWriter, r *http.Request)
- func WS(w http.ResponseWriter, r *http.Request)
- func Web(w http.ResponseWriter, r *http.Request)
- func XteveRestoreFromCLI(archive string) (err error)
- type APIRequestStruct
- type APIResponseStruct
- type BandwidthCalculation
- type Capability
- type Category
- type Channel
- type ClientConnection
- type Country
- type DataStruct
- type Desc
- type Discover
- type DisplayName
- type DynamicStream
- type EpisodeNum
- type Filter
- type FilterStruct
- type GitStruct
- type Icon
- type Language
- type LanguageUI
- type Lineup
- type LineupStatus
- type LineupStream
- type Live
- type M3UChannelStructXEPG
- type New
- type Notification
- type Playlist
- type Poster
- type PreviouslyShown
- type Program
- type RequestStruct
- type ResponseStruct
- type Segment
- type SettingsStrcut
- type StreamInfo
- type StreamingURLS
- type SubTitle
- type SystemStruct
- type ThisClient
- type ThisStream
- type Title
- type Video
- type WebScreenLogStruct
- type XEPGChannelStruct
- type XMLTV
Constants ¶
This section is empty.
Variables ¶
var BufferClients sync.Map
BufferClients : Anzahl der Clients die einen Stream über den Buffer abspielen
var BufferInformation sync.Map
BufferInformation : Informationen über den Buffer (aktive Streams, maximale Streams)
var Lock = sync.RWMutex{}
Lock : Lock Map
var SystemFiles = []string{"authentication.json", "pms.json", "settings.json", "xepg.json", "urls.json"}
SystemFiles : Alle Systemdateien
Functions ¶
func Auto ¶
func Auto(w http.ResponseWriter, r *http.Request)
Auto : HDHR routing (wird derzeit nicht benutzt)
func BinaryUpdate ¶
func BinaryUpdate() (err error)
BinaryUpdate : Binary Update Prozess. Git Branch master und beta wird von GitHub geladen.
func DataImages ¶
func DataImages(w http.ResponseWriter, r *http.Request)
DataImages : Image Pfad für Logos / Bilder die hochgeladen wurden /data_images/
func GetUserHomeDirectory ¶
func GetUserHomeDirectory() (userHomeDirectory string)
GetUserHomeDirectory : Benutzer Homer Verzeichnis
func HTMLInit ¶
func HTMLInit(name, pkg, folder, file string)
HTMLInit : Dateipfade festlegen mapName = Name der zu erstellenden map htmlFolder: Ordner der HTML Dateien packageName: Name des package
func InitMaintenance ¶
func InitMaintenance() (err error)
InitMaintenance : Wartungsprozess initialisieren
func StartSystem ¶
StartSystem : System wird gestartet
func XteveRestoreFromCLI ¶
XteveRestoreFromCLI : Wiederherstellung über die Kommandozeile
Types ¶
type APIRequestStruct ¶
type APIRequestStruct struct {
Cmd string `json:"cmd"`
Password string `json:"password"`
Token string `json:"token"`
Username string `json:"username"`
}
APIRequestStruct : Anfrage über die API Schnittstelle
type APIResponseStruct ¶
type APIResponseStruct struct {
EpgSource string `json:"epg.source,omitempty"`
Error string `json:"err,omitempty"`
Status bool `json:"status,required"`
StreamsActive int64 `json:"streams.active,omitempty"`
StreamsAll int64 `json:"streams.all,omitempty"`
StreamsXepg int64 `json:"streams.xepg,omitempty"`
Token string `json:"token,omitempty"`
URLDvr string `json:"url.dvr,omitempty"`
URLM3U string `json:"url.m3u,omitempty"`
URLXepg string `json:"url.xepg,omitempty"`
VersionAPI string `json:"version.api,omitempty"`
VersionXteve string `json:"version.xteve,omitempty"`
}
APIResponseStruct : Antwort an den Client (API)
type BandwidthCalculation ¶
type BandwidthCalculation struct {
NetworkBandwidth int
Size int
Start time.Time
Stop time.Time
TimeDiff float64
}
BandwidthCalculation : Bandbreitenberechnung für den Stream
type Capability ¶
type Capability struct {
URLBase string `xml:"URLBase"`
XMLName xml.Name `xml:"root"`
Xmlns string `xml:"xmlns,attr"`
SpecVersion struct {
Major int `xml:"major"`
Minor int `xml:"minor"`
} `xml:"specVersion"`
Device struct {
DeviceType string `xml:"deviceType"`
FriendlyName string `xml:"friendlyName"`
Manufacturer string `xml:"manufacturer"`
ModelName string `xml:"modelName"`
ModelNumber string `xml:"modelNumber"`
SerialNumber string `xml:"serialNumber"`
UDN string `xml:"UDN"`
} `xml:"device"`
}
Capability : HDHR Capability XML
type Channel ¶
type Channel struct {
ID string `xml:"id,attr"`
DisplayName []DisplayName `xml:"display-name"`
Icon Icon `xml:"icon"`
}
Channel : Kanäle
type ClientConnection ¶
ClientConnection : Client Verbindungen
type DataStruct ¶
type DataStruct struct {
Cache struct {
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{}
XEPGCount int64
}
}
DataStruct : Alle Daten werden hier abgelegt. (Lineup, XMLTV)
var Data DataStruct
Data : Alle Daten werden hier abgelegt. (Lineup, XMLTV)
type Discover ¶
type Discover struct {
BaseURL string `json:"BaseURL"`
DeviceAuth string `json:"DeviceAuth"`
DeviceID string `json:"DeviceID"`
FirmwareName string `json:"FirmwareName"`
FirmwareVersion string `json:"FirmwareVersion"`
FriendlyName string `json:"FriendlyName"`
LineupURL string `json:"LineupURL"`
Manufacturer string `json:"Manufacturer"`
ModelNumber string `json:"ModelNumber"`
TunerCount int `json:"TunerCount"`
}
Discover : HDHR Discover /discover.json
type DisplayName ¶
type DisplayName struct {
Value string `xml:",chardata"`
}
DisplayName : Kanalname
type DynamicStream ¶
type DynamicStream struct {
AverageBandwidth int
Bandwidth int
Framerate float64
Resolution string
URL string
}
DynamicStream : Streaminformationen bei dynamischer Bandbreite
type EpisodeNum ¶
EpisodeNum : Episodennummerierung
type FilterStruct ¶
type FilterStruct struct {
Active bool `json:"active,required"`
CaseSensitive bool `json:"caseSensitive,required"`
Description string `json:"description,required"`
Exclude string `json:"exclude,required"`
Filter string `json:"filter,required"`
Include string `json:"include,required"`
Name string `json:"name,required"`
Rule string `json:"rule,omitempty"`
Type string `json:"type,required"`
}
FilterStruct : Filter Struktur
type LanguageUI ¶
type LanguageUI struct {
Login struct {
Failed string
}
}
LanguageUI : Sprache für das WebUI
type LineupStatus ¶
type LineupStatus struct {
ScanInProgress int `json:"ScanInProgress"`
ScanPossible int `json:"ScanPossible"`
Source string `json:"Source"`
SourceList []string `json:"SourceList"`
}
LineupStatus : HDHR Lineup status /lineup_status.json
type LineupStream ¶
type LineupStream struct {
GuideName string `json:"GuideName"`
GuideNumber string `json:"GuideNumber"`
URL string `json:"URL"`
}
LineupStream : HDHR einzelner Stream im Lineup
type Live ¶
type Live struct {
Value string `xml:",chardata"`
}
Live : Sendung als Liveübertragung deklarieren
type M3UChannelStructXEPG ¶
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"`
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"`
}
M3UChannelStructXEPG : M3U Struktur für XEPG
type Notification ¶
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"`
}
Notification : Notifikationen im Webinterface
type Playlist ¶
type Playlist struct {
Folder string
PlaylistID string
PlaylistName string
Tuner int
Clients map[int]ThisClient
Streams map[int]ThisStream
}
Playlist : Enthält allen Playlistinformationen, die der Buffer benötigr
type Poster ¶
type Poster struct {
Height string `xml:"height,attr"`
Src string `xml:"src,attr"`
Value string `xml:",chardata"`
Width string `xml:"width,attr"`
}
Poster : Programmposter / Cover
type PreviouslyShown ¶
type PreviouslyShown struct {
Start string `xml:"start,attr"`
}
PreviouslyShown : Widerholung bzw. Erstausstrahlung
type Program ¶
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"`
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"`
}
Program : Programme
type RequestStruct ¶
type RequestStruct struct {
// Befehle an xTeVe
Cmd string `json:"cmd,required"`
// Benutzer
DeleteUser bool `json:"deleteUser,omitempty"`
UserData map[string]interface{} `json:"userData,omitempty"`
// Mapping
EpgMapping map[string]interface{} `json:"epgMapping,omitempty"`
// Restore
Base64 string `json:"base64,omitempty"`
// Neue Werte für die Einstellungen (settings.json)
Settings struct {
API *bool `json:"api,omitempty"`
AuthenticationAPI *bool `json:"authentication.api,omitempty"`
AuthenticationM3U *bool `json:"authentication.m3u,omitempty"`
AuthenticationPMS *bool `json:"authentication.pms,omitempty"`
AuthenticationWEP *bool `json:"authentication.web,omitempty"`
AuthenticationXML *bool `json:"authentication.xml,omitempty"`
BackupKeep *int `json:"backup.keep,omitempty"`
BackupPath *string `json:"backup.path,omitempty"`
Buffer *string `json:"buffer,omitempty"`
BufferSize *int `json:"buffer.size.kb, omitempty"`
BufferTimeout *float64 `json:"buffer.timeout,omitempty"`
CacheImages *bool `json:"cache.images,omitempty"`
EpgSource *string `json:"epgSource,omitempty"`
FFmpegOptions *string `json:"ffmpeg.options,omitempty"`
FFmpegPath *string `json:"ffmpeg.path,omitempty"`
VLCOptions *string `json:"vlc.options,omitempty"`
VLCPath *string `json:"vlc.path,omitempty"`
FilesUpdate *bool `json:"files.update,omitempty"`
TempPath *string `json:"temp.path,omitempty"`
Tuner *int `json:"tuner,omitempty"`
Update *[]string `json:"update,omitempty"`
UserAgent *string `json:"user.agent,omitempty"`
XepgReplaceMissingImages *bool `json:"xepg.replace.missing.images,omitempty"`
XteveAutoUpdate *bool `json:"xteveAutoUpdate,omitempty"`
SchemeM3U *string `json:"scheme.m3u,omitempty"`
SchemeXML *string `json:"scheme.xml,omitempty"`
} `json:"settings,omitempty"`
// Upload Logo
Filename string `json:"filename,omitempty"`
// Filter
Filter map[int64]interface{} `json:"filter,omitempty"`
// Dateien (M3U, HDHR, XMLTV)
Files struct {
HDHR map[string]interface{} `json:"hdhr,omitempty"`
M3U map[string]interface{} `json:"m3u,omitempty"`
XMLTV map[string]interface{} `json:"xmltv,omitempty"`
} `json:"files,omitempty"`
// Wizard
Wizard struct {
EpgSource *string `json:"epgSource,omitempty"`
M3U *string `json:"m3u,omitempty"`
Tuner *int `json:"tuner,omitempty"`
XMLTV *string `json:"xmltv,omitempty"`
} `json:"wizard,omitempty"`
}
RequestStruct : Anfragen über die Websocket Schnittstelle
type ResponseStruct ¶
type ResponseStruct struct {
ClientInfo struct {
ARCH string `json:"arch"`
Branch string `json:"branch,omitempty"`
DVR string `json:"DVR"`
EpgSource string `json:"epgSource"`
Errors int `json:"errors"`
M3U string `json:"m3u-url,required"`
OS string `json:"os"`
Streams string `json:"streams"`
UUID string `json:"uuid"`
Version string `json:"version"`
Warnings int `json:"warnings"`
XEPGCount int64 `json:"xepg"`
XML string `json:"xepg-url,required"`
} `json:"clientInfo,omitempty"`
Data struct {
Playlist struct {
M3U struct {
Groups struct {
Text []string `json:"text,required"`
Value []string `json:"value,required"`
} `json:"groups,required"`
} `json:"m3u,required"`
} `json:"playlist,required"`
StreamPreviewUI struct {
Active []string `json:"activeStreams,required"`
Inactive []string `json:"inactiveStreams,required"`
}
} `json:"data,required"`
Alert string `json:"alert,omitempty"`
ConfigurationWizard bool `json:"configurationWizard,required"`
Error string `json:"err,omitempty"`
Log WebScreenLogStruct `json:"log,required"`
LogoURL string `json:"logoURL,omitempty"`
OpenLink string `json:"openLink,omitempty"`
OpenMenu string `json:"openMenu,omitempty"`
Reload bool `json:"reload,omitempty"`
Settings SettingsStrcut `json:"settings,required"`
Status bool `json:"status,required"`
Token string `json:"token,omitempty"`
Users map[string]interface{} `json:"users,omitempty"`
Wizard int `json:"wizard,omitempty"`
XEPG map[string]interface{} `json:"xepg,required"`
Notification map[string]Notification `json:"notification,omitempty"`
}
ResponseStruct : Antworten an den Client (WEB)
type Segment ¶
type Segment struct {
Duration float64
Info bool
PlaylistType string
Sequence int64
URL string
Version int
Wait float64
StreamInf struct {
AverageBandwidth int
Bandwidth int
Framerate float64
Resolution string
SegmentURL string
}
}
Segment : URL Segmente (HLS / M3U8)
type SettingsStrcut ¶
type SettingsStrcut 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"`
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"`
Version string `json:"version"`
XepgReplaceMissingImages bool `json:"xepg.replace.missing.images"`
XteveAutoUpdate bool `json:"xteveAutoUpdate"`
}
SettingsStrcut : Inhalt der settings.json
var Settings SettingsStrcut
Settings : Inhalt der settings.json
type StreamInfo ¶
type StreamInfo struct {
ChannelNumber string `json:"channelNumber,required"`
Name string `json:"name,required"`
PlaylistID string `json:"playlistID,required"`
URL string `json:"url,required"`
URLid string `json:"urlID,required"`
}
StreamInfo : Informationen zum Kanal für die streaming URL
type StreamingURLS ¶
type StreamingURLS struct {
Streams map[string]StreamInfo `json:"channels,required"`
}
StreamingURLS : Informationen zu allen streaming URL's
type SystemStruct ¶
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
DVRLimit 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
}
Update struct {
Git string
Name string
}
URLBase string
Version string
WEB struct {
Menu []string
}
}
SystemStruct : Beinhaltet alle Systeminformationen
var System SystemStruct
System : Beinhaltet alle Systeminformationen
type ThisStream ¶
type ThisStream struct {
ChannelName string
Error string
Folder string
MD5 string
NetworkBandwidth int
PlaylistID string
PlaylistName string
Status bool
URL string
Segment []Segment
// Serverinformationen
Location string
URLFile string
URLHost string
URLPath string
URLRedirect string
URLScheme string
URLStreamingServer string
// Wird nur für HLS / M3U8 verwendet
Body string
Difference float64
Duration float64
DynamicBandwidth bool
FirstSequence int64
HLS bool
LastSequence int64
M3U8URL string
NewSegCount int
OldSegCount int
Sequence int64
TimeDiff float64
TimeEnd time.Time
TimeSegDuration float64
TimeStart time.Time
Version int
Wait float64
DynamicStream map[int]DynamicStream
// Lokale Temp Datein
OldSegments []string
}
ThisStream : Enthält Informationen zu dem abzuspielenden Stream einer Playlist
type Video ¶
type Video struct {
Aspect string `xml:"aspect,omitempty"`
Colour string `xml:"colour,omitempty"`
Present string `xml:"present,omitempty"`
Quality string `xml:"quality,omitempty"`
}
Video : Video Metadaten
type WebScreenLogStruct ¶
type WebScreenLogStruct struct {
Errors int `json:"errors,required"`
Log []string `json:"log,required"`
Warnings int `json:"warnings,required"`
}
WebScreenLogStruct : Logs werden im RAM gespeichert und für das Webinterface bereitgestellt
var WebScreenLog WebScreenLogStruct
WebScreenLog : Logs werden im RAM gespeichert und für das Webinterface bereitgestellt
type XEPGChannelStruct ¶
type XEPGChannelStruct 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"`
TvgName string `json:"tvg-name,required"`
URL string `json:"url,required"`
UUIDKey string `json:"_uuid.key,required"`
UUIDValue string `json:"_uuid.value,omitempty"`
Values string `json:"_values,required"`
XActive bool `json:"x-active,required"`
XCategory string `json:"x-category,required"`
XChannelID string `json:"x-channelID,required"`
XEPG string `json:"x-epg,required"`
XGroupTitle string `json:"x-group-title,required"`
XMapping string `json:"x-mapping,required"`
XmltvFile string `json:"x-xmltv-file,required"`
XName string `json:"x-name,required"`
XUpdateChannelIcon bool `json:"x-update-channel-icon,required"`
XUpdateChannelName bool `json:"x-update-channel-name,required"`
XDescription string `json:"x-description,required"`
}
XEPGChannelStruct : XEPG Struktur