@@ -66,6 +66,7 @@ ProgramInfo::ProgramInfo(void)
66
66
year = " " ;
67
67
stars = 0 ;
68
68
availableStatus = asAvailable;
69
+ timestretch = 1.0 ;
69
70
70
71
pathname = " " ;
71
72
filesize = 0 ;
@@ -193,6 +194,8 @@ ProgramInfo &ProgramInfo::clone(const ProgramInfo &other)
193
194
hasAirDate = other.hasAirDate ;
194
195
repeat = other.repeat ;
195
196
197
+ timestretch = other.timestretch ;
198
+
196
199
seriesid = other.seriesid ;
197
200
programid = other.programid ;
198
201
catType = other.catType ;
@@ -286,6 +289,7 @@ void ProgramInfo::ToStringList(QStringList &list) const
286
289
FLOAT_TO_LIST (stars)
287
290
DATETIME_TO_LIST (QDateTime (originalAirDate))
288
291
INT_TO_LIST (hasAirDate)
292
+ FLOAT_TO_LIST (timestretch);
289
293
}
290
294
291
295
/* * \fn ProgramInfo::FromStringList(QStringList&,int)
@@ -382,6 +386,7 @@ bool ProgramInfo::FromStringList(QStringList &list, QStringList::iterator &it)
382
386
FLOAT_FROM_LIST (stars)
383
387
DATE_FROM_LIST (originalAirDate);
384
388
INT_FROM_LIST (hasAirDate);
389
+ FLOAT_FROM_LIST (timestretch);
385
390
386
391
return true ;
387
392
}
@@ -546,6 +551,8 @@ void ProgramInfo::ToMap(QMap<QString, QString> &progMap) const
546
551
progMap[" REPEAT" ] = " " ;
547
552
progMap[" LONGREPEAT" ] = " " ;
548
553
}
554
+
555
+ progMap[" timestretch" ] = QString::number (timestretch, ' f' , 2 );
549
556
550
557
progMap[" seriesid" ] = seriesid;
551
558
progMap[" programid" ] = programid;
@@ -692,7 +699,7 @@ ProgramInfo *ProgramInfo::GetProgramFromRecorded(const QString &channel,
692
699
" channel.callsign,channel.name,channel.commfree, "
693
700
" channel.outputfilters,seriesid,programid,filesize, "
694
701
" lastmodified,stars,previouslyshown,originalairdate, "
695
- " hostname,recordid,transcoder "
702
+ " hostname,recordid,transcoder,timestretch "
696
703
" FROM recorded "
697
704
" LEFT JOIN channel "
698
705
" ON recorded.chanid = channel.chanid "
@@ -752,6 +759,8 @@ ProgramInfo *ProgramInfo::GetProgramFromRecorded(const QString &channel,
752
759
753
760
proginfo->programflags = proginfo->getProgramFlags ();
754
761
762
+ proginfo->timestretch = query.value (21 ).toString ().toFloat ();
763
+
755
764
return proginfo;
756
765
}
757
766
@@ -1213,11 +1222,12 @@ void ProgramInfo::StartedRecording(void)
1213
1222
query.prepare (" INSERT INTO recorded (chanid,starttime,endtime,title,"
1214
1223
" subtitle,description,hostname,category,recgroup,"
1215
1224
" autoexpire,recordid,seriesid,programid,stars,"
1216
- " previouslyshown,originalairdate,findid,transcoder)"
1225
+ " previouslyshown,originalairdate,findid,transcoder,"
1226
+ " timestretch)"
1217
1227
" VALUES(:CHANID,:STARTS,:ENDS,:TITLE,:SUBTITLE,:DESC,"
1218
1228
" :HOSTNAME,:CATEGORY,:RECGROUP,:AUTOEXP,:RECORDID,"
1219
1229
" :SERIESID,:PROGRAMID,:STARS,:REPEAT,:ORIGAIRDATE,"
1220
- " :FINDID,:TRANSCODER);" );
1230
+ " :FINDID,:TRANSCODER,:TIMESTRETCH );" );
1221
1231
query.bindValue (" :CHANID" , chanid);
1222
1232
query.bindValue (" :STARTS" , starts);
1223
1233
query.bindValue (" :ENDS" , ends);
@@ -1236,6 +1246,7 @@ void ProgramInfo::StartedRecording(void)
1236
1246
query.bindValue (" :REPEAT" , repeat);
1237
1247
query.bindValue (" :ORIGAIRDATE" , originalAirDate);
1238
1248
query.bindValue (" :TRANSCODER" , record->GetTranscoder ());
1249
+ query.bindValue (" :TIMESTRETCH" , timestretch);
1239
1250
1240
1251
if (!query.exec () || !query.isActive ())
1241
1252
MythContext::DBError (" WriteRecordedToDB" , query);
0 commit comments