diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | commands.c | 14 |
2 files changed, 14 insertions, 2 deletions
@@ -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: @@ -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"); |