mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
fixed epgpics in detailedepgview
This commit is contained in:
parent
7c6167a79e
commit
86d3df4223
2
config.c
2
config.c
@ -92,7 +92,7 @@ void cDesignerConfig::ReadSkinFolder(cString &skinFolder, vector<string> *contai
|
||||
while (dirEntry = readdir(folder)) {
|
||||
string dirEntryName = dirEntry->d_name;
|
||||
int dirEntryType = dirEntry->d_type;
|
||||
if (!dirEntryName.compare(".") || !dirEntryName.compare("..") || !dirEntryName.compare("skinrepositories") || dirEntryType != DT_DIR)
|
||||
if (!dirEntryName.compare(".") || !dirEntryName.compare("..") || !dirEntryName.compare("skinrepositories") || (dirEntryType != DT_DIR && dirEntryType != DT_LNK))
|
||||
continue;
|
||||
container->push_back(dirEntryName);
|
||||
}
|
||||
|
@ -1234,9 +1234,9 @@ enum class eDmDetailedEpgIT {
|
||||
channelnumber,
|
||||
channellogoexists,
|
||||
hasreruns,
|
||||
epgpic1avaialble,
|
||||
epgpic2avaialble,
|
||||
epgpic3avaialble,
|
||||
epgpic1available,
|
||||
epgpic2available,
|
||||
epgpic3available,
|
||||
count
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include "viewdetail.h"
|
||||
#include "../config.h"
|
||||
#include "../extensions/helpers.h"
|
||||
/******************************************************************
|
||||
* cViewDetail
|
||||
******************************************************************/
|
||||
@ -270,9 +271,9 @@ void cViewDetailEpg::SetTokenContainer(void) {
|
||||
tokenContainer->DefineIntToken("{channelnumber}", (int)eDmDetailedEpgIT::channelnumber);
|
||||
tokenContainer->DefineIntToken("{channellogoexists}", (int)eDmDetailedEpgIT::channellogoexists);
|
||||
tokenContainer->DefineIntToken("{hasreruns}", (int)eDmDetailedEpgIT::hasreruns);
|
||||
tokenContainer->DefineIntToken("{epgpic1avaialble}", (int)eDmDetailedEpgIT::epgpic1avaialble);
|
||||
tokenContainer->DefineIntToken("{epgpic2avaialble}", (int)eDmDetailedEpgIT::epgpic2avaialble);
|
||||
tokenContainer->DefineIntToken("{epgpic3avaialble}", (int)eDmDetailedEpgIT::epgpic3avaialble);
|
||||
tokenContainer->DefineIntToken("{epgpic1available}", (int)eDmDetailedEpgIT::epgpic1available);
|
||||
tokenContainer->DefineIntToken("{epgpic2available}", (int)eDmDetailedEpgIT::epgpic2available);
|
||||
tokenContainer->DefineIntToken("{epgpic3available}", (int)eDmDetailedEpgIT::epgpic3available);
|
||||
tokenContainer->DefineIntToken("{ismovie}", (int)eScraperIT::ismovie);
|
||||
tokenContainer->DefineIntToken("{moviebudget}", (int)eScraperIT::moviebudget);
|
||||
tokenContainer->DefineIntToken("{movierevenue}", (int)eScraperIT::movierevenue);
|
||||
@ -394,6 +395,7 @@ bool cViewDetailEpg::Parse(bool forced) {
|
||||
if (scrapInfoAvailable) {
|
||||
SetFullScrapInfo(tokenContainer, actorsIndex);
|
||||
}
|
||||
SetEpgPictures(event->EventID());
|
||||
SetDirty();
|
||||
return true;
|
||||
}
|
||||
@ -495,6 +497,17 @@ void cViewDetailEpg::SetReruns(cList<Epgsearch_searchresults_v1_0::cServiceSearc
|
||||
}
|
||||
}
|
||||
|
||||
void cViewDetailEpg::SetEpgPictures(int eventId) {
|
||||
for (int i=0; i<3; i++) {
|
||||
cString epgPic = cString::sprintf("%s%d_%d.jpg", *config.epgImagePath, eventId, i);
|
||||
bool epgPicAvailable = FileExists(*epgPic);
|
||||
int indexAvailable = (int)eDmDetailedEpgIT::epgpic1available + i;
|
||||
int indexPath = (int)eDmDetailedEpgST::epgpic1path + i;
|
||||
tokenContainer->AddIntToken(indexAvailable, epgPicAvailable);
|
||||
tokenContainer->AddStringToken(indexPath, *epgPic);
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* cViewDetailRec
|
||||
******************************************************************/
|
||||
|
@ -46,6 +46,7 @@ protected:
|
||||
cList<Epgsearch_searchresults_v1_0::cServiceSearchResult> *LoadReruns(void);
|
||||
int NumReruns(cList<Epgsearch_searchresults_v1_0::cServiceSearchResult> *reruns);
|
||||
void SetReruns(cList<Epgsearch_searchresults_v1_0::cServiceSearchResult> *reruns);
|
||||
void SetEpgPictures(int eventId);
|
||||
public:
|
||||
cViewDetailEpg(void);
|
||||
virtual ~cViewDetailEpg(void);
|
||||
|
Loading…
Reference in New Issue
Block a user