index = -1;
movieID = 0;
seriesID =0;
+ epgImage = 0;
}
Event::~Event()
if (movieID == 0 && seriesID == 0) {
- vdr->getScraperEventType(channelid, id, movieID, seriesID, episodeID);
- Log::getInstance()->log("Event", Log::DEBUG, "Got Scraper EventType %d %d, %d %d %d",
+ vdr->getScraperEventType(channelid, id, movieID, seriesID, episodeID, epgImage);
+ Log::getInstance()->log("Event", Log::DEBUG, "Got Scraper EventType %d %d, %d %d %d %d",
id, channelid,
movieID, seriesID, episodeID);
}
int movieID;
int seriesID;
int episodeID;
+ int epgImage;
};
class EventSorter
VC_RECT_T rect;
res=vc_dispmanx_resource_create(VC_IMAGE_RGBA32,width,height,&image_ptr);
display=vc_dispmanx_display_open(0);
- if (!osd ) {
+ if (!osd) {
vc_dispmanx_snapshot(display, res,
(DISPMANX_TRANSFORM_T)(DISPMANX_SNAPSHOT_NO_RGB|DISPMANX_SNAPSHOT_FILL/*|DISPMANX_SNAPSHOT_PACK*/));
}
//vgScale(720.f/((float)BACKBUFFER_WIDTH), 576.f/((float)BACKBUFFER_HEIGHT));
float scalex=command.w/imagewidth;
float scaley=command.h/imageheight;
+ float tx=command.x;
+ float ty=command.y;
+ if (command.corner == TopLeftLimited) {
+ if (imagewidth>imageheight && scalex!=0.f) {
+ scaley=0.f;
+ ty+=(command.h-imageheight * scalex/aspect_correction)*0.5f;
+ }
+ if (imagewidth<imageheight && scaley!=0.f) {
+ scalex=0.f;
+ tx+=(command.w-imagewidth * scaley*aspect_correction)*0.5f;
+ }
+ }
if (scalex==0.f && scaley==0.f) {
scalex=aspect_correction;
scaley=1.f;
} else if (scaley==0.f) {
scaley=scalex/aspect_correction;
}
- float tx=command.x;
- float ty=command.y;
+
if (command.corner == BottomRight || command.corner == BottomLeft || command.corner == BottomMiddle)
{
BottomLeft,
BottomRight,
TopMiddle,
- BottomMiddle
+ BottomMiddle,
+ TopLeftLimited
};
typedef unsigned int ImageIndex;
}
void VDR::getScraperEventType(char * fileName, int & movieID,
- int & seriesID, int & episodeID )
+ int & seriesID, int & episodeID)
{
movieID = 0;
seriesID = 0;
}
void VDR::getScraperEventType(UINT channelid, UINT eventid, int & movieID,
- int & seriesID, int & episodeID )
+ int & seriesID, int & episodeID, int & epgImage )
{
movieID = 0;
seriesID = 0;
episodeID = 0;
+ epgImage = 0;
VDR_RequestPacket vrp;
if (!vrp.init(VDR_GETEVENTSCRAPEREVENTTYPE, false, 0)) return;
if (!vrp.addULONG(channelid)) return ;
{
movieID = vresp->extractLONG();
}
+ epgImage = vresp->extractLONG();
delete vresp;
}
//TV Scraper support
void getScraperEventType(char * fileName, int & movieID, int & seriesID, int & episodeID);
- void getScraperEventType(UINT eventid, UINT channelid, int & movieID, int & seriesID, int & episodeID);
+ void getScraperEventType(UINT eventid, UINT channelid, int & movieID, int & seriesID, int & episodeID, int & epgImage);
MovieInfo *getScraperMovieInfo(int movieID);
SeriesInfo *getScraperSeriesInfo(int seriesID, int episodeID);
ULONG loadTVMedia(TVMediaInfo& tvmedia);
sl.addColumn(0);
sl.addColumn(25 );
sl.addColumn(25 + 7);
+ sl.addColumn(25 + 7+ 7);
//sl.addColumn(118);
int first = 1;
btime = localtime(&eventEndTime);
strftime(tempB, 299, "- %H:%M ", btime);
//#endif
- sprintf(tempC, "%s\n \t%s%s", currentEvent->title,tempA,tempB);
+ sprintf(tempC, "\t %s\n \t \t%s%s", currentEvent->title,tempA,tempB);
// New TVMedia stuff
TVMediaInfo *info= new TVMediaInfo();
info->setPosterThumb(channelNumber, currentEvent->id);
epgTVmedia.setTVMedia(poster.info, WTVMedia::ZoomHorizontal);
epgTVmedia.setVisible(true);
} else {
- if (mode!=OneChannel) {
+ if (toShow->epgImage)
+ {
+ TVMediaInfo info;
+ info.setPosterThumb(channel,toShow->id);
+ epgTVmedia.setTVMedia(info, WTVMedia::ZoomHorizontal);
+ epgTVmedia.setVisible(true);
+ }else if (mode!=OneChannel) {
TVMediaInfo info;
info.setChannelLogo(channel);
epgTVmedia.setTVMedia(info, WTVMedia::ZoomHorizontal);
int fontHeight = getFontHeight();
float ypos_mod= ypos + (linesPerOption-floor(linesPerOption))*((float)fontHeight)*0.5f;
+ int imagewidth=0;
+ if (numColumns>1) imagewidth=columns[1]-columns[0];
if (pict)
{
- drawTVMedia(*pict, xpos,ypos,0,fontHeight*linesPerOption,TopLeft);
+ drawTVMedia(*pict, xpos,ypos,imagewidth,fontHeight*linesPerOption,TopLeftLimited);
taboffset++;
}