final DreamboxChannel channel = (DreamboxChannel) mConfig.getExternalChannel(program.getChannel());
if (channel != null) {
new Thread(new Runnable() {
public void run() {
DreamboxConnector connect = new DreamboxConnector(mConfig);
connect.switchToChannel(channel);
}
}).start();
} else {
int ret = JOptionPane.showConfirmDialog(parent,
mLocalizer.msg("notConfiguredText", "Channel not configured, do\nyou want to do this now?"),
mLocalizer.msg("notConfiguredTitle", "Configure"), JOptionPane.YES_NO_OPTION);
if (ret == JOptionPane.YES_OPTION) {
configDevice(parent);
}
}
return true;
} else if (num == 1) {
DreamboxConnector connect = new DreamboxConnector(mConfig);
ParamParser parser = new ParamParser();
connect.sendMessage(parser.analyse("{channel_name} - {leadingZero(start_hour,\"2\")}:{leadingZero(start_minute,\"2\")}-{leadingZero(end_hour,\"2\")}:{leadingZero(end_minute,\"2\")}\n{title}", program));
} else if (num == 2) {
final DreamboxChannel channel = (DreamboxChannel) mConfig.getExternalChannel(program.getChannel());
if (channel != null) {
DreamboxConnector connect = new DreamboxConnector(mConfig);
if (!connect.streamChannel(channel)) {
int ret = JOptionPane.showConfirmDialog(parent,
mLocalizer.msg("mediaplayerNotConfiguredText", "Unfortunately, a problem occurred during executing the mediaplayer,\ndo you want to correct the configuration now?"),
mLocalizer.msg("mediaplayerNotConfiguredTitle", "Configure"), JOptionPane.YES_NO_OPTION);
if (ret == JOptionPane.YES_OPTION) {
configDevice(parent);