From aea54efd00c1cbd0f66bcda83e9c7a196d3c317b Mon Sep 17 00:00:00 2001 From: Arno Date: Sun, 6 Nov 2016 06:07:07 +0100 Subject: Kinda fix display of metadata If a seriespart is selected in the tree, display a summary. When a file is selected, display the actual metadata. It's much more consistent. Before, the metadata of the first *item in the selected list was displayed. --- archivemodel.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'archivemodel.h') diff --git a/archivemodel.h b/archivemodel.h index da673c7..ad11fce 100644 --- a/archivemodel.h +++ b/archivemodel.h @@ -106,6 +106,10 @@ class ArchiveFilesModel : public SmTreeModel { void populate(const QSet &seriesPartIds); QStringList filesForSeriespart(int seriesPartId) const; void updateSeriesPartForFile(const QString &md5sum, int newSeriesPart); + quint64 totalDuration() const { return mTotalDuration; } + quint64 totalSize() const { return mTotalSize; } + int movieFilesCount() const { return mTotalMovies; } + int otherFilesCount() const { return mTotalOthers; } static bool hasFile(const QString &md5); static bool setDvdNo(const QString &md5, int dvdno); @@ -117,6 +121,10 @@ class ArchiveFilesModel : public SmTreeModel { QSet mSeriesPartIds; QHash mRoleDbColumnMap; QSqlDatabase mDb; + quint64 mTotalSize; + quint64 mTotalDuration; + int mTotalMovies; + int mTotalOthers; }; class ArchiveCollector : public QThread { -- cgit v1.2.3-70-g09d2