Expose JSON API for file filtering

This commit is contained in:
Gioacchino Mazzurco 2018-10-09 00:55:32 +02:00
parent 2556af692e
commit 406822b5ec
No known key found for this signature in database
GPG key ID: A1FBCA3872E87051
4 changed files with 57 additions and 22 deletions

View file

@ -1913,11 +1913,11 @@ bool p3FileDatabase::banFile(const RsFileHash& real_file_hash, const std::string
RS_STACK_MUTEX(mFLSMtx) ;
BannedFileEntry& entry(mPrimaryBanList[real_file_hash]) ; // primary list (user controlled) of files banned from FT search and forwarding. map<real hash, BannedFileEntry>
if(entry.ban_time_stamp == 0)
if(entry.mBanTimeStamp == 0)
{
entry.filename = filename ;
entry.size = file_size ;
entry.ban_time_stamp = time(NULL);
entry.mFilename = filename ;
entry.mSize = file_size ;
entry.mBanTimeStamp = time(NULL);
RsFileHash hash_of_hash ;
ftServer::encryptHash(real_file_hash,hash_of_hash) ;