Skip to contentSkip to conversation

Enable Recording with mythtv protocol 32 to 35 (at least)

Qemu-devel Iain McFarlane 2 participants 2 messages Dec 30, 2007

lore
Share & tools
lore
#0 lore raw

Hi all,

This patch allows mvpmc to schedule recordings with Mythtv protocol 32 to 35 (and may do 36 but I haven't got a backend at that level to test)

Regards,

Iain

mythtv.c 2007-12-30 15:22:20.000000000 +0000 renamed from mythtv.c.orig 2007-12-29 09:21:39.000000000 +0000 +29 -0
@@ -3130,6 +3130,35 @@
                                        '0')", \
                                        sqlprog[which].seriesid,sqlprog[which].programid,(int)sqlprog[which].starttime,(int)sqlprog[which].starttime,(int)sqlprog[which].starttime);
                                break;
+                       case 32 ... 35:
+                               sprintf(query, "REPLACE INTO record ( \
+                                       recordid,type,chanid,starttime,startdate,endtime, \
+                                       enddate,search,\
+                                       title,\
+                                       subtitle, \
+                                       description, \
+                                       profile,recpriority,category,maxnewest,inactive,maxepisodes, \
+                                       autoexpire,startoffset,endoffset,recgroup,dupmethod,dupin, \
+                                       station,\
+                                       seriesid,programid,autocommflag,findday,findtime,findid, \
+                                       autotranscode,parentid,transcoder,tsdefault,autouserjob1,autouserjob2,autouserjob3, \
+                                       autouserjob4,playgroup,prefinput, \
+                                       next_record,last_record,last_delete) values \
+                                       ('%s','%d','%d',FROM_UNIXTIME(%d), \
+                                        FROM_UNIXTIME(%d), FROM_UNIXTIME(%d), \
+                                        FROM_UNIXTIME(%d),'',", recordid,
+                                       type, sqlprog[which].chanid,
+                                       (int)sqlprog[which].starttime,
+                                       (int)sqlprog[which].starttime,
+                                       (int)sqlprog[which].endtime,
+                                       (int)sqlprog[which].endtime);
+                               sprintf(query1, " ,'Default','0','%s','0','0','0','0', '%s', '%s','%s','6','15',", sqlprog[which].category,startoffset,endoffset,sqlrecgroups[rgroup].recgroups);
+                               sprintf(query2,",'%s','%s','1',DAYOFWEEK(FROM_UNIXTIME(%d)),FROM_UNIXTIME(%d),TO_DAYS(FROM_UNIXTIME(%d)), \
+                                       '0','0','0','1.00','0','0','0', \
+                                       '0','0','0', \
+                                       '00:00:00','00:00:00','00:00:00')", \
+                                       sqlprog[which].seriesid,sqlprog[which].programid,(int)sqlprog[which].starttime,(int)sqlprog[which].starttime,(int)sqlprog[which].starttime);
+                               break;
                        default:
                                sprintf(guierrormsg, "No MythTV SQL support\nMythTV version: %d\n", cmyth_conn_get_protocol_version(control));
                                gui_error(guierrormsg);
#1 lore raw

Hi,

Are you sure you've sent it to correct mailing list? :)

Thanks,
Hetz

Quoted 51 lines · Iain McFarlane

Hi all,

This patch allows mvpmc to schedule recordings with Mythtv protocol 32 to 35 (and may do 36 but I haven't got a backend at that level to test)

Regards,

Iain

mythtv.c 2007-12-30 15:22:20.000000000 +0000 renamed from mythtv.c.orig 2007-12-29 09:21:39.000000000 +0000 +29 -0
@@ -3130,6 +3130,35 @@
                                        '0')", \
                                        sqlprog[which].seriesid,sqlprog[which].programid,(int)sqlprog[which].starttime,(int)sqlprog[which].starttime,(int)sqlprog[which].starttime);
                                break;
+                       case 32 ... 35:
+                               sprintf(query, "REPLACE INTO record ( \
+                                       recordid,type,chanid,starttime,startdate,endtime, \
+                                       enddate,search,\
+                                       title,\
+                                       subtitle, \
+                                       description, \
+                                       profile,recpriority,category,maxnewest,inactive,maxepisodes, \
+                                       autoexpire,startoffset,endoffset,recgroup,dupmethod,dupin, \
+                                       station,\
+                                       seriesid,programid,autocommflag,findday,findtime,findid, \
+                                       autotranscode,parentid,transcoder,tsdefault,autouserjob1,autouserjob2,autouserjob3, \
+                                       autouserjob4,playgroup,prefinput, \
+                                       next_record,last_record,last_delete) values \
+                                       ('%s','%d','%d',FROM_UNIXTIME(%d), \
+                                        FROM_UNIXTIME(%d), FROM_UNIXTIME(%d), \
+                                        FROM_UNIXTIME(%d),'',", recordid,
+                                       type, sqlprog[which].chanid,
+                                       (int)sqlprog[which].starttime,
+                                       (int)sqlprog[which].starttime,
+                                       (int)sqlprog[which].endtime,
+                                       (int)sqlprog[which].endtime);
+                               sprintf(query1, " ,'Default','0','%s','0','0','0','0', '%s', '%s','%s','6','15',", sqlprog[which].category,startoffset,endoffset,sqlrecgroups[rgroup].recgroups);
+                               sprintf(query2,",'%s','%s','1',DAYOFWEEK(FROM_UNIXTIME(%d)),FROM_UNIXTIME(%d),TO_DAYS(FROM_UNIXTIME(%d)), \
+                                       '0','0','0','1.00','0','0','0', \
+                                       '0','0','0', \
+                                       '00:00:00','00:00:00','00:00:00')", \
+                                       sqlprog[which].seriesid,sqlprog[which].programid,(int)sqlprog[which].starttime,(int)sqlprog[which].starttime,(int)sqlprog[which].starttime);
+                               break;
                        default:
                                sprintf(guierrormsg, "No MythTV SQL support\nMythTV version: %d\n", cmyth_conn_get_protocol_version(control));
                                gui_error(guierrormsg);
Signature · 2 lines
Skepticism is the lazy person's default position.
my blog (hebrew): http://benhamo.org