getservices: add option to not save removed channels

Origin commit data
------------------
Branch: ni/coolstream
Commit: 1aa0915512
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-04-13 (Sat, 13 Apr 2013)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2013-04-13 22:53:38 +02:00
parent 858bd31770
commit 7e15658420
2 changed files with 5 additions and 3 deletions

View File

@@ -109,7 +109,7 @@ class CServiceManager
bool InitSatPosition(t_satellite_position position, char * name = NULL, bool force = false); bool InitSatPosition(t_satellite_position position, char * name = NULL, bool force = false);
bool LoadServices(bool only_current); bool LoadServices(bool only_current);
void SaveServices(bool tocopy, bool if_changed = false); void SaveServices(bool tocopy, bool if_changed = false, bool no_deleted = false);
void SaveMotorPositions(); void SaveMotorPositions();
bool SaveCurrentServices(transponder_id_t tpid); bool SaveCurrentServices(transponder_id_t tpid);
bool CopyCurrentServices(transponder_id_t tpid); bool CopyCurrentServices(transponder_id_t tpid);

View File

@@ -783,7 +783,7 @@ void CServiceManager::WriteSatHeader(FILE * fd, sat_config_t &config)
} }
} }
void CServiceManager::SaveServices(bool tocopy, bool if_changed) void CServiceManager::SaveServices(bool tocopy, bool if_changed, bool no_deleted)
{ {
int processed = 0; int processed = 0;
@@ -826,7 +826,9 @@ void CServiceManager::SaveServices(bool tocopy, bool if_changed)
tpdone = 1; tpdone = 1;
} }
ccI->second.dumpServiceXml(fd); /* don't dump removed channels if no_deleted == true */
if (!no_deleted || !(ccI->second.flags & CZapitChannel::REMOVED))
ccI->second.dumpServiceXml(fd);
processed++; processed++;
#ifdef SAVE_DEBUG #ifdef SAVE_DEBUG
chans_processed.insert(ccI->second.getChannelID()); chans_processed.insert(ccI->second.getChannelID());