mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Avoiding double entries when externally renaming a recording (cont'd)
This commit is contained in:
parent
1379b621f7
commit
ae4ffacbda
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* 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"
|
#include "recording.h"
|
||||||
@ -1390,7 +1390,7 @@ void cRecordings::Refresh(bool Foreground)
|
|||||||
ScanVideoDir(cVideoDirectory::Name(), 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;
|
bool DoChangeState = false;
|
||||||
// Find any new recordings:
|
// Find any new recordings:
|
||||||
@ -1432,7 +1432,7 @@ void cRecordings::ScanVideoDir(const char *DirName, bool Foreground, int LinkLev
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
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();
|
ChangeState();
|
||||||
|
return DoChangeState;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cRecordings::StateChanged(int &State)
|
bool cRecordings::StateChanged(int &State)
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: recording.h 3.2 2013/12/24 13:32:18 kls Exp $
|
* $Id: recording.h 3.3 2013/12/27 11:05:07 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __RECORDING_H
|
#ifndef __RECORDING_H
|
||||||
@ -223,7 +223,7 @@ private:
|
|||||||
int state;
|
int state;
|
||||||
const char *UpdateFileName(void);
|
const char *UpdateFileName(void);
|
||||||
void Refresh(bool Foreground = false);
|
void Refresh(bool Foreground = false);
|
||||||
void ScanVideoDir(const char *DirName, bool Foreground = false, int LinkLevel = 0, int DirLevel = 0);
|
bool ScanVideoDir(const char *DirName, bool Foreground = false, int LinkLevel = 0, int DirLevel = 0);
|
||||||
protected:
|
protected:
|
||||||
void Action(void);
|
void Action(void);
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user