diff options
author | Jochen Dolze <vdr@dolze.de> | 2012-05-22 11:17:48 +0200 |
---|---|---|
committer | Jochen Dolze <vdr@dolze.de> | 2012-05-22 11:17:48 +0200 |
commit | 33eaaac2c2f5bc65ccaf032a536ad731e6fda925 (patch) | |
tree | c335910e22fd2f51fb3dd623e14dcc5da9bc5b4f | |
parent | 4679453a0ce63ffa5e24b9eaf11f7afd85517b7d (diff) | |
download | vdr-plugin-markad-33eaaac2c2f5bc65ccaf032a536ad731e6fda925.tar.gz vdr-plugin-markad-33eaaac2c2f5bc65ccaf032a536ad731e6fda925.tar.bz2 |
Added support for reelvdr info.txt
-rw-r--r-- | command/markad-standalone.cpp | 20 | ||||
-rw-r--r-- | command/markad-standalone.h | 1 |
2 files changed, 17 insertions, 4 deletions
diff --git a/command/markad-standalone.cpp b/command/markad-standalone.cpp index 777a73a..790e73c 100644 --- a/command/markad-standalone.cpp +++ b/command/markad-standalone.cpp @@ -54,9 +54,9 @@ static inline int ioprio_set(int which, int who, int ioprio) #endif if (__NR_ioprio_set) { - return syscall(__NR_ioprio_set, which, who, ioprio); + return syscall(__NR_ioprio_set, which, who, ioprio); } else { - return 0; // just do nothing + return 0; // just do nothing } } @@ -1217,7 +1217,11 @@ bool cMarkAdStandalone::SaveInfo() { isyslog("writing info file"); char *src,*dst; - if (asprintf(&src,"%s/info%s",directory,isTS ? "" : ".vdr")==-1) return false; + if (isREEL) { + if (asprintf(&src,"%s/info.txt",directory)==-1) return false; + } else { + if (asprintf(&src,"%s/info%s",directory,isTS ? "" : ".vdr")==-1) return false; + } if (asprintf(&dst,"%s/info.bak",directory)==-1) { @@ -1518,7 +1522,14 @@ bool cMarkAdStandalone::LoadInfo() FILE *f; f=fopen(buf,"r"); free(buf); - if (!f) return false; + if (!f) { + // second try for reel vdr + if (asprintf(&buf,"%s/info.txt",directory)==-1) return false; + f=fopen(buf,"r"); + free(buf); + if (!f) return false; + isREEL=true; + } char *line=NULL; size_t linelen; @@ -1999,6 +2010,7 @@ cMarkAdStandalone::cMarkAdStandalone(const char *Directory, const MarkAdConfig * gotendmark=false; inBroadCast=false; iStopinBroadCast=false; + isREEL=false; indexFile=NULL; streaminfo=NULL; diff --git a/command/markad-standalone.h b/command/markad-standalone.h index 66761e0..a29e5fa 100644 --- a/command/markad-standalone.h +++ b/command/markad-standalone.h @@ -178,6 +178,7 @@ unsigned Descriptor_Length: bool duplicate; // are we a dup? bool isTS; + bool isREEL; int MaxFiles; int lastiframe; |