diff options
| -rw-r--r-- | event.cpp | 45 | ||||
| -rw-r--r-- | event.h | 1 | ||||
| -rw-r--r-- | parse.cpp | 2 |
3 files changed, 32 insertions, 16 deletions
@@ -59,37 +59,37 @@ char* cXMLTVEvent::removepowerchar(char* s) void cXMLTVEvent::SetSource(const char *Source) { - source = strcpyrealloc(source, Source); + source=strcpyrealloc(source, Source); if (source) { - source = removepowerchar(source); - source = compactspace(source); + source=removepowerchar(source); + source=compactspace(source); } } void cXMLTVEvent::SetChannelID(const char *ChannelID) { - channelid = strcpyrealloc(channelid, ChannelID); + channelid=strcpyrealloc(channelid, ChannelID); if (channelid) { channelid=removepowerchar(channelid); - channelid = compactspace(channelid); + channelid=compactspace(channelid); } } void cXMLTVEvent::SetTitle(const char *Title) { - title = strcpyrealloc(title, Title); + title=strcpyrealloc(title, Title); if (title) { title=removepowerchar(title); - title = compactspace(title); + title=compactspace(title); } } void cXMLTVEvent::SetOrigTitle(const char *OrigTitle) { - origtitle = strcpyrealloc(origtitle, OrigTitle); + origtitle=strcpyrealloc(origtitle, OrigTitle); if (origtitle) { origtitle=removepowerchar(origtitle); @@ -107,23 +107,38 @@ void cXMLTVEvent::SetShortText(const char *ShortText) } } +void cXMLTVEvent::AddDescription(const char *Description) +{ + if (!description) + { + SetDescription(Description); + } + else + { + description=strcatrealloc(description,"\n"); + description=strcatrealloc(description,Description); + description=removepowerchar(description); + description=compactspace(description); + } +} + void cXMLTVEvent::SetDescription(const char *Description) { - description = strcpyrealloc(description, Description); + description=strcpyrealloc(description, Description); if (description) { description=removepowerchar(description); - description = compactspace(description); + description=compactspace(description); } } void cXMLTVEvent::SetEITDescription(const char *EITDescription) { - eitdescription = strcpyrealloc(eitdescription, EITDescription); + eitdescription=strcpyrealloc(eitdescription, EITDescription); if (eitdescription) { eitdescription=removepowerchar(eitdescription); - eitdescription = compactspace(eitdescription); + eitdescription=compactspace(eitdescription); } } @@ -143,7 +158,7 @@ void cXMLTVEvent::SetAudio(const char *Audio) if (audio) { audio=removepowerchar(audio); - audio = compactspace(audio); + audio=compactspace(audio); } } @@ -578,8 +593,8 @@ void cXMLTVEvent::Clear() channelid=NULL; } year=0; - starttime = 0; - duration = 0; + starttime=0; + duration=0; eventid=eiteventid=0; video.Clear(); credits.Clear(); @@ -75,6 +75,7 @@ public: void SetEITDescription(const char *EITDescription); void SetCountry(const char *Country); void SetAudio(const char *Audio); + void AddDescription(const char *Description); void AddVideo(const char *VType, const char *VContent); void AddCredits(const char *CreditType, const char *Credit, const char *Addendum=NULL); void AddCategory(const char *Category); @@ -342,7 +342,7 @@ bool cParse::FetchEvent(xmlNodePtr enode, bool useeptext) xmlChar *content=xmlNodeListGetString(node->doc,node->xmlChildrenNode,1); if (content) { - xevent.SetDescription((const char *) content); + xevent.AddDescription((const char *) content); xmlFree(content); } } |
