1
0
mirror of https://github.com/rofafor/vdr-plugin-iptv.git synced 2023-10-10 13:37:03 +02:00

Fixed installation target bugs (Thanks to Alexander Grothe).

This commit is contained in:
Rolf Ahrenberg 2014-03-09 16:04:54 +02:00
parent 935f659e34
commit aaca7cba1a
12 changed files with 43 additions and 22 deletions

View File

@ -226,6 +226,10 @@ VDR Plugin 'iptv' Revision History
- Made devices to shutdown already in cPluginManager::Stop()
to prevent possible crashes while VDR shutdown.
2014-03-09: Version 2.0.3
- Fixed installation target bugs (Thanks to Alexander Grothe).
==================================
VDR Plugin 'iptv' Revision History
@ -235,3 +239,7 @@ VDR Plugin 'iptv' Revision History
- Added initial CAM support.
- Added missing RTSP/UDP support.
2014-03-09: Version 2.1.1
- Fixed installation target bugs (Thanks to Alexander Grothe).

View File

@ -32,6 +32,7 @@ PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(s
LIBDIR = $(call PKGCFG,libdir)
LOCDIR = $(call PKGCFG,locdir)
PLGCFG = $(call PKGCFG,plgcfg)
RESDIR = $(call PKGCFG,resdir)
CFGDIR = $(call PKGCFG,configdir)
#
TMPDIR ?= /tmp
@ -147,7 +148,8 @@ install-lib: $(SOFILE)
install-conf:
@mkdir -p $(DESTDIR)$(CFGDIR)/plugins/$(PLUGIN)
@cp -pn $(PLUGIN)/* $(DESTDIR)$(CFGDIR)/plugins/$(PLUGIN)/
@mkdir -p $(DESTDIR)$(RESDIR)/plugins/$(PLUGIN)
@cp -pn $(PLUGIN)/* $(DESTDIR)$(RESDIR)/plugins/$(PLUGIN)/
install: install-lib install-i18n install-conf

View File

@ -19,6 +19,7 @@ cIptvConfig::cIptvConfig(void)
for (unsigned int i = 0; i < ARRAY_SIZE(disabledFiltersM); ++i)
disabledFiltersM[i] = -1;
memset(configDirectoryM, 0, sizeof(configDirectoryM));
memset(resourceDirectoryM, 0, sizeof(resourceDirectoryM));
}
unsigned int cIptvConfig::GetDisabledFiltersCount(void) const
@ -45,3 +46,9 @@ void cIptvConfig::SetConfigDirectory(const char *directoryP)
debug("cIptvConfig::%s(%s)", __FUNCTION__, directoryP);
ERROR_IF(!realpath(directoryP, configDirectoryM), "Cannot canonicalize configuration directory");
}
void cIptvConfig::SetResourceDirectory(const char *directoryP)
{
debug("cIptvConfig::%s(%s)", __FUNCTION__, directoryP);
ERROR_IF(!realpath(directoryP, resourceDirectoryM), "Cannot canonicalize resource directory");
}

View File

@ -21,6 +21,7 @@ private:
unsigned int sectionFilteringM;
int disabledFiltersM[SECTION_FILTER_TABLE_SIZE];
char configDirectoryM[PATH_MAX];
char resourceDirectoryM[PATH_MAX];
public:
cIptvConfig();
@ -30,6 +31,7 @@ public:
unsigned int GetUseBytes(void) const { return useBytesM; }
unsigned int GetSectionFiltering(void) const { return sectionFilteringM; }
const char *GetConfigDirectory(void) const { return configDirectoryM; }
const char *GetResourceDirectory(void) const { return resourceDirectoryM; }
unsigned int GetDisabledFiltersCount(void) const;
int GetDisabledFilters(unsigned int indexP) const;
void SetTsBufferSize(unsigned int sizeP) { tsBufferSizeM = sizeP; }
@ -39,6 +41,7 @@ public:
void SetSectionFiltering(unsigned int onOffP) { sectionFilteringM = onOffP; }
void SetDisabledFilters(unsigned int indexP, int numberP);
void SetConfigDirectory(const char *directoryP);
void SetResourceDirectory(const char *directoryP);
};
extern cIptvConfig IptvConfig;

5
iptv.c
View File

@ -21,7 +21,7 @@
#define GITVERSION ""
#endif
const char VERSION[] = "2.1.0" GITVERSION;
const char VERSION[] = "2.1.1" GITVERSION;
static const char DESCRIPTION[] = trNOOP("Experience the IPTV");
class cPluginIptv : public cPlugin {
@ -99,7 +99,8 @@ bool cPluginIptv::Initialize(void)
{
debug("cPluginIptv::%s()", __FUNCTION__);
// Initialize any background activities the plugin shall perform.
IptvConfig.SetConfigDirectory(cPlugin::ResourceDirectory(PLUGIN_NAME_I18N));
IptvConfig.SetConfigDirectory(cPlugin::ConfigDirectory(PLUGIN_NAME_I18N));
IptvConfig.SetResourceDirectory(cPlugin::ResourceDirectory(PLUGIN_NAME_I18N));
return cIptvDevice::Initialize(deviceCountM);
}

View File

@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-iptv 2.1.0\n"
"Project-Id-Version: vdr-iptv 2.1.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-01-08 01:18+0200\n"
"PO-Revision-Date: 2014-01-08 01:18+0200\n"
"POT-Creation-Date: 2014-03-09 03:09+0200\n"
"PO-Revision-Date: 2014-03-09 03:09+0200\n"
"Last-Translator: Tobias Grimm <tg@e-tobi.net>\n"
"Language-Team: German <vdr@linuxtv.org>\n"
"Language: de\n"

View File

@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-iptv 2.1.0\n"
"Project-Id-Version: vdr-iptv 2.1.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-01-08 01:18+0200\n"
"PO-Revision-Date: 2014-01-08 01:18+0200\n"
"POT-Creation-Date: 2014-03-09 03:09+0200\n"
"PO-Revision-Date: 2014-03-09 03:09+0200\n"
"Last-Translator: Rolf Ahrenberg\n"
"Language-Team: Finnish <vdr@linuxtv.org>\n"
"Language: fi\n"

View File

@ -6,10 +6,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-iptv 2.1.0\n"
"Project-Id-Version: vdr-iptv 2.1.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-01-08 01:18+0200\n"
"PO-Revision-Date: 2014-01-08 01:18+0200\n"
"POT-Creation-Date: 2014-03-09 03:09+0200\n"
"PO-Revision-Date: 2014-03-09 03:09+0200\n"
"Last-Translator: NIVAL Michaël <mnival@club-internet.fr>\n"
"Language-Team: French <vdr@linuxtv.org>\n"
"Language: fr\n"

View File

@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-iptv 2.1.0\n"
"Project-Id-Version: vdr-iptv 2.1.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-01-08 01:18+0200\n"
"PO-Revision-Date: 2014-01-08 01:18+0200\n"
"POT-Creation-Date: 2014-03-09 03:09+0200\n"
"PO-Revision-Date: 2014-03-09 03:09+0200\n"
"Last-Translator: Diego Pierotto <vdr-italian@tiscali.it>\n"
"Language-Team: Italian <vdr@linuxtv.org>\n"
"Language: it\n"

View File

@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-iptv 2.1.0\n"
"Project-Id-Version: vdr-iptv 2.1.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-01-08 01:18+0200\n"
"PO-Revision-Date: 2014-01-08 01:18+0200\n"
"POT-Creation-Date: 2014-03-09 03:09+0200\n"
"PO-Revision-Date: 2014-03-09 03:09+0200\n"
"Last-Translator: Carel\n"
"Language-Team: Dutch <vdr@linuxtv.org>\n"
"Language: nl\n"

View File

@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: vdr-iptv 2.1.0\n"
"Project-Id-Version: vdr-iptv 2.1.1\n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2014-01-08 01:18+0200\n"
"PO-Revision-Date: 2014-01-08 01:18+0200\n"
"POT-Creation-Date: 2014-03-09 03:09+0200\n"
"PO-Revision-Date: 2014-03-09 03:09+0200\n"
"Last-Translator: Alexander Gross <Bikalexander@gmail.com>\n"
"Language-Team: Russian <vdr@linuxtv.org>\n"
"Language: ru\n"

View File

@ -158,7 +158,7 @@ bool cIptvProtocolExt::SetSource(const char* locationP, const int parameterP, co
if (!isempty(locationP)) {
struct stat stbuf;
// Update script file and parameter
scriptFileM = cString::sprintf("%s/%s", IptvConfig.GetConfigDirectory(), locationP);
scriptFileM = cString::sprintf("%s/%s", IptvConfig.GetResourceDirectory(), locationP);
if ((stat(*scriptFileM, &stbuf) != 0) || (strstr(*scriptFileM, "..") != 0)) {
error("Non-existent or relative path script '%s'", *scriptFileM);
return false;