Ticket #12290: 12290-Report-correct-filesize-at-recording-end.patch

File 12290-Report-correct-filesize-at-recording-end.patch, 2.0 KB (added by Roger Siddons, 3 years ago)

Fix

  • mythtv/libs/libmythtv/recordinginfo.cpp

    From 4694dd98437ec4b7441678c4515e0ee5ec088efa Mon Sep 17 00:00:00 2001
    From: Roger Siddons <rsiddons@mythtv.org>
    Date: Tue, 10 May 2016 17:56:01 +0100
    Subject: [PATCH 2/2] 12290: Report correct filesize at recording end
    
    
    diff --git a/mythtv/libs/libmythtv/recordinginfo.cpp b/mythtv/libs/libmythtv/recordinginfo.cpp
    index 7bbf08a..2154113 100644
    a b QString RecordingInfo::GetRecgroupString(uint recGroupID) 
    15861586    return query.value(0).toString();
    15871587}
    15881588
    1589 void RecordingInfo::LoadRecordingFile()
     1589void RecordingInfo::LoadRecordingFile(bool force)
    15901590{
    1591     if (!m_recordingFile)
     1591    if (!m_recordingFile || force)
    15921592    {
     1593        delete m_recordingFile;
     1594       
    15931595        m_recordingFile = new RecordingFile();
    15941596        if (recordedid > 0)
    15951597        {
  • mythtv/libs/libmythtv/recordinginfo.h

    diff --git a/mythtv/libs/libmythtv/recordinginfo.h b/mythtv/libs/libmythtv/recordinginfo.h
    index f548769..f062bbd 100644
    a b class MTV_PUBLIC RecordingInfo : public ProgramInfo 
    295295    static uint GetRecgroupID(const QString &recGroup);
    296296
    297297    // File specific metdata
    298     void LoadRecordingFile();
     298    void LoadRecordingFile(bool force = false);
    299299    RecordingFile *GetRecordingFile() const { return m_recordingFile; }
    300300    void SaveFilesize(uint64_t fsize);   /// Will replace the one in ProgramInfo
    301301    void SetFilesize( uint64_t sz );     /// Will replace the one in ProgramInfo
  • mythtv/libs/libmythtv/tv_rec.cpp

    diff --git a/mythtv/libs/libmythtv/tv_rec.cpp b/mythtv/libs/libmythtv/tv_rec.cpp
    index 7fc8632..a89a70c 100644
    a b void TVRec::FinishedRecording(RecordingInfo *curRec, RecordingQuality *recq) 
    834834    if (!curRec)
    835835        return;
    836836
     837    curRec->LoadRecordingFile(true);
     838   
    837839    // Make sure the recording group is up to date
    838840    const QString recgrp = curRec->QueryRecordingGroup();
    839841    curRec->SetRecordingGroup(recgrp);