Commit e3edd77c authored by Scott Wheeler's avatar Scott Wheeler
Browse files

Another quick fix (ripping CDs at work, catching bugs ;-) ) -- store the

files mtime in the cache based on when the tag was read, not when the file was
last read.

svn path=/trunk/kdemultimedia/juk/; revision=218058
parent 4f9dc316
......@@ -65,6 +65,13 @@ Tag::~Tag()
Tag::Tag(const QString &file) : m_info(file), m_fileName(file)
Cache::instance()->insert(file, this);
// We want to stamp the file with the modified time when the tag is
// created. Otherwise the file can be modified while JuK is running and
// it will never be updated because the m_info.lastModifed() would return
// that timestamp when creating the cache.
m_lastModified = m_info.lastModified();
QString Tag::readBitrate(const KFileMetaInfo &metaInfo)
......@@ -83,7 +83,7 @@ public:
// performance critical section of JuK.
inline QString absFilePath() const { return m_fileName; }
inline QDateTime lastModified() const { return m_info.lastModified(); }
inline QDateTime lastModified() const { return m_lastModified; }
inline bool fileExists() const { return m_info.exists() && m_info.isFile(); }
inline QFileInfo fileInfo() const { return m_info; }
......@@ -103,6 +103,7 @@ protected:
QFileInfo m_info;
QString m_fileName;
QDateTime m_lastModified;
QDataStream &operator<<(QDataStream &s, const Tag &t);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment