summaryrefslogtreecommitdiff
path: root/videodir.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2013-10-10 13:13:30 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2013-10-10 13:13:30 +0200
commit2bdb599fbcfea5bac49fcf5550cd0fd1bc328d4a (patch)
tree88e9d6c0b7505f1c4d9374c26a4c3ee27dd6ee90 /videodir.c
parent3971cc6e8845f2a70018b20706f4a30d71edd41d (diff)
downloadvdr-2bdb599fbcfea5bac49fcf5550cd0fd1bc328d4a.tar.gz
vdr-2bdb599fbcfea5bac49fcf5550cd0fd1bc328d4a.tar.bz2
Added renaming and moving recordings and folders, and editing a recording's priority and lifetime; added cutting queue
Diffstat (limited to 'videodir.c')
-rw-r--r--videodir.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/videodir.c b/videodir.c
index cd739ea1..1885a1a7 100644
--- a/videodir.c
+++ b/videodir.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: videodir.c 3.2 2013/09/11 12:20:37 kls Exp $
+ * $Id: videodir.c 3.3 2013/10/08 13:26:41 kls Exp $
*/
#include "videodir.h"
@@ -79,6 +79,7 @@ bool cVideoDirectory::Register(const char *FileName)
bool cVideoDirectory::Rename(const char *OldName, const char *NewName)
{
+ dsyslog("renaming '%s' to '%s'", OldName, NewName);
if (rename(OldName, NewName) == -1) {
LOG_ERROR_STR(NewName);
return false;
@@ -88,10 +89,15 @@ bool cVideoDirectory::Rename(const char *OldName, const char *NewName)
bool cVideoDirectory::Move(const char *FromName, const char *ToName)
{
- if (rename(FromName, ToName) == -1) {
- LOG_ERROR_STR(ToName);
- return false;
+ dsyslog("moving '%s' to '%s'", FromName, ToName);
+ if (EntriesOnSameFileSystem(FromName, ToName)) {
+ if (rename(FromName, ToName) == -1) {
+ LOG_ERROR_STR(ToName);
+ return false;
+ }
}
+ else
+ return RecordingsHandler.Add(ruMove, FromName, ToName);
return true;
}