cli: CommandTag: Use TagManager

This commit is contained in:
Albert S. 2023-04-10 18:28:41 +02:00
父節點 94fbdb5a92
當前提交 3e3a4d0cd4
共有 1 個檔案被更改,包括 3 行新增1 行删除

查看文件

@ -1,6 +1,7 @@
#include <QCommandLineParser>
#include "commandtag.h"
#include "logger.h"
#include "tagmanager.h"
int CommandTag::handle(QStringList arguments)
{
@ -52,7 +53,8 @@ int CommandTag::handle(QStringList arguments)
paths[i] = absolutePath;
}
bool result = this->dbService->addTag(tag, paths);
TagManager tagManager{*this->dbService};
bool result = tagManager.addPathsToTag(tag, paths);
if(!result)
{
Logger::error() << "Failed to assign tags" << Qt::endl;