mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Avoiding extra blanks at the end of names of instant recordings
This commit is contained in:
parent
b0583e5373
commit
ed52b359bb
1
HISTORY
1
HISTORY
@ -3544,3 +3544,4 @@ Video Disk Recorder Revision History
|
|||||||
- The audio track menu now contains track descriptions when replaying (provided
|
- The audio track menu now contains track descriptions when replaying (provided
|
||||||
such descriptions were available in the EPG data when the recording was made,
|
such descriptions were available in the EPG data when the recording was made,
|
||||||
and are stored in the info.vdr file).
|
and are stored in the info.vdr file).
|
||||||
|
- Avoiding extra blanks at the end of names of instant recordings.
|
||||||
|
10
recording.c
10
recording.c
@ -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 1.99 2005/05/16 14:19:38 kls Exp $
|
* $Id: recording.c 1.100 2005/05/16 15:17:22 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "recording.h"
|
#include "recording.h"
|
||||||
@ -386,6 +386,14 @@ cRecording::cRecording(cTimer *Timer, const cEvent *Event)
|
|||||||
name = strdup(Timer->File());
|
name = strdup(Timer->File());
|
||||||
name = strreplace(name, TIMERMACRO_TITLE, Title);
|
name = strreplace(name, TIMERMACRO_TITLE, Title);
|
||||||
name = strreplace(name, TIMERMACRO_EPISODE, Subtitle);
|
name = strreplace(name, TIMERMACRO_EPISODE, Subtitle);
|
||||||
|
// avoid blanks at the end:
|
||||||
|
int l = strlen(name);
|
||||||
|
while (l-- > 2) {
|
||||||
|
if (name[l] == ' ' && name[l - 1] != '~')
|
||||||
|
name[l] = 0;
|
||||||
|
else
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (Timer->IsSingleEvent()) {
|
if (Timer->IsSingleEvent()) {
|
||||||
Timer->SetFile(name); // this was an instant recording, so let's set the actual data
|
Timer->SetFile(name); // this was an instant recording, so let's set the actual data
|
||||||
Timers.SetModified();
|
Timers.SetModified();
|
||||||
|
Loading…
Reference in New Issue
Block a user