summaryrefslogtreecommitdiff
path: root/recording.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2013-12-27 11:06:01 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2013-12-27 11:06:01 +0100
commitae4ffacbda85f06dd1a87b4a0300cbdbd10318fb (patch)
tree4846c7582080be1d8ceacc35178c48bc228ed43c /recording.c
parent1379b621f7246a46c4a74f7b5ddc34ceaf551efc (diff)
downloadvdr-ae4ffacbda85f06dd1a87b4a0300cbdbd10318fb.tar.gz
vdr-ae4ffacbda85f06dd1a87b4a0300cbdbd10318fb.tar.bz2
Avoiding double entries when externally renaming a recording (cont'd)
Diffstat (limited to 'recording.c')
-rw-r--r--recording.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/recording.c b/recording.c
index b91a3cb3..af73563a 100644
--- a/recording.c
+++ b/recording.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.c 3.10 2013/12/27 08:46:17 kls Exp $
+ * $Id: recording.c 3.11 2013/12/27 11:06:01 kls Exp $
*/
#include "recording.h"
@@ -1390,7 +1390,7 @@ void cRecordings::Refresh(bool Foreground)
ScanVideoDir(cVideoDirectory::Name(), Foreground);
}
-void cRecordings::ScanVideoDir(const char *DirName, bool Foreground, int LinkLevel, int DirLevel)
+bool cRecordings::ScanVideoDir(const char *DirName, bool Foreground, int LinkLevel, int DirLevel)
{
bool DoChangeState = false;
// Find any new recordings:
@@ -1432,7 +1432,7 @@ void cRecordings::ScanVideoDir(const char *DirName, bool Foreground, int LinkLev
}
}
else
- ScanVideoDir(buffer, Foreground, LinkLevel + Link, DirLevel + 1);
+ DoChangeState |= ScanVideoDir(buffer, Foreground, LinkLevel + Link, DirLevel + 1);
}
}
}
@@ -1450,8 +1450,9 @@ void cRecordings::ScanVideoDir(const char *DirName, bool Foreground, int LinkLev
}
}
}
- if (DoChangeState)
+ if (DoChangeState && DirLevel == 0)
ChangeState();
+ return DoChangeState;
}
bool cRecordings::StateChanged(int &State)