diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2013-10-10 13:13:30 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2013-10-10 13:13:30 +0200 |
commit | 2bdb599fbcfea5bac49fcf5550cd0fd1bc328d4a (patch) | |
tree | 88e9d6c0b7505f1c4d9374c26a4c3ee27dd6ee90 /videodir.c | |
parent | 3971cc6e8845f2a70018b20706f4a30d71edd41d (diff) | |
download | vdr-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.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -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; } |