[mythtv-commits] Ticket #1979: Some Mythlog entries show -ve Mb size values

MythTV mythtv at cvs.mythtv.org
Wed Jun 21 11:25:36 UTC 2006


#1979: Some Mythlog entries show -ve Mb size values
------------------------------------+---------------------------------------
 Reporter:  mythtv at djm.dbme.net.au  |       Owner:  ijr
     Type:  defect                  |      Status:  new
 Priority:  minor                   |   Milestone:     
Component:  mythtv                  |     Version:     
 Severity:  low                     |  
------------------------------------+---------------------------------------
 I have autoexpire set to 3 episodes on 'Late Show with David Letterman'.
 The log
 {{{
 entry when the auto expires deletes the oldest one shows a -ve MB entry.

 Expiring "Late Show with David Letterman" from Fri Jun 16 00:58:00 2006,
 -963 MBytes, too many episodes (only want 3).

 I traced this log entry to autoexpire.cpp and these lines.

 {{{
  query.prepare("SELECT chanid, starttime, title, progstart, progend,
 filesize "
                       "FROM recorded "
                       "WHERE recordid = :RECID AND preserve = 0 "
                       "AND recgroup <> 'LiveTV' "
                       "ORDER BY starttime DESC;");
 }}}


 and


 {{{
    QString msg = QString("Expiring \"%1\" from %2, %3 MBytes, "
                                 "too many episodes (only want %4).")
                                 .arg(title)
                                .arg(startts.toString())
                                 .arg(query.value(5).toInt()/1024/1024)
                                 .arg(maxIter.data());
 }}}


 I think the toInt() is overflowing, but I'm not sure what to use here.
 Is there a toLong() or toDouble() ?


 In the MySQL database, the entry in recorded table is

 {{{
 mysql> select title, filesize from recorded where title like 'Late Show%';
 +--------------------------------+------------+
 | title                          | filesize   |
 +--------------------------------+------------+
 | Late Show with David Letterman | 3039148036 |
 | Late Show with David Letterman | 3283658756 |
 | Late Show with David Letterman | 3283619844 |
 +--------------------------------+------------+
 3 rows in set (0.00 sec)
 }}}

 I have some other shows of 30 minutes set to expire after 5 episodes and
 they display correctly.


 Cheers,
 Darryl

-- 
Ticket URL: <http://cvs.mythtv.org/trac/ticket/1979>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list