@@ -1578,6 +1578,41 @@ void ProgramInfo::ToMap(InfoMap &progMap,
15781578 progMap[" originalairdate" ] = MythDateToString (originalAirDate, kDateFull );
15791579 progMap[" shortoriginalairdate" ] = MythDateToString (originalAirDate, kDateShort );
15801580 }
1581+
1582+ // 'mediatype' for a statetype, so untranslated
1583+ // 'mediatypestring' for textarea, so translated
1584+ // TODO Move to a dedicated ToState() method?
1585+ QString mediaType;
1586+ QString mediaTypeString;
1587+ switch (GetProgramInfoType ())
1588+ {
1589+ case kProgramInfoTypeVideoFile :
1590+ mediaType = " video" ;
1591+ mediaTypeString = QObject::tr (" Video" );
1592+ break ;
1593+ case kProgramInfoTypeVideoDVD :
1594+ mediaType = " dvd" ;
1595+ mediaTypeString = QObject::tr (" DVD" );
1596+ break ;
1597+ case kProgramInfoTypeVideoStreamingHTML :
1598+ mediaType = " httpstream" ;
1599+ mediaTypeString = QObject::tr (" HTTP Streaming" );
1600+ break ;
1601+ case kProgramInfoTypeVideoStreamingRTSP :
1602+ mediaType = " rtspstream" ;
1603+ mediaTypeString = QObject::tr (" RTSP Streaming" );
1604+ break ;
1605+ case kProgramInfoTypeVideoBD :
1606+ mediaType = " bluraydisc" ;
1607+ mediaTypeString = QObject::tr (" Blu-Ray Disc" );
1608+ break ;
1609+ case kProgramInfoTypeRecording : // Fall through
1610+ default :
1611+ mediaType = " recording" ;
1612+ mediaTypeString = tr (" Recording" , " Recorded file, object not action" );
1613+ }
1614+ progMap[" mediatype" ] = mediaType;
1615+ progMap[" mediatypestring" ] = mediaTypeString;
15811616}
15821617
15831618// / \brief Returns length of program/recording in seconds.
@@ -1951,7 +1986,7 @@ bool ProgramInfo::IsSameTimeslot(const ProgramInfo& other) const
19511986 return false ;
19521987 if (startts == other.startts &&
19531988 (chanid == other.chanid ||
1954- (!chansign.isEmpty () &&
1989+ (!chansign.isEmpty () &&
19551990 chansign.compare (other.chansign , Qt::CaseInsensitive) == 0 )))
19561991 return true ;
19571992
@@ -1969,7 +2004,7 @@ bool ProgramInfo::IsSameProgramTimeslot(const ProgramInfo &other) const
19692004 if (title.compare (other.title , Qt::CaseInsensitive) != 0 )
19702005 return false ;
19712006 if ((chanid == other.chanid ||
1972- (!chansign.isEmpty () &&
2007+ (!chansign.isEmpty () &&
19732008 chansign.compare (other.chansign , Qt::CaseInsensitive) == 0 )) &&
19742009 startts < other.endts &&
19752010 endts > other.startts )
@@ -2003,7 +2038,7 @@ void ProgramInfo::CheckProgramIDAuthorities(void)
20032038 }
20042039
20052040 int numAuths = authMap.count ();
2006- LOG (VB_GENERAL, LOG_INFO,
2041+ LOG (VB_GENERAL, LOG_INFO,
20072042 QString (" Found %1 distinct programid authorities" ).arg (numAuths));
20082043
20092044 usingProgIDAuth = (numAuths > 1 );
0 commit comments