Ticket #8011: 8011_v1.diff

File 8011_v1.diff, 2.7 KB (added by paulh, 16 years ago)

Updated following the PI refactor

  • themes/MythCenter-wide/recordings-ui.xml

     
    296296        </textarea>
    297297
    298298        <textarea name="description" from="basetextarea">
    299             <area>24,484,890,220</area>
     299            <area>24,484,890,200</area>
    300300            <multiline>yes</multiline>
    301301            <cutdown>yes</cutdown>
    302302            <template>%|"SUBTITLE|"% %STARS% %DESCRIPTION%</template>
     
    307307            <preserveaspect>true</preserveaspect>
    308308        </imagetype>
    309309
     310        <textarea name="filesize" from="basetextarea">
     311            <area>24,680,500,30</area>
     312            <template>%LENTIME% (%FILESIZE_STR%)</template>
     313        </textarea>
     314
     315        <textarea name="storagegroup" from="basetextarea">
     316            <area>650,680,250,30</area>
     317            <align>right</align>
     318        </textarea>
     319
    310320        <textarea name="norecordings">
    311321            <area>20,74,760,300</area>
    312322            <font>basemedium</font>
  • programs/mythfrontend/playbackbox.cpp

     
    669669    infoMap["description"] = desc;
    670670    infoMap["rec_count"] = QString("%1").arg(countInGroup);
    671671
     672    int totalsecs = 0;
     673    uint64_t totalsize = 0ULL;
     674
     675    ProgramList::iterator totalit = m_progLists[groupname].begin();
     676    while (totalit != m_progLists[groupname].end())
     677    {
     678        totalsecs += (*totalit)->GetScheduledStartTime().secsTo((*totalit)->GetScheduledEndTime());
     679        totalsize += (*totalit)->GetFilesize();
     680        ++totalit;
     681    }
     682
     683    int minutes = totalsecs / 60;
     684    int totalh = minutes / 60;
     685    int totalm = minutes % 60;
     686    QString tmpSize;
     687
     688    tmpSize.sprintf("%0.2f ", totalsize * (1.0 / (1024.0 * 1024.0 * 1024.0)));
     689    tmpSize += QObject::tr("GB", "GigaBytes");
     690    infoMap["filesize_str"] = tmpSize;
     691    infoMap["filesize"] = QString::number(totalsize);
     692
     693    infoMap["lenmins"] = tr("%n minute(s)", "", minutes);
     694
     695    if (totalh > 0 && totalm > 0)
     696    {
     697        infoMap["lentime"] = QString("%1 %2")
     698                .arg(QObject::tr("%n hour(s)", "", totalh))
     699                .arg(QObject::tr("%n minute(s)", "", totalm));
     700    }
     701    else if(totalh > 0)
     702        infoMap["lentime"] = QObject::tr("%n hour(s)", "", totalh);
     703    else
     704         infoMap["lentime"] = QObject::tr("%n minute(s)", "", totalm);
     705
    672706    ResetMap(m_currentMap);
    673707    SetTextFromMap(infoMap);
    674708    m_currentMap = infoMap;