Add setting to setup third party readers to work with YACReaderLibrary

This commit is contained in:
Luis Ángel San Martín
2024-10-15 22:11:52 +02:00
parent 5f03fc5f1f
commit 9b6e03bcc4
7 changed files with 52 additions and 4 deletions

View File

@ -46,3 +46,16 @@ bool YACReader::openComic(const ComicDB &comic,
return yacreaderFound;
}
bool YACReader::openComicInThirdPartyApp(const QString &command, const QString &path)
{
QString mutableCommand = command;
QString fullCommand;
if (mutableCommand.contains("{comic_file_path}")) {
fullCommand = mutableCommand.replace("{comic_file_path}", "\"" + path + "\"");
} else {
fullCommand = mutableCommand + " \"" + path + "\"";
}
return QProcess::startDetached(fullCommand);
}