mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
The -V and -h options now list the plugins in alphabetical order
This commit is contained in:
parent
fa701228d7
commit
165aa63d2e
@ -3352,6 +3352,7 @@ Dietmar Spingler <d_spingler@gmx.de>
|
||||
CAMs that need to receive the TS
|
||||
for suggesting to add the channel name to log messages that reference a channel
|
||||
for suggesting to provide a way of using no DVB devices at all
|
||||
for suggesting that the -V and -h options should list the plugins in alphabetical order
|
||||
|
||||
Stefan Schallenberg <infos@nafets.de>
|
||||
for adding the functions IndexOf(), InsertUnique(), AppendUnique() and RemoveElement()
|
||||
|
2
HISTORY
2
HISTORY
@ -8633,3 +8633,5 @@ Video Disk Recorder Revision History
|
||||
by time.
|
||||
- The command line option -D now accepts the value '-' (as in -D-), which prevents
|
||||
VDR from using any DVB devices (suggested by Dietmar Spingler).
|
||||
- The -V and -h options now list the plugins in alphabetical order (suggested by
|
||||
Dietmar Spingler).
|
||||
|
16
plugin.c
16
plugin.c
@ -4,7 +4,7 @@
|
||||
* See the main source file 'vdr.c' for copyright information and
|
||||
* how to reach the author.
|
||||
*
|
||||
* $Id: plugin.c 2.4 2012/09/01 13:10:27 kls Exp $
|
||||
* $Id: plugin.c 4.1 2015/04/18 14:51:20 kls Exp $
|
||||
*/
|
||||
|
||||
#include "plugin.h"
|
||||
@ -318,18 +318,18 @@ void cPluginManager::SetDirectory(const char *Directory)
|
||||
void cPluginManager::AddPlugin(const char *Args)
|
||||
{
|
||||
if (strcmp(Args, "*") == 0) {
|
||||
cReadDir d(directory);
|
||||
struct dirent *e;
|
||||
while ((e = d.Next()) != NULL) {
|
||||
if (strstr(e->d_name, LIBVDR_PREFIX) == e->d_name) {
|
||||
char *p = strstr(e->d_name, SO_INDICATOR);
|
||||
cFileNameList Files(directory);
|
||||
for (int i = 0; i < Files.Size(); i++) {
|
||||
char *FileName = Files.At(i);
|
||||
if (strstr(FileName, LIBVDR_PREFIX) == FileName) {
|
||||
char *p = strstr(FileName, SO_INDICATOR);
|
||||
if (p) {
|
||||
*p = 0;
|
||||
p += strlen(SO_INDICATOR);
|
||||
if (strcmp(p, APIVERSION) == 0) {
|
||||
char *name = e->d_name + strlen(LIBVDR_PREFIX);
|
||||
char *name = FileName + strlen(LIBVDR_PREFIX);
|
||||
if (strcmp(name, "*") != 0) { // let's not get into a loop!
|
||||
AddPlugin(e->d_name + strlen(LIBVDR_PREFIX));
|
||||
AddPlugin(FileName + strlen(LIBVDR_PREFIX));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user