mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 13:01:48 +00:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
69711400fa | ||
|
463b6369d2 | ||
|
0b37464dd0 | ||
|
cf171d8732 | ||
|
d666b8701e | ||
|
6139016102 | ||
|
1c99501776 |
6
HISTORY
6
HISTORY
@@ -197,3 +197,9 @@ Version 1.2.8
|
||||
(Create and modify of channelgroups and blacklists isn't possible,
|
||||
because the epgsearch service interface doesn't support that,
|
||||
should be done in epgsearch)
|
||||
|
||||
Version 1.2.9
|
||||
|
||||
- Correct plugin options in README and CommandLineHelp
|
||||
- Change locking in cTVGuideSearchTimer::cTVGuideSearchTimer
|
||||
- Fixed a dayOfWeek error in RecMenuSearchTimerEdit
|
||||
|
4
README
4
README
@@ -44,13 +44,13 @@ After "normal" Plugin installation you have to care about the paths for the
|
||||
used Icons, the channel logos and epg images. The following paths can be set
|
||||
at startup:
|
||||
|
||||
-l path, --logodir=path
|
||||
-l path, --logopath=path
|
||||
Path to the logos (Default: <ResourceDirectory>/plugins/tvguide/channellogos/).
|
||||
|
||||
-e path, --epgimages=path
|
||||
Path to the epgimages (Default: <CacheDirectory>/plugins/tvguide/epgimages/).
|
||||
|
||||
-i path, --icons=path
|
||||
-i path, --iconpath=path
|
||||
Path to the icons directory (Default: <ResourceDirectory>/plugins/tvguide/epgimages/).
|
||||
|
||||
<ResourceDirectory> and <CacheDirectory> is taken from your VDR configuration
|
||||
|
@@ -2148,7 +2148,6 @@ cRecMenuItemDayChooser::cRecMenuItemDayChooser(cString text,
|
||||
this->callback = callback;
|
||||
this->indent = indent;
|
||||
height = 3 * font->Height() / 2;
|
||||
// height = 2 * font->Height();
|
||||
selectedDay = 0;
|
||||
pixmapWeekdays = NULL;
|
||||
pixmapWeekdaysSelect = NULL;
|
||||
@@ -2189,13 +2188,13 @@ void cRecMenuItemDayChooser::Show(void) {
|
||||
void cRecMenuItemDayChooser::SetSizes(void) {
|
||||
days = trVDR("MTWTFSS");
|
||||
int maxWidth = 0;
|
||||
for (unsigned i=0; i<days.length(); ++i) {
|
||||
for (unsigned i = 0; i < days.length(); ++i) {
|
||||
int charWidth = font->Width(days.at(i));
|
||||
if (charWidth > maxWidth)
|
||||
maxWidth = charWidth;
|
||||
}
|
||||
daysSize = min(maxWidth + 15, height-4);
|
||||
daysX = width - 10 - 7*daysSize;
|
||||
daysSize = min(maxWidth + 15, height - 4);
|
||||
daysX = width - 10 - 7 * daysSize;
|
||||
daysY = (height - daysSize) / 2;
|
||||
}
|
||||
|
||||
@@ -2217,13 +2216,13 @@ void cRecMenuItemDayChooser::Draw(void) {
|
||||
void cRecMenuItemDayChooser::DrawDays(void) {
|
||||
pixmapWeekdays->Fill(clrTransparent);
|
||||
int textY = (height - font->Height()) / 2;
|
||||
pixmapWeekdays->DrawRectangle(cRect(daysX, daysY, 7*daysSize, daysSize), theme.Color(clrBorder));
|
||||
pixmapWeekdays->DrawRectangle(cRect(daysX, daysY, 7 * daysSize, daysSize), theme.Color(clrBorder));
|
||||
int currentX = daysX;
|
||||
for (unsigned day=0; day<days.length(); ++day) {
|
||||
for (unsigned day = 0; day < days.length(); ++day) {
|
||||
cString strDay = cString::sprintf("%c", days.at(day));
|
||||
pixmapWeekdays->DrawRectangle(cRect(currentX+2, daysY+2, daysSize-4, daysSize-4), theme.Color(clrBackground));
|
||||
tColor colorDay = WeekDaySet(day)?theme.Color(clrRecMenuDayActive)
|
||||
:theme.Color(clrRecMenuDayInactive);
|
||||
pixmapWeekdays->DrawRectangle(cRect(currentX + 2, daysY + 2, daysSize - 4, daysSize - 4), theme.Color(clrBackground));
|
||||
tColor colorDay = WeekDaySet(day) ? theme.Color(clrRecMenuDayActive)
|
||||
: theme.Color(clrRecMenuDayInactive);
|
||||
int textX = currentX + (daysSize - font->Width(*strDay)) / 2;
|
||||
pixmapWeekdays->DrawText(cPoint(textX, textY), *strDay, colorDay, clrTransparent, font);
|
||||
currentX += daysSize;
|
||||
@@ -2233,7 +2232,7 @@ void cRecMenuItemDayChooser::DrawDays(void) {
|
||||
void cRecMenuItemDayChooser::DrawHighlight(int day) {
|
||||
pixmapWeekdaysSelect->Fill(clrTransparent);
|
||||
if (day > -1) {
|
||||
int currentX = daysX + day*daysSize;
|
||||
int currentX = daysX + day * daysSize;
|
||||
pixmapWeekdaysSelect->DrawRectangle(cRect(currentX, daysY, daysSize, daysSize), theme.Color(clrRecMenuDayHighlight));
|
||||
}
|
||||
}
|
||||
@@ -2259,13 +2258,13 @@ eRecMenuState cRecMenuItemDayChooser::ProcessKey(eKeys Key) {
|
||||
switch (Key & ~k_Repeat) {
|
||||
case kLeft: {
|
||||
selectedDay--;
|
||||
if (selectedDay<0)
|
||||
if (selectedDay < 0)
|
||||
selectedDay += 7;
|
||||
DrawHighlight(selectedDay);
|
||||
return rmsConsumed;
|
||||
break; }
|
||||
case kRight: {
|
||||
selectedDay = (selectedDay+1)%7;
|
||||
selectedDay = (selectedDay + 1) % 7;
|
||||
DrawHighlight(selectedDay);
|
||||
return rmsConsumed;
|
||||
break; }
|
||||
|
19
recmenus.c
19
recmenus.c
@@ -728,6 +728,7 @@ cRecMenuSearchTimerEdit::cRecMenuSearchTimerEdit(cTVGuideSearchTimer searchTimer
|
||||
channelgroupIndex = -1;
|
||||
std::string dir = sT.directory;
|
||||
strncpy(directory, dir.c_str(), TEXTINPUTLENGTH);
|
||||
dayOfWeek = sT.DayOfWeek();
|
||||
|
||||
sT.GetSearchModes(&searchModes);
|
||||
sT.GetUseChannelModes(&useChannelModes);
|
||||
@@ -832,7 +833,7 @@ void cRecMenuSearchTimerEdit::CreateMenuItems(void) {
|
||||
}
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use day of week"), sT.useDayOfWeek, true, false, &sT.useDayOfWeek, rmsSearchTimerSave));
|
||||
if (sT.useDayOfWeek)
|
||||
mainMenuItems.push_back(new cRecMenuItemDayChooser(tr("Day of week"), sT.dayOfWeek, false, &sT.dayOfWeek, 1));
|
||||
mainMenuItems.push_back(new cRecMenuItemDayChooser(tr("Day of week"), dayOfWeek, false, &dayOfWeek, 1));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use in Favorites"), sT.useInFavorites, false, false, &sT.useInFavorites, rmsSearchTimerSave));
|
||||
mainMenuItems.push_back(new cRecMenuItemBool(tr("Use as search timer"), sT.useAsSearchTimer, true, false, &sT.useAsSearchTimer, rmsSearchTimerSave));
|
||||
if (sT.useAsSearchTimer) {
|
||||
@@ -915,8 +916,18 @@ cTVGuideSearchTimer cRecMenuSearchTimerEdit::GetSearchTimer(void) {
|
||||
searchTimer.SetUseSubtitle(sT.useSubtitle);
|
||||
searchTimer.SetUseDesription(sT.useDescription);
|
||||
if (sT.useChannel == 1) {
|
||||
searchTimer.SetStartChannel(startChannel);
|
||||
searchTimer.SetStopChannel(stopChannel);
|
||||
#if VDRVERSNUM >= 20301
|
||||
{
|
||||
LOCK_CHANNELS_READ;
|
||||
sT.channelMin = Channels->GetByNumber(startChannel);
|
||||
sT.channelMax = Channels->GetByNumber(stopChannel);
|
||||
}
|
||||
#else
|
||||
sT.channelMin = Channels.GetByNumber(startChannel);
|
||||
sT.channelMax = Channels.GetByNumber(stopChannel);
|
||||
#endif
|
||||
searchTimer.SetStartChannel(sT.channelMin);
|
||||
searchTimer.SetStopChannel(sT.channelMax);
|
||||
}
|
||||
if (sT.useChannel == 2) {
|
||||
if (channelgroups.size() > 0) {
|
||||
@@ -939,7 +950,7 @@ cTVGuideSearchTimer cRecMenuSearchTimerEdit::GetSearchTimer(void) {
|
||||
}
|
||||
searchTimer.SetUseDayOfWeek(sT.useDayOfWeek);
|
||||
if (sT.useDayOfWeek) {
|
||||
searchTimer.SetDayOfWeek(sT.dayOfWeek);
|
||||
searchTimer.SetDayOfWeek(dayOfWeek);
|
||||
}
|
||||
searchTimer.SetUseAsSearchTimer(sT.useAsSearchTimer);
|
||||
searchTimer.SetAction(sT.action);
|
||||
|
@@ -237,6 +237,7 @@ private:
|
||||
int startChannel;
|
||||
int stopChannel;
|
||||
int channelgroupIndex;
|
||||
int dayOfWeek;
|
||||
char directory[TEXTINPUTLENGTH];
|
||||
int SplitChannelGroups(std::vector<std::string> *channelGroups, std::vector<std::string> *channelgroups);
|
||||
public:
|
||||
|
@@ -17,9 +17,11 @@ cTVGuideSearchTimer::cTVGuideSearchTimer(void) {
|
||||
stopTime = 2359;
|
||||
useChannel = false;
|
||||
#if VDRVERSNUM >= 20301
|
||||
{
|
||||
LOCK_CHANNELS_READ;
|
||||
channelMin = Channels->GetByNumber(cDevice::CurrentChannel());
|
||||
channelMax = Channels->GetByNumber(cDevice::CurrentChannel());
|
||||
}
|
||||
#else
|
||||
channelMin = Channels.GetByNumber(cDevice::CurrentChannel());
|
||||
channelMax = Channels.GetByNumber(cDevice::CurrentChannel());
|
||||
@@ -38,7 +40,7 @@ cTVGuideSearchTimer::cTVGuideSearchTimer(void) {
|
||||
dayOfWeek = 0;
|
||||
directory = "";
|
||||
useEpisode = 0;
|
||||
priority = 99;
|
||||
priority = 50;
|
||||
lifetime = 99;
|
||||
marginStart = 5;
|
||||
marginStop = 5;
|
||||
@@ -47,19 +49,21 @@ cTVGuideSearchTimer::cTVGuideSearchTimer(void) {
|
||||
useExtEPGInfo = 0;
|
||||
extEPGInfoValues = "";
|
||||
avoidRepeats = 1;
|
||||
allowedRepeats = 1;
|
||||
compareTitle = 1;
|
||||
compareSubtitle = 2;
|
||||
compareSubtitle = 1;
|
||||
compareSummary = 1;
|
||||
compareSummaryMatchInPercent = 90;
|
||||
compareDate = 0;
|
||||
allowedRepeats = 1;
|
||||
catvaluesAvoidRepeat = 0;
|
||||
repeatsWithinDays = 0;
|
||||
delAfterDays = 0;
|
||||
recordingsKeep = 0;
|
||||
switchMinsBefore = 0;
|
||||
switchMinsBefore = 1;
|
||||
pauseOnNrRecordings = 0;
|
||||
blacklistMode = 0;
|
||||
blacklists = "";
|
||||
fuzzyTolerance = 0;
|
||||
fuzzyTolerance = 1;
|
||||
useInFavorites = 0;
|
||||
menuTemplate = 0;
|
||||
delMode = 0;
|
||||
@@ -69,9 +73,7 @@ cTVGuideSearchTimer::cTVGuideSearchTimer(void) {
|
||||
useAsSearchTimerTil = 0;
|
||||
ignoreMissingEPGCats = 0;
|
||||
unmuteSoundOnSwitch = 0;
|
||||
compareSummaryMatchInPercent = 0;
|
||||
contentsFilter = "";
|
||||
compareDate = 0;
|
||||
}
|
||||
|
||||
cTVGuideSearchTimer::~cTVGuideSearchTimer(void) {
|
||||
@@ -606,26 +608,6 @@ void cTVGuideSearchTimer::GetDelModes(std::vector<std::string> *delModes) {
|
||||
delModes->push_back(tr("count days"));
|
||||
}
|
||||
|
||||
void cTVGuideSearchTimer::SetStartChannel(int startChannel)
|
||||
{
|
||||
#if VDRVERSNUM >= 20301
|
||||
LOCK_CHANNELS_READ;
|
||||
channelMin = Channels->GetByNumber(startChannel);
|
||||
#else
|
||||
channelMin = Channels.GetByNumber(startChannel);
|
||||
#endif
|
||||
};
|
||||
|
||||
void cTVGuideSearchTimer::SetStopChannel(int stopChannel)
|
||||
{
|
||||
#if VDRVERSNUM >= 20301
|
||||
LOCK_CHANNELS_READ;
|
||||
channelMax = Channels->GetByNumber(stopChannel);
|
||||
#else
|
||||
channelMax = Channels.GetByNumber(stopChannel);
|
||||
#endif
|
||||
};
|
||||
|
||||
void cTVGuideSearchTimer::Dump(void) {
|
||||
esyslog("tvguide searchtimer: strTimer: %s", strTimer.c_str());
|
||||
esyslog("tvguide searchtimer: ID: %d", ID);
|
||||
|
@@ -83,15 +83,15 @@ public:
|
||||
bool UseInFavorites(void) { return useInFavorites; };
|
||||
//SETTER
|
||||
void SetSearchString(std::string searchString) { this->searchString = searchString; };
|
||||
void SetSearchMode(int searchMode) { mode = searchMode; };
|
||||
void SetSearchMode(int mode) { this->mode = mode; };
|
||||
void SetFuzzyTolerance(int fuzzyTolerance) { this->fuzzyTolerance = fuzzyTolerance; };
|
||||
void SetUseCase(bool useCase) { this->useCase = useCase; };
|
||||
void SetUseTitle(bool useTitle) { this->useTitle = useTitle; };
|
||||
void SetUseSubtitle(bool useSubtitle) { this->useSubtitle = useSubtitle; };
|
||||
void SetUseDesription(bool useDescription) { this->useDescription = useDescription; };
|
||||
void SetUseChannel(int useChannel) { this->useChannel = useChannel; };
|
||||
void SetStartChannel(int startChannel);
|
||||
void SetStopChannel(int stopChannel);
|
||||
void SetStartChannel(const cChannel *channelMin) { this->channelMin = channelMin; };
|
||||
void SetStopChannel(const cChannel *channelMax) { this->channelMax = channelMax; };
|
||||
void SetChannelGroup(std::string channelGroup) { this->channelGroup = channelGroup; };
|
||||
void SetUseTime(bool useTime) { this->useTime = useTime; };
|
||||
void SetStartTime(int startTime) { this->startTime = startTime; };
|
||||
|
@@ -26,7 +26,7 @@
|
||||
#error "VDR-2.0.0 API version or greater is required!"
|
||||
#endif
|
||||
|
||||
static const char *VERSION = "1.2.8";
|
||||
static const char *VERSION = "1.2.9";
|
||||
static const char *DESCRIPTION = tr("A fancy 2d EPG Viewer");
|
||||
static const char *MAINMENUENTRY = "Tvguide";
|
||||
|
||||
@@ -62,9 +62,9 @@ cPluginTvguide::~cPluginTvguide() {
|
||||
|
||||
const char *cPluginTvguide::CommandLineHelp(void) {
|
||||
return
|
||||
" -e <IMAGESDIR>, --epgimages=<IMAGESDIR> Set directory where epgimages are stored.\n"
|
||||
" -i <ICONDIR>, --icons=<ICONDIR> Set directory where icons are stored.\n"
|
||||
" -l <LOGODIR>, --logodir=<LOGODIR> Set directory where logos are stored.\n";
|
||||
" -e <IMAGESDIR>, --epgimages=<IMAGESDIR> Set directory where epgimages are stored.\n"
|
||||
" -i <ICONDIR>, --iconpath=<ICONDIR> Set directory where icons are stored.\n"
|
||||
" -l <LOGODIR>, --logopath=<LOGODIR> Set directory where logos are stored.\n";
|
||||
}
|
||||
|
||||
bool cPluginTvguide::ProcessArgs(int argc, char *argv[]) {
|
||||
|
Reference in New Issue
Block a user