Add XML tag: rating, credits

This commit is contained in:
marmei
2020-09-26 18:35:16 +02:00
parent b407ec5bf0
commit db59f7ef37
4 changed files with 75 additions and 15 deletions

View File

@@ -8,20 +8,20 @@ type SystemStruct struct {
XML string XML string
} }
APIVersion string APIVersion string
AppName string AppName string
ARCH string ARCH string
BackgroundProcess bool BackgroundProcess bool
Branch string Branch string
Build string Build string
Compatibility string Compatibility string
ConfigurationWizard bool ConfigurationWizard bool
DBVersion string DBVersion string
Dev bool Dev bool
DeviceID string DeviceID string
Domain string Domain string
PlexChannelLimit int PlexChannelLimit int
UnfilteredChannelLimit int UnfilteredChannelLimit int
FFmpeg struct { FFmpeg struct {
DefaultOptions string DefaultOptions string

View File

@@ -42,6 +42,9 @@ type Program struct {
Country []*Country `xml:"country"` Country []*Country `xml:"country"`
EpisodeNum []*EpisodeNum `xml:"episode-num"` EpisodeNum []*EpisodeNum `xml:"episode-num"`
Poster []Poster `xml:"icon"` 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"` Language []*Language `xml:"language"`
Video Video `xml:"video"` Video Video `xml:"video"`
Date string `xml:"date"` Date string `xml:"date"`
@@ -75,6 +78,19 @@ type Category struct {
Value string `xml:",chardata"` 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 // Language : Sprachen
type Language struct { type Language struct {
Value string `xml:",chardata"` Value string `xml:",chardata"`
@@ -100,6 +116,41 @@ type Poster struct {
Width string `xml:"width,attr"` 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 // Video : Video Metadaten
type Video struct { type Video struct {
Aspect string `xml:"aspect,omitempty"` Aspect string `xml:"aspect,omitempty"`

View File

@@ -713,6 +713,15 @@ func getProgramData(xepgChannel XEPGChannelStruct) (xepgXML XMLTV, err error) {
// Category (Kategorie) // Category (Kategorie)
getCategory(program, xmltvProgram, xepgChannel) getCategory(program, xmltvProgram, xepgChannel)
// Credits : (Credits)
program.Credits = xmltvProgram.Credits
// Rating (Bewertung)
program.Rating = xmltvProgram.Rating
// StarRating (Bewertung / Kritiken)
program.StarRating = xmltvProgram.StarRating
// Country (Länder) // Country (Länder)
program.Country = xmltvProgram.Country program.Country = xmltvProgram.Country

View File

@@ -39,7 +39,7 @@ var GitHub = GitHubStruct{Branch: "master", User: "xteve-project", Repo: "xTeVe-
const Name = "xTeVe" const Name = "xTeVe"
// Version : Version, die Build Nummer wird in der main func geparst. // Version : Version, die Build Nummer wird in der main func geparst.
const Version = "2.1.2.0126" const Version = "2.1.2.0127"
// DBVersion : Datanbank Version // DBVersion : Datanbank Version
const DBVersion = "2.1.0" const DBVersion = "2.1.0"