summaryrefslogtreecommitdiff
path: root/mymenurenamerecording.c
diff options
context:
space:
mode:
authorMartin Prochnow <nordlicht@martins-kabuff.de>2006-03-29 18:54:49 +0200
committerAndreas Mair <andreas@vdr-developer.org>2006-03-29 18:54:49 +0200
commit0ff08f0bfb1460e0d0035081956a75b92aaa8359 (patch)
tree3a77a0dec260c32659bf7dda9e35ef04299b8d47 /mymenurenamerecording.c
parent54d5f6870a7351584fcb1c3e861a4fc9224badf3 (diff)
downloadvdr-plugin-extrecmenu-0ff08f0bfb1460e0d0035081956a75b92aaa8359.tar.gz
vdr-plugin-extrecmenu-0ff08f0bfb1460e0d0035081956a75b92aaa8359.tar.bz2
Version 0.8v0.8
- added some logging - added option to hide the "new recordings column" - added possibility to edit lifetime and priority at the rename menu - changed alternative new marker, it marks now the recordings that are not "rewinded", if turned of the behaviour is like that of VDR's recordings menu - added support for a file length.vdr, containing the length of a recording as a string - new version of 'dvdarchive.sh'; thanks to vejoun from vdr-portal.de - added two small tools (in tools/); isodetect to check for a dvd in drive (optionally used by 'dvdarchive.sh'); getlength to create a length.vdr - updated error messages, more detailed now - fixed quoting of the parameters for dvdarchive.sh to avoid problems with filenames containing a ' - fixed unnecessary calls of 'dvdarchive.sh'; thanks to vejoun from vdr-portal.de for reporting
Diffstat (limited to 'mymenurenamerecording.c')
-rw-r--r--mymenurenamerecording.c25
1 files changed, 20 insertions, 5 deletions
diff --git a/mymenurenamerecording.c b/mymenurenamerecording.c
index 5259f3d..646813e 100644
--- a/mymenurenamerecording.c
+++ b/mymenurenamerecording.c
@@ -12,6 +12,8 @@
myMenuRenameRecording::myMenuRenameRecording(cRecording *Recording,myMenuRecordings *MenuRecordings):cOsdMenu(tr("Rename recording"),12)
{
recording=Recording;
+ priority=recording->priority;
+ lifetime=recording->lifetime;
menurecordings=MenuRecordings;
char *p=strrchr(recording->Name(),'~');
@@ -30,13 +32,15 @@ myMenuRenameRecording::myMenuRenameRecording(cRecording *Recording,myMenuRecordi
strn0cpy(path,"",sizeof(path));
}
Add(new cMenuEditStrItem(tr("Name"),name,sizeof(name),tr(FileNameChars)));
- cRemote::Put(kRight);
+ Add(new cMenuEditIntItem(tr("Priority"),&priority,0,MAXPRIORITY));
+ Add(new cMenuEditIntItem(tr("Lifetime"),&lifetime,0,MAXLIFETIME));
+// cRemote::Put(kRight);
}
eOSState myMenuRenameRecording::ProcessKey(eKeys Key)
{
eOSState state=cOsdMenu::ProcessKey(Key);
- if(state==osContinue)
+ if(state==osUnknown) // ==osContinue)
{
if(Key==kOk)
{
@@ -48,7 +52,18 @@ eOSState myMenuRenameRecording::ProcessKey(eKeys Key)
else
asprintf(&buffer,"%s",name);
- asprintf(&newfilename,"%s/%s/%s",VideoDirectory,ExchangeChars(buffer,true),strrchr(recording->FileName(),'/')+1);
+// asprintf(&newfilename,"%s/%s/%s",VideoDirectory,ExchangeChars(buffer,true),strrchr(recording->FileName(),'/')+1);
+ struct tm tm_r;
+ struct tm *t=localtime_r(&recording->start, &tm_r);
+ asprintf(&newfilename,"%s/%s/%d-%02d-%02d.%02d.%02d.%02d.%02d.rec",
+ VideoDirectory,
+ ExchangeChars(buffer,true),
+ t->tm_year+1900,
+ t->tm_mon+1,
+ t->tm_mday,
+ t->tm_hour,
+ t->tm_min,
+ priority,lifetime);
if(MoveVideoFile(recording,newfilename))
{
@@ -63,8 +78,8 @@ eOSState myMenuRenameRecording::ProcessKey(eKeys Key)
free(buffer);
free(newfilename);
}
- if(Key==kBack)
- return osBack;
+// if(Key==kBack)
+// return osBack;
}
return state;
}