예제 #1
0
 void MetadataIOCoordinator::autoDiscoverExiftool() {
     LOG_DEBUG << "#";
     Models::SettingsModel *settingsModel = m_CommandManager->getSettingsModel();
     QString existingExiftoolPath = settingsModel->getExifToolPath();
     m_ExiftoolDiscoveryFuture->setFuture(QtConcurrent::run(this,
                                                            &MetadataIOCoordinator::tryToLaunchExiftool,
                                                            existingExiftoolPath));
 }
예제 #2
0
    void MetadataIOCoordinator::exiftoolDiscoveryFinished() {
        if (!m_ExiftoolNotFound && !m_RecommendedExiftoolPath.isEmpty()) {
            LOG_DEBUG << "Recommended exiftool path is" << m_RecommendedExiftoolPath;

            Models::SettingsModel *settingsModel = m_CommandManager->getSettingsModel();
            QString existingExiftoolPath = settingsModel->getExifToolPath();

            if (existingExiftoolPath != m_RecommendedExiftoolPath) {
                LOG_INFO << "Setting exiftool path to recommended";
                settingsModel->setExifToolPath(m_RecommendedExiftoolPath);
                settingsModel->saveExiftool();
            }
        }
    }