mirror of
				https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
				synced 2023-10-05 13:01:48 +00:00 
			
		
		
		
	Added Event Short Text (if available) to RecName
This commit is contained in:
		
							
								
								
									
										1
									
								
								HISTORY
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								HISTORY
									
									
									
									
									
								
							@@ -91,3 +91,4 @@ Version 1.1.0
 | 
			
		||||
- fixed wrong font for clock in horizontal view
 | 
			
		||||
- Added feature to jump to a specific channel with number keys
 | 
			
		||||
- Fixed Bug 1484
 | 
			
		||||
- Added Event Short Text (if available) to RecName (Closes Ticket 1490)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										17
									
								
								recmanager.c
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								recmanager.c
									
									
									
									
									
								
							@@ -98,14 +98,14 @@ cTimer *cRecManager::createLocalTimer(const cEvent *event, std::string path) {
 | 
			
		||||
        Timers.Add(timer);
 | 
			
		||||
        isyslog("timer %s added (active)", *timer->ToDescr());
 | 
			
		||||
    }
 | 
			
		||||
    SetTimerPath(timer, path);
 | 
			
		||||
    SetTimerPath(timer, event, path);
 | 
			
		||||
    Timers.SetModified();
 | 
			
		||||
    return timer;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
cTimer *cRecManager::createRemoteTimer(const cEvent *event, std::string path) {
 | 
			
		||||
    cTimer *t = new cTimer(event);
 | 
			
		||||
    SetTimerPath(t, path);
 | 
			
		||||
    SetTimerPath(t, event, path);
 | 
			
		||||
    RemoteTimers_Timer_v1_0 rt;
 | 
			
		||||
    rt.timer = t;
 | 
			
		||||
    pRemoteTimers->Service("RemoteTimers::GetTimer-v1.0", &rt.timer);
 | 
			
		||||
@@ -122,12 +122,19 @@ cTimer *cRecManager::createRemoteTimer(const cEvent *event, std::string path) {
 | 
			
		||||
    return rt.timer;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void cRecManager::SetTimerPath(cTimer *timer, std::string path) {
 | 
			
		||||
void cRecManager::SetTimerPath(cTimer *timer, const cEvent *event, std::string path) {
 | 
			
		||||
    cString newFileName;
 | 
			
		||||
    if (path.size() > 0) {
 | 
			
		||||
        std::replace(path.begin(), path.end(), '/', '~');
 | 
			
		||||
        cString newFileName = cString::sprintf("%s~%s", path.c_str(), timer->File());
 | 
			
		||||
        timer->SetFile(*newFileName);
 | 
			
		||||
        newFileName = cString::sprintf("%s~%s", path.c_str(), timer->File());
 | 
			
		||||
    } else {
 | 
			
		||||
        newFileName = event->Title();
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    if(!isempty(event->ShortText()))
 | 
			
		||||
        newFileName = cString::sprintf("%s~%s", *newFileName, event->ShortText());
 | 
			
		||||
    
 | 
			
		||||
    timer->SetFile(*newFileName);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void cRecManager::DeleteTimer(int timerID) {
 | 
			
		||||
 
 | 
			
		||||
@@ -42,7 +42,7 @@ public:
 | 
			
		||||
    cTimer *createTimer(const cEvent *event, std::string path);
 | 
			
		||||
    cTimer *createLocalTimer(const cEvent *event, std::string path);
 | 
			
		||||
    cTimer *createRemoteTimer(const cEvent *event, std::string path);
 | 
			
		||||
    void SetTimerPath(cTimer *timer, std::string path);
 | 
			
		||||
    void SetTimerPath(cTimer *timer, const cEvent *event, std::string path);
 | 
			
		||||
    void DeleteTimer(int timerID);
 | 
			
		||||
    void DeleteTimer(const cEvent *event);
 | 
			
		||||
    void DeleteLocalTimer(const cEvent *event);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user