Ticket #2811: serieslink.patch

File serieslink.patch, 4.7 KB (added by dm@…, 17 years ago)
  • libs/libmythtv/eit.h

     
    5959            const QDateTime &_start,     const QDateTime &_end,
    6060            uint             _fixup,
    6161            bool             _captioned, bool _subtitled,
    62             bool             _stereo,    bool _hdtv) :
     62            bool             _stereo,    bool _hdtv,
     63            const QString   &_seriesId,  const QString   &_programId) :
    6364        title(_title),           subtitle(_subtitle),
    6465        description(_desc),
    6566        category(_category),
     
    7071        partnumber(0),           parttotal(0),
    7172        syndicatedepisodenumber(QString::null),
    7273        fixup(_fixup),           flags(0),
    73         category_type(_category_type)
     74        category_type(_category_type),
     75        seriesId(_seriesId),
     76        programId(_programId)
    7477    {
    7578        flags |= (_captioned) ? kCaptioned : 0;
    7679        flags |= (_subtitled) ? kSubtitled : 0;
     
    136139    uint32_t      fixup;
    137140    unsigned char flags;
    138141    unsigned char category_type;
     142    QString       seriesId;
     143    QString       programId;
    139144
    140145    static const unsigned char kCaptioned = 0x1;
    141146    static const unsigned char kSubtitled = 0x2;
  • libs/libmythtv/eit.cpp

     
    135135        "       closecaptioned, subtitled,     stereo,      hdtv, "
    136136        "       partnumber,     parttotal, "
    137137        "       syndicatedepisodenumber, "
    138         "       airdate,        originalairdate "
     138        "       airdate,        originalairdate, "
     139        "       seriesid,       programid "
    139140        "FROM program "
    140141        "WHERE chanid   = :CHANID AND "
    141142        "      manualid = 0       AND "
     
    167168                     query.value(5).toDateTime(), query.value(6).toDateTime(),
    168169                     fixup,
    169170                     query.value(7).toBool(),     query.value(8).toBool(),
    170                      query.value(9).toBool(),     query.value(10).toBool());
     171                     query.value(9).toBool(),     query.value(10).toBool(),
     172                     QString::fromUtf8(query.value(16).toString()),
     173                     QString::fromUtf8(query.value(17).toString())
     174                     );
    171175
    172176        prog.partnumber = query.value(11).toUInt();
    173177        prog.parttotal  = query.value(12).toUInt();
     
    338342        "    partnumber     = :PARTNO,    parttotal     = :PARTTOTAL, "
    339343        "    syndicatedepisodenumber = :SYNDICATENO, "
    340344        "    airdate        = :AIRDATE,   originalairdate=:ORIGAIRDATE, "
    341         "    listingsource  = :LSOURCE "
     345        "    listingsource  = :LSOURCE, "
     346        "    seriesid       = :SERIESID,  programid     = :PROGRAMID "
    342347        "WHERE chanid    = :CHANID AND "
    343348        "      starttime = :OLDSTART ");
    344349
     
    361366    query.bindValue(":AIRDATE",     lairdate.isEmpty() ? "0000" : lairdate);
    362367    query.bindValue(":ORIGAIRDATE", loriginalairdate);
    363368    query.bindValue(":LSOURCE",     1);
     369    query.bindValue(":SERIESID",    seriesId.utf8());
     370    query.bindValue(":PROGRAMID",   programId.utf8());
    364371
    365372    if (!query.exec())
    366373    {
  • libs/libmythtv/eithelper.cpp

     
    349349            category_type = content.GetMythCategory(0);
    350350        }
    351351
     352        desc_list_t contentIds =
     353            MPEGDescriptor::FindAll(list, DescriptorID::dvb_content_identifier);
     354        QString programId = "", seriesId = "";
     355        for (uint j = 0; j < contentIds.size(); j++)
     356        {
     357            const unsigned char * desc(contentIds[j]);
     358            if (desc[2] == 0xc4)
     359            {
     360                for (uint k = 0; k < desc[3]; k++)
     361                    programId += (char)desc[k+4];
     362            }
     363           else if (desc[2] == 0xc8)
     364           {
     365                for (uint k = 0; k < desc[3]; k++)
     366                    seriesId += (char)desc[k+4];
     367           }
     368        }
     369
    352370        uint chanid = GetChanID(
    353371            eit->ServiceID(), eit->OriginalNetworkID(), eit->TSID());
    354372
     
    364382                                     category,  category_type,
    365383                                     starttime, endtime,       fix,
    366384                                     false,     subtitled,
    367                                      stereo,    hdtv);
     385                                     stereo,    hdtv,
     386                                     seriesId,  programId);
    368387        db_events.enqueue(event);
    369388    }
    370389}