Some fixes for cover generation
This commit is contained in:
@@ -62,13 +62,11 @@ std::string ReaderActivity::sidecarCoverPath(const std::string& bookPath) {
|
||||
const std::string base = bookPath.substr(0, dot);
|
||||
for (const char* ext : {".jpg", ".jpeg", ".png", ".bmp"}) {
|
||||
const std::string candidate = base + ext;
|
||||
LOG_DBG("SIDECAR", "Checking: %s", candidate.c_str());
|
||||
if (Storage.exists(candidate.c_str())) {
|
||||
LOG_DBG("SIDECAR", "Found sidecar cover: %s", candidate.c_str());
|
||||
return candidate;
|
||||
}
|
||||
}
|
||||
LOG_DBG("SIDECAR", "No sidecar found for: %s", bookPath.c_str());
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user