mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 08:51:04 +02:00
zapit/src/getservices.cpp: add code to remove channels for the given satellite position,
current live channel skipped to prevent neutrino crashes
Origin commit data
------------------
Commit: c5e1ab04e6
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2014-03-13 (Thu, 13 Mar 2014)
This commit is contained in:
@@ -123,6 +123,7 @@ class CServiceManager
|
|||||||
|
|
||||||
void ResetChannelNumbers(bool bouquets = true, bool numbers = false);
|
void ResetChannelNumbers(bool bouquets = true, bool numbers = false);
|
||||||
void RemoveChannel(const t_channel_id channel_id);
|
void RemoveChannel(const t_channel_id channel_id);
|
||||||
|
void RemovePosition(t_satellite_position satellitePosition);
|
||||||
void RemoveAllChannels();
|
void RemoveAllChannels();
|
||||||
void RemoveCurrentChannels();
|
void RemoveCurrentChannels();
|
||||||
void RemoveNVODChannels();
|
void RemoveNVODChannels();
|
||||||
|
@@ -164,6 +164,21 @@ void CServiceManager::RemoveAllChannels()
|
|||||||
{
|
{
|
||||||
allchans.clear();
|
allchans.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CServiceManager::RemovePosition(t_satellite_position satellitePosition)
|
||||||
|
{
|
||||||
|
INFO("delete %d, size before: %d", satellitePosition, allchans.size());
|
||||||
|
t_channel_id live_id = CZapit::getInstance()->GetCurrentChannelID();
|
||||||
|
for (channel_map_iterator_t it = allchans.begin(); it != allchans.end();) {
|
||||||
|
if (it->second.getSatellitePosition() == satellitePosition && live_id != it->first)
|
||||||
|
allchans.erase(it++);
|
||||||
|
else
|
||||||
|
++it;
|
||||||
|
}
|
||||||
|
services_changed = true;
|
||||||
|
INFO("delete %d, size after: %d", satellitePosition, allchans.size());
|
||||||
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
//never used
|
//never used
|
||||||
void CServiceManager::RemoveNVODChannels()
|
void CServiceManager::RemoveNVODChannels()
|
||||||
|
Reference in New Issue
Block a user