[mythtv-commits] Ticket #13501: "Schedule As Group" not selected by default
MythTV
noreply at mythtv.org
Wed Nov 6 10:46:36 UTC 2019
#13501: "Schedule As Group" not selected by default
---------------------------------------+---------------------------
Reporter: Klaas de Waal | Owner: Peter Bennett
Type: Bug Report - General | Status: new
Priority: minor | Milestone: 31.0
Component: MythTV - Mythtv-setup | Version: Master Head
Severity: low | Keywords: scheduling
Ticket locked: 0 |
---------------------------------------+---------------------------
On request of gigem, a detailed description of this issue.
**Problem description**
In mythtv-setup, after creating a new capture card entry and then
configuring it in page "5. Input connections"/"Interactions between
inputs", the option "Schedule as Group" is not selected.
Also the "Max recordings" is 1.
The default for the "Schedule as Group" should be selected and the "Max
recordings" should be 2.
**How to reproduce this**
- System: fedora 31 (with mariadb)
- Today's master (20191106)
- Create new database from mythtv/mythtv/database/mc.sql
- Run mythtv-setup, select country Netherlands and language English
- Run mythtv-setup again, update database to version 1352
- Go through the following menu steps in mythtv-setup:
2. Capture cards\\
(New capture card)\\
New capture card >\\
Card type: DVB-T/S/C, ATSC or ISDB-T tuner card\\
Select MyGiga DVB-T2 USB stick\\
4. Video sources\\
(New video source)\\
New video source > (add name, rest is default)\\
5. Input connections\\
Select video source\\
Interactions between inputs >\\
In this page:\\
Max recordings: 1\\
Schedule as group: not selected\\
Exit and save
This is then the content of database table capturecard:
{{{
MariaDB [mythconverg]> select cardid,parentid,cardtype,schedgroup from
capturecard;
+--------+----------+----------+------------+
| cardid | parentid | cardtype | schedgroup |
+--------+----------+----------+------------+
| 1 | 0 | DVB | 0 |
+--------+----------+----------+------------+
1 row in set (0.000 sec)
}}}
**Analysis:**
It is the intention that "Schedule as group" is default selected, as shown
by the code in videosource.cpp:160-161 where the value is set true:
{{{
setLabel(QObject::tr("Schedule as group"));
setValue(true);
}}}
It is the intention that "Max recordings" is default 2, as shown by the
code in videosource.cpp:64:
{{{
static const uint kDefaultMultirecCount = 2;
}}}
which is then used in videosource.cpp:3108.
{{{
The database schema for capturecard shows this:
MariaDB [mythconverg]> describe capturecard;
+-----------------------+------------------+------+-----+------------+----------------+
| Field | Type | Null | Key | Default |
Extra |
+-----------------------+------------------+------+-----+------------+----------------+
| cardid | int(10) unsigned | NO | PRI | NULL |
auto_increment |
| parentid | int(10) unsigned | NO | | 0 |
|
| videodevice | varchar(128) | YES | | NULL |
|
| audiodevice | varchar(128) | YES | | NULL |
|
| vbidevice | varchar(128) | YES | | NULL |
|
| cardtype | varchar(32) | YES | | V4L |
|
| defaultinput | varchar(32) | YES | | Television |
|
| audioratelimit | int(11) | YES | | NULL |
|
| hostname | varchar(64) | YES | | NULL |
|
| dvb_swfilter | int(11) | YES | | 0 |
|
| dvb_sat_type | int(11) | NO | | 0 |
|
| dvb_wait_for_seqstart | int(11) | NO | | 1 |
|
| skipbtaudio | tinyint(1) | YES | | 0 |
|
| dvb_on_demand | tinyint(4) | NO | | 0 |
|
| dvb_diseqc_type | smallint(6) | YES | | NULL |
|
| firewire_speed | int(10) unsigned | NO | | 0 |
|
| firewire_model | varchar(32) | YES | | NULL |
|
| firewire_connection | int(10) unsigned | NO | | 0 |
|
| signal_timeout | int(11) | NO | | 1000 |
|
| channel_timeout | int(11) | NO | | 3000 |
|
| dvb_tuning_delay | int(10) unsigned | NO | | 0 |
|
| contrast | int(11) | NO | | 0 |
|
| brightness | int(11) | NO | | 0 |
|
| colour | int(11) | NO | | 0 |
|
| hue | int(11) | NO | | 0 |
|
| diseqcid | int(10) unsigned | YES | | NULL |
|
| dvb_eitscan | tinyint(1) | NO | | 1 |
|
| inputname | varchar(32) | NO | | None |
|
| sourceid | int(10) unsigned | NO | | 0 |
|
| externalcommand | varchar(128) | YES | | NULL |
|
| changer_device | varchar(128) | YES | | NULL |
|
| changer_model | varchar(128) | YES | | NULL |
|
| tunechan | varchar(10) | YES | | NULL |
|
| startchan | varchar(10) | YES | | NULL |
|
| displayname | varchar(64) | NO | | |
|
| dishnet_eit | tinyint(1) | NO | | 0 |
|
| recpriority | int(11) | NO | | 0 |
|
| quicktune | tinyint(4) | NO | | 0 |
|
| schedorder | int(10) unsigned | NO | | 1 |
|
| livetvorder | int(10) unsigned | NO | | 1 |
|
| reclimit | int(10) unsigned | NO | | 1 |
|
| schedgroup | tinyint(1) | NO | | 0 |
|
+-----------------------+------------------+------+-----+------------+----------------+
42 rows in set (0.002 sec)
}}}
The last two fields are of interest: reclimit is default 1 and schedgroup
is default 0.
It appears that the default values in the database do override the default
values in the code.
This can be verified by modifying the database schema as follows:
{{{
MariaDB [mythconverg]> ALTER TABLE capturecard ALTER reclimit SET DEFAULT
2;
MariaDB [mythconverg]> ALTER TABLE capturecard ALTER schedgroup SET
DEFAULT 1;
}}}
After this modification, the default for "Schedule as group" is selected
and the default "Max recordings" is 2.
**The way forward:**
I suggest to following approach to resolve this:
- Modify the database schema so the default values are correct.
- Remove the C++ code that sets the default values as this code is
apparently not working.
**Notes:**
As bugs go, this one is fairly easy to fix. Given that we are still before
the v31 release this is an excellent moment to add a schema change.
However, as discussed in IRC/#mythtv, it appears that the default values
as described in this ticket are not reproducible everywhere and also there
might be discussion on why the C++ code does not work for me.
Hence this ticket.
--
Ticket URL: <https://code.mythtv.org/trac/ticket/13501>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list