if frame is corrupt, delete and try caching again
This commit is contained in:
@@ -72,11 +72,21 @@ public:
|
||||
clear_on_close_ = e;
|
||||
}
|
||||
|
||||
bool DeleteSpecificFile(const QString &f);
|
||||
|
||||
signals:
|
||||
void DeletedFrame(const QString& path, const QByteArray& hash);
|
||||
|
||||
private:
|
||||
QByteArray DeleteLeastRecent();
|
||||
struct HashTime {
|
||||
QString file_name;
|
||||
qint64 file_size;
|
||||
qint64 access_time;
|
||||
};
|
||||
|
||||
bool DeleteFileInternal(QMap<QByteArray, HashTime>::iterator hash_to_delete);
|
||||
|
||||
bool DeleteLeastRecent();
|
||||
|
||||
void CloseCacheFolder();
|
||||
|
||||
@@ -84,12 +94,6 @@ private:
|
||||
|
||||
QString index_path_;
|
||||
|
||||
struct HashTime {
|
||||
QString file_name;
|
||||
qint64 file_size;
|
||||
qint64 access_time;
|
||||
};
|
||||
|
||||
QMap<QByteArray, HashTime> disk_data_;
|
||||
|
||||
qint64 consumption_;
|
||||
@@ -149,6 +153,8 @@ public slots:
|
||||
|
||||
void CreatedFile(const QString& cache_folder, const QString& file_name, const QByteArray& hash);
|
||||
|
||||
void DeleteSpecificFile(const QString &filename);
|
||||
|
||||
signals:
|
||||
void DeletedFrame(const QString& path, const QByteArray& hash);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user