diff options
author | Martin Dummer <martin.dummer@gmx.net> | 2012-06-19 10:17:01 +0200 |
---|---|---|
committer | Martin Dummer <martin.dummer@gmx.net> | 2012-06-19 10:17:01 +0200 |
commit | 419938bd6b18ec3005cfe2ec223e87a96607f23e (patch) | |
tree | fda097218d8b465489799d5189280d2c76570ecf | |
parent | 11cc2720d384ea008225933d08ff65ceebfeedf5 (diff) | |
download | vdr-plugin-undelete-419938bd6b18ec3005cfe2ec223e87a96607f23e.tar.gz vdr-plugin-undelete-419938bd6b18ec3005cfe2ec223e87a96607f23e.tar.bz2 |
merge patch with changes for VDR >= 1.7.3 from Thomas Günther <tom@toms-cafe.de>
-rw-r--r-- | HISTORY | 1 | ||||
-rw-r--r-- | menuundelete.c | 13 | ||||
-rw-r--r-- | undelete.c | 13 |
3 files changed, 27 insertions, 0 deletions
@@ -45,5 +45,6 @@ VDR Plugin 'undelete' Revision History - edit the README file - merge patch for gcc-4.4 from Holger Schvestka <hotzenplotz5@gmx.de> - merge patch with changes for VDR >= 1.5.7 from Stone <syphyr@gmail.com> +- merge patch with changes for VDR >= 1.7.3 from Thomas Günther <tom@toms-cafe.de> diff --git a/menuundelete.c b/menuundelete.c index 6f9b2d9..0402c71 100644 --- a/menuundelete.c +++ b/menuundelete.c @@ -672,11 +672,20 @@ eOSState cMenuUndelete::ProcessKey(eKeys Key) processerror = true; } SalvageRecording = true; +#if VDRVERSNUM >= 10703 + cIndexFile *index = new cIndexFile(NewName, false, recording->IsPesRecording()); +#else cIndexFile *index = new cIndexFile(NewName, false); +#endif int LastFrame = index->Last() - 1; if (LastFrame > 0) { +#if VDRVERSNUM >= 10703 + uint16_t FileNumber = 0; + off_t FileOffset = 0; +#else uchar FileNumber = 0; int FileOffset = 0; +#endif index->Get(LastFrame, &FileNumber, &FileOffset); delete index; if (FileNumber == 0) { @@ -686,7 +695,11 @@ eOSState cMenuUndelete::ProcessKey(eKeys Key) } else { for (int i = 1; i <= FileNumber; i++) { char *temp; +#if VDRVERSNUM >= 10703 + asprintf(&temp, recording->IsPesRecording() ? "%s/%03d.vdr" : "%s/%05d.ts", (const char *)NewName, i); +#else asprintf(&temp, "%s/%03d.vdr", (const char *)NewName, i); +#endif if (access(temp, R_OK) != 0) { i = FileNumber; if (verbose.u) @@ -960,17 +960,30 @@ cString cPluginUndelete::SVDRPCommand(const char *Command, const char *Option, i asprintf(&temp, "%sS#%d#", SVDRP_Process ? SVDRP_Process : "", recnumber); free(SVDRP_Process); SVDRP_Process = temp; +#if VDRVERSNUM >= 10703 + cIndexFile *index = new cIndexFile(NewName, false, recording->IsPesRecording()); +#else cIndexFile *index = new cIndexFile(NewName, false); +#endif int LastFrame = index->Last() - 1; if (LastFrame > 0) { +#if VDRVERSNUM >= 10703 + uint16_t FileNumber = 0; + off_t FileOffset = 0; +#else uchar FileNumber = 0; int FileOffset = 0; +#endif index->Get(LastFrame, &FileNumber, &FileOffset); delete index; if (FileNumber == 0) return cString::sprintf("error while read last filenumber for \"%s\" [%s]", Option, recording->Title()); for (int i = 1; i <= FileNumber; i++) { +#if VDRVERSNUM >= 10703 + asprintf(&temp, recording->IsPesRecording() ? "%s/%03d.vdr" : "%s/%05d.ts", (const char *)NewName, i); +#else asprintf(&temp, "%s/%03d.vdr", (const char *)NewName, i); +#endif if (access(temp, R_OK) != 0) { free(temp); return cString::sprintf("error accessing vdrfile %03d for \"%s\" [%s]", i, Option, recording->Title()); |