mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Improved skipping channels that are (currently) not available
This commit is contained in:
parent
b7d3273d92
commit
34af5c0e05
@ -152,6 +152,7 @@ Stefan Huelswitt <huels@iname.com>
|
|||||||
for making cStatus::MsgChannelSwitch() only be called if a channel is actually going to
|
for making cStatus::MsgChannelSwitch() only be called if a channel is actually going to
|
||||||
be switched or has actually been switched successfully
|
be switched or has actually been switched successfully
|
||||||
for adding a missing StripAudioPackets() to cDvbPlayer::Action()
|
for adding a missing StripAudioPackets() to cDvbPlayer::Action()
|
||||||
|
for improving skipping channels that are (currently) not available
|
||||||
|
|
||||||
Ulrich Röder <roeder@efr-net.de>
|
Ulrich Röder <roeder@efr-net.de>
|
||||||
for pointing out that there are channels that have a symbol rate higher than
|
for pointing out that there are channels that have a symbol rate higher than
|
||||||
|
2
HISTORY
2
HISTORY
@ -1574,3 +1574,5 @@ Video Disk Recorder Revision History
|
|||||||
- Removed some unnecessary #includes from eit.c and changed cMenuRecordings::Del()
|
- Removed some unnecessary #includes from eit.c and changed cMenuRecordings::Del()
|
||||||
to cMenuRecordings::Delete() to avoid warnings in gcc-3.2 (thanks to Andreas
|
to cMenuRecordings::Delete() to avoid warnings in gcc-3.2 (thanks to Andreas
|
||||||
Schultz for pointing this out).
|
Schultz for pointing this out).
|
||||||
|
- Improved skipping channels that are (currently) not available (thanks to Stefan
|
||||||
|
Huelswitt).
|
||||||
|
39
device.c
39
device.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: device.c 1.23 2002/10/05 15:18:39 kls Exp $
|
* $Id: device.c 1.24 2002/10/06 11:31:52 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
@ -293,7 +293,9 @@ bool cDevice::SwitchChannel(const cChannel *Channel, bool LiveView)
|
|||||||
for (int i = 3; i--;) {
|
for (int i = 3; i--;) {
|
||||||
switch (SetChannel(Channel, LiveView)) {
|
switch (SetChannel(Channel, LiveView)) {
|
||||||
case scrOk: return true;
|
case scrOk: return true;
|
||||||
case scrNotAvailable: return false;
|
case scrNotAvailable: if (Interface)
|
||||||
|
Interface->Error(tr("Channel not available!"));
|
||||||
|
return false;
|
||||||
case scrNoTransfer: if (Interface)
|
case scrNoTransfer: if (Interface)
|
||||||
Interface->Error(tr("Can't start Transfer Mode!"));
|
Interface->Error(tr("Can't start Transfer Mode!"));
|
||||||
return false;
|
return false;
|
||||||
@ -311,21 +313,24 @@ bool cDevice::SwitchChannel(int Direction)
|
|||||||
if (Direction) {
|
if (Direction) {
|
||||||
int n = CurrentChannel() + Direction;
|
int n = CurrentChannel() + Direction;
|
||||||
int first = n;
|
int first = n;
|
||||||
for (;;) {
|
cChannel *channel;
|
||||||
cChannel *channel = Channels.GetByNumber(n);
|
while ((channel = Channels.GetByNumber(n)) != NULL) {
|
||||||
if (!channel)
|
// try only channels which are currently available
|
||||||
break;
|
if (PrimaryDevice()->ProvidesChannel(channel, Setup.PrimaryLimit) || GetDevice(channel, 0))
|
||||||
if (PrimaryDevice()->SwitchChannel(channel, true)) {
|
break;
|
||||||
result = true;
|
n += Direction;
|
||||||
break;
|
}
|
||||||
}
|
if (channel) {
|
||||||
n += Direction;
|
int d = n - first;
|
||||||
}
|
if (abs(d) == 1)
|
||||||
int d = n - first;
|
dsyslog("skipped channel %d", first);
|
||||||
if (abs(d) == 1)
|
else if (d)
|
||||||
dsyslog("skipped channel %d", first);
|
dsyslog("skipped channels %d..%d", first, n - sgn(d));
|
||||||
else if (d)
|
if (PrimaryDevice()->SwitchChannel(channel, true))
|
||||||
dsyslog("skipped channels %d..%d", first, n - sgn(d));
|
result = true;
|
||||||
|
}
|
||||||
|
else if (n != first && Interface)
|
||||||
|
Interface->Error(tr("Channel not available!"));
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
18
i18n.c
18
i18n.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: i18n.c 1.94 2002/10/06 09:55:08 kls Exp $
|
* $Id: i18n.c 1.95 2002/10/06 11:31:18 kls Exp $
|
||||||
*
|
*
|
||||||
* Translations provided by:
|
* Translations provided by:
|
||||||
*
|
*
|
||||||
@ -1436,6 +1436,22 @@ const tI18nPhrase Phrases[] = {
|
|||||||
"Nu mai sunt dispozitive DVB pentru inregistrare!",
|
"Nu mai sunt dispozitive DVB pentru inregistrare!",
|
||||||
"Nincs szabad DVB kártya a felvételhez!",
|
"Nincs szabad DVB kártya a felvételhez!",
|
||||||
},
|
},
|
||||||
|
{ "Channel not available!",
|
||||||
|
"Kanal nicht verfügbar!",
|
||||||
|
"",//TODO
|
||||||
|
"",//TODO
|
||||||
|
"",//TODO
|
||||||
|
"",//TODO
|
||||||
|
"",//TODO
|
||||||
|
"",//TODO
|
||||||
|
"",//TODO
|
||||||
|
"",//TODO
|
||||||
|
"",//TODO
|
||||||
|
"",//TODO
|
||||||
|
"",//TODO
|
||||||
|
"",//TODO
|
||||||
|
"",//TODO
|
||||||
|
},
|
||||||
{ "Channel locked (recording)!",
|
{ "Channel locked (recording)!",
|
||||||
"Kanal blockiert (zeichnet auf)!",
|
"Kanal blockiert (zeichnet auf)!",
|
||||||
"Zaklenjen kanal (snemanje)!",
|
"Zaklenjen kanal (snemanje)!",
|
||||||
|
Loading…
Reference in New Issue
Block a user