mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 07:23:09 +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)
|
CLastChannel::CLastChannel(void)
|
||||||
: secs_diff_before_store(3)
|
: secs_diff_before_store(3)
|
||||||
, maxSize(11)
|
, maxSize(22)
|
||||||
, shallRemoveEqualChannel(true)
|
, shallRemoveEqualChannel(true)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -70,8 +70,10 @@ void CLastChannel::store (t_channel_id channel_id)
|
|||||||
if(this->lastChannels.size() > 1) {
|
if(this->lastChannels.size() > 1) {
|
||||||
It = this->lastChannels.begin();
|
It = this->lastChannels.begin();
|
||||||
++It;
|
++It;
|
||||||
for (; It != this->lastChannels.end() ; ++It) {
|
for (; It != this->lastChannels.end(); ++It)
|
||||||
if (channel_id == It->channel_id) {
|
{
|
||||||
|
if (channel_id == It->channel_id)
|
||||||
|
{
|
||||||
this->lastChannels.erase(It);
|
this->lastChannels.erase(It);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -98,7 +100,7 @@ void CLastChannel::clear_storedelay (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// -- Get last Channel-Entry
|
// -- 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
|
// -- 0 = current channel
|
||||||
// -- Return: channelnumber or < 0 (end of list)
|
// -- Return: channelnumber or < 0 (end of list)
|
||||||
|
|
||||||
@@ -111,7 +113,6 @@ t_channel_id CLastChannel::getlast (int n)
|
|||||||
|
|
||||||
return It->channel_id;
|
return It->channel_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,7 +135,8 @@ int CLastChannel::get_mode(t_channel_id channel_id)
|
|||||||
{
|
{
|
||||||
std::list<_LastCh>::iterator It;
|
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)
|
if (channel_id == It->channel_id)
|
||||||
return It->channel_mode;
|
return It->channel_mode;
|
||||||
}
|
}
|
||||||
@@ -145,8 +147,10 @@ bool CLastChannel::set_mode(t_channel_id channel_id)
|
|||||||
{
|
{
|
||||||
std::list<_LastCh>::iterator It;
|
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) {
|
{
|
||||||
|
if (channel_id == It->channel_id)
|
||||||
|
{
|
||||||
It->channel_mode = CNeutrinoApp::getInstance()->GetChannelMode();
|
It->channel_mode = CNeutrinoApp::getInstance()->GetChannelMode();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -19,7 +19,6 @@ nicht gespeichert werden.
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef SEEN_LastChannel
|
#ifndef SEEN_LastChannel
|
||||||
#define SEEN_LastChannel
|
#define SEEN_LastChannel
|
||||||
|
|
||||||
@@ -56,5 +55,4 @@ class CLastChannel
|
|||||||
bool set_mode(t_channel_id channel_id);
|
bool set_mode(t_channel_id channel_id);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user