Skip to content
  • Author Developer
    --- a/src/bin/projectclip.cpp
    +++ b/src/bin/projectclip.cpp
    @@ -812,7 +812,7 @@ const QString ProjectClip::getProxyFromOriginal(QString originalPath)
    
     std::unique_ptr<Mlt::Producer> ProjectClip::getThumbProducer(const QUuid &)
     {
    -    if (m_clipType == ClipType::Unknown || m_masterProducer == nullptr || m_clipStatus == FileStatus::StatusWaiting) {
    +    if (m_clipType == ClipType::Unknown || m_masterProducer == nullptr || m_clipStatus == FileStatus::StatusWaiting  || m_clipStatus == FileStatus::StatusMissing) {
             return nullptr;
         }
         if (!m_thumbMutex.tryLock()) {
    @@ -1939,6 +1939,7 @@ void ProjectClip::refreshTracksState(int tracksCount)
             setProducerProperty(QStringLiteral("kdenlive:sequenceproperties.tracksCount"), tracksCount);
         }
         if (m_clipStatus == FileStatus::StatusReady) {
    +        qDebug()<<"77777777777777777777777777777777777\n\nREFRESH TK STATE\n\n777777777777777777777777";
             checkAudioVideo();
             Q_EMIT refreshPropertiesPanel();
         }
    diff --git a/src/bin/projectitemmodel.cpp b/src/bin/projectitemmodel.cpp
    index 25eb96d2e..37e422460 100644
    --- a/src/bin/projectitemmodel.cpp
    +++ b/src/bin/projectitemmodel.cpp
    @@ -39,6 +39,7 @@ SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
     #include <QMimeData>
     #include <QProgressDialog>
     #include <QTemporaryFile>
    +#include <QStorageInfo>
    
     #include <mlt++/Mlt.h>
     #include <queue>
    @@ -1866,7 +1867,16 @@ void ProjectItemModel::updateWatcher(const std::shared_ptr<ProjectClip> &clipIte
             QFileInfo check_file(clipItem->clipUrl());
             // check if file exists and if yes: Is it really a file and no directory?
             if ((check_file.exists() && check_file.isFile()) || clipItem->clipStatus() == FileStatus::StatusMissing) {
    +#ifdef Q_OS_WIN
    +            // On Windows, monitoring a file on a non existing drive crashes.
    +            QStorageInfo storage(check_file.absoluteDir());
    +            if (storage.isValid() && storage.isReady()) {
    +                qDebug()<<"=== WATCHING FILE: "<<clipItem->clipUrl();
    +                m_fileWatcher->addFile(clipItem->clipId(), clipItem->clipUrl());
    +            }
    +#else
                 m_fileWatcher->addFile(clipItem->clipId(), clipItem->clipUrl());
    +#endif
             }
         }
     }
    Edited by Jean-Baptiste Mardelle
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment