mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-26 23:13:13 +02:00
system/lastchannel.cpp: increase channel history from 10 to 21
Signed-off-by: Thilo Graf <dbt@novatux.de> No reason given, but shouldn't break anything.
This commit is contained in:
@@ -24,7 +24,7 @@ nicht gespeichert werden.
|
||||
|
||||
CLastChannel::CLastChannel(void)
|
||||
: secs_diff_before_store(3)
|
||||
, maxSize(11)
|
||||
, maxSize(22)
|
||||
, shallRemoveEqualChannel(true)
|
||||
{
|
||||
}
|
||||
@@ -70,8 +70,10 @@ void CLastChannel::store (t_channel_id channel_id)
|
||||
if(this->lastChannels.size() > 1) {
|
||||
It = this->lastChannels.begin();
|
||||
++It;
|
||||
for (; It != this->lastChannels.end() ; ++It) {
|
||||
if (channel_id == It->channel_id) {
|
||||
for (; It != this->lastChannels.end(); ++It)
|
||||
{
|
||||
if (channel_id == It->channel_id)
|
||||
{
|
||||
this->lastChannels.erase(It);
|
||||
break;
|
||||
}
|
||||
@@ -98,7 +100,7 @@ void CLastChannel::clear_storedelay (void)
|
||||
}
|
||||
|
||||
// -- Get last Channel-Entry
|
||||
// -- IN: n number of last channel in queue [0..]
|
||||
// -- IN: n = number of last channel in queue [0..]
|
||||
// -- 0 = current channel
|
||||
// -- Return: channelnumber or < 0 (end of list)
|
||||
|
||||
@@ -111,7 +113,6 @@ t_channel_id CLastChannel::getlast (int n)
|
||||
|
||||
return It->channel_id;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -134,7 +135,8 @@ int CLastChannel::get_mode(t_channel_id channel_id)
|
||||
{
|
||||
std::list<_LastCh>::iterator It;
|
||||
|
||||
for (It = this->lastChannels.begin(); It != this->lastChannels.end() ; ++It) {
|
||||
for (It = this->lastChannels.begin(); It != this->lastChannels.end(); ++It)
|
||||
{
|
||||
if (channel_id == It->channel_id)
|
||||
return It->channel_mode;
|
||||
}
|
||||
@@ -145,8 +147,10 @@ bool CLastChannel::set_mode(t_channel_id channel_id)
|
||||
{
|
||||
std::list<_LastCh>::iterator It;
|
||||
|
||||
for (It = this->lastChannels.begin(); It != this->lastChannels.end() ; ++It) {
|
||||
if (channel_id == It->channel_id) {
|
||||
for (It = this->lastChannels.begin(); It != this->lastChannels.end(); ++It)
|
||||
{
|
||||
if (channel_id == It->channel_id)
|
||||
{
|
||||
It->channel_mode = CNeutrinoApp::getInstance()->GetChannelMode();
|
||||
return true;
|
||||
}
|
||||
|
@@ -19,7 +19,6 @@ nicht gespeichert werden.
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#ifndef SEEN_LastChannel
|
||||
#define SEEN_LastChannel
|
||||
|
||||
@@ -56,5 +55,4 @@ class CLastChannel
|
||||
bool set_mode(t_channel_id channel_id);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user