Support rank in use template of batch queue processing, on behalf of guokai; see issue #566

This commit is contained in:
Oliver Duis
2011-03-09 07:38:43 +01:00
parent 2bd2afc544
commit 71a4fea38d
2 changed files with 16 additions and 1 deletions

View File

@@ -440,6 +440,21 @@ Glib::ustring BatchQueue::calcAutoFileNameBase (const Glib::ustring& origFileNam
}
else if (options.savePathTemplate[ix]=='f') {
path = path + filename;
}
else if (options.savePathTemplate[ix]=='r') {
CacheImageData cid;
char rank;
if (cid.load(cacheMgr->getCacheFileName("data", origFileName, CacheManager::getMD5(origFileName))+".txt") == 1) {
rank = '0';
} else {
if (!cid.inTrash)
rank = cid.rank + '0';
else
rank = 'x';
}
path += rank;
}
}
else