summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--commands.c14
2 files changed, 14 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 8429425..2b78aed 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,7 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri
### The C++ compiler and options:
CXX ?= g++
-CXXFLAGS ?= -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
+CXXFLAGS ?= -O2 -Wall -Woverloaded-virtual -Wno-parentheses
### The directory environment:
diff --git a/commands.c b/commands.c
index c9bf489..0edcfc3 100644
--- a/commands.c
+++ b/commands.c
@@ -731,7 +731,19 @@ cCMDImageRead::cCMDImageRead(cImageList &imagelist)
{
dsyslog("dvdswitch: query name of volume %s",DVDSwitchSetup.DVDLinkOrg);
int err = volname(DVDSwitchSetup.DVDLinkOrg, File,sizeof(File));
- if(0 != err) {
+ if(0 == err) {
+ // Capitalization - lowercase name, except first character
+ bool s;
+ unsigned int n;
+ for (n = 0,s = true; n < sizeof(File) && File[n] != '\0'; ++n) {
+ if (isspace(File[n]) || '_' == File[n]) {
+ File[n] = ' ';
+ s = true;
+ } else if(s) { s = false; }
+ else { File[n] = tolower(File[n]); }
+ }
+
+ } else {
esyslog("dvdswitch: Can't query name of volume! %d", err);
OSDErrorNumMsg(err, tr("Can't query name of volume!"));
strcpy(File, "\0");