mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Added icon path as start option
This commit is contained in:
parent
a5330c715e
commit
92437a3951
13
tvguide.c
13
tvguide.c
@ -72,7 +72,8 @@ const char *cPluginTvguide::CommandLineHelp(void)
|
|||||||
{
|
{
|
||||||
// Return a string that describes all known command line options.
|
// Return a string that describes all known command line options.
|
||||||
return
|
return
|
||||||
" -i <IMAGESDIR>, --epgimages=<IMAGESDIR> Set directory where epgimages are stored\n"
|
" -i <IMAGESDIR>, --epgimages=<IMAGESDIR> Set directory where epgimages are stored.\n"
|
||||||
|
" -c <ICONDIR>, --icons=<ICONDIR> Set directory where icons are stored.\n"
|
||||||
" -l <LOGODIR>, --logodir=<LOGODIR> Set directory where logos are stored.\n";
|
" -l <LOGODIR>, --logodir=<LOGODIR> Set directory where logos are stored.\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -81,19 +82,25 @@ bool cPluginTvguide::ProcessArgs(int argc, char *argv[])
|
|||||||
// Implement command line argument processing here if applicable.
|
// Implement command line argument processing here if applicable.
|
||||||
static const struct option long_options[] = {
|
static const struct option long_options[] = {
|
||||||
{ "epgimages", required_argument, NULL, 'i' },
|
{ "epgimages", required_argument, NULL, 'i' },
|
||||||
|
{ "icons", required_argument, NULL, 'c' },
|
||||||
{ "logopath", required_argument, NULL, 'l' },
|
{ "logopath", required_argument, NULL, 'l' },
|
||||||
{ 0, 0, 0, 0 }
|
{ 0, 0, 0, 0 }
|
||||||
};
|
};
|
||||||
|
|
||||||
int c;
|
int c;
|
||||||
cString *path = NULL;
|
cString *path = NULL;
|
||||||
while ((c = getopt_long(argc, argv, "i:f:l:", long_options, NULL)) != -1) {
|
while ((c = getopt_long(argc, argv, "i:c:l:", long_options, NULL)) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'i':
|
case 'i':
|
||||||
path = new cString(optarg);
|
path = new cString(optarg);
|
||||||
tvguideConfig.SetImagesPath(*path);
|
tvguideConfig.SetImagesPath(*path);
|
||||||
imagesPathSet = true;
|
imagesPathSet = true;
|
||||||
break;
|
break;
|
||||||
|
case 'c':
|
||||||
|
path = new cString(optarg);
|
||||||
|
tvguideConfig.SetIconsPath(*path);
|
||||||
|
iconsPathSet = true;
|
||||||
|
break;
|
||||||
case 'l':
|
case 'l':
|
||||||
path = new cString(optarg);
|
path = new cString(optarg);
|
||||||
tvguideConfig.SetLogoPath(*path);
|
tvguideConfig.SetLogoPath(*path);
|
||||||
@ -129,7 +136,7 @@ bool cPluginTvguide::Start(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!iconsPathSet) {
|
if (!iconsPathSet) {
|
||||||
cString path = cString::sprintf("%s/icons/", cPlugin::ConfigDirectory(PLUGIN_NAME_I18N));
|
cString path = cString::sprintf("%s/icons/", cPlugin::ResourceDirectory(PLUGIN_NAME_I18N));
|
||||||
tvguideConfig.SetIconsPath(path);
|
tvguideConfig.SetIconsPath(path);
|
||||||
iconsPathSet = true;
|
iconsPathSet = true;
|
||||||
}
|
}
|
||||||
|
@ -120,10 +120,6 @@ void cTvGuideOsd::Show(void) {
|
|||||||
myTime = new cMyTime();
|
myTime = new cMyTime();
|
||||||
myTime->Now();
|
myTime->Now();
|
||||||
SwitchTimers.Load(AddDirectory(cPlugin::ConfigDirectory("epgsearch"), "epgsearchswitchtimers.conf"));
|
SwitchTimers.Load(AddDirectory(cPlugin::ConfigDirectory("epgsearch"), "epgsearchswitchtimers.conf"));
|
||||||
cSwitchTimer *st = NULL;
|
|
||||||
for (st = SwitchTimers.First(); st; st = SwitchTimers.Next(st)) {
|
|
||||||
esyslog("tvguide: switchtimer eventID %d time %ld", st->eventID, st->startTime);
|
|
||||||
}
|
|
||||||
recMenuManager = new cRecMenuManager();
|
recMenuManager = new cRecMenuManager();
|
||||||
drawOsd();
|
drawOsd();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user