Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: renaming recordings



On Sun, 1 Jun 2003 00:53:35 +0000 (UTC)
 Torsten Kunkel <vdrml@tkunkel.de> wrote:
>Gerhard Steiner <steiner@mail.austria.com> wrote:
>> vdr is storing this information within the directory
>name.
>> Does anyone know how to change the directory name using
>> c/c++?
>> Now I am using a "mv" command.
>> But isn't there a better way?
>
>I think there is a much better way. I'm looking for this
>problem since
>a few days, too.
>Take a look at the delete-function. There the recording is
>renamed to
>RECODERING+.del . Renaming recodrings to HansPeter1 is
>very similar I
>think.
>
>I defined a new function "Rename(*TargetNewName)" in
>recording.c
>It is copied from the delete:
>
>// TK Neue Funktion zum Umbenennen
>bool cRecording::Rename(char *TargetNewName)
>{
>  bool result = true;
>  char *OldName = strdup(FileName());
>  char *NewName = strdup(FileName());
>  char *ext = strrchr(NewName, '.');
>  if (strcmp(ext, RECEXT) == 0) {
>     strncpy(ext, DELEXT, strlen(ext));
>     if (access(NewName, F_OK) == 0) {
>        // the new name already exists, so stop renaming:
>                isyslog("stop renaming %s to %s", OldName,
>TargetNewName);
>     }else{
>                isyslog("renamin %s to %s", FileName(),
>TargetNewName);
>                result = RenameVideoFile(FileName(),
>TargetNewName);
>     }
>  free(NewName);
>  return result;
>}
>
>My problem is, how to get the new recording-name. I'm
>looking for a
>new screen like the edit-option for Timers or something
>like this.
>
>The problem is, i don't have great knowledge of c/c++, so
>the work is
>very hard :/
>
>
>I hope it may help someone who does know more of this.
>
>Torsten
>
>p.s. sorry for my bad English
>

It isn't a problem to change the last directory (where the
priority and the lifetime is stored. The problem is to
change the name, which is stored one dir-level higher
(rename does not work, at least it seams to me).
Changing prior and Lifetime does already work.

One other problem is to change all(!) names on other
volumes!
vdr uses links to link them. If you change the name of the
recording under /video you also have to change the name on
the other /videoX (if there are some). And that's my
problem.

I do have a patch against vdr-1.1.33-MEGA for such a
dialog.
Unfortunatly i am beginning a job an monday, so I da not
have the time to implement these thing in days.
If someone is interested I can send him my sources to work
with.

Gerhard

----------------------------------------------
Das ist ein Service von austria.com


-- 
Info:
To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.



Home | Main Index | Thread Index