]> git.sesse.net Git - kdenlive/commitdiff
Fix enabling / disabling proxy for the project
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Thu, 17 Feb 2011 12:06:31 +0000 (12:06 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Thu, 17 Feb 2011 12:06:31 +0000 (12:06 +0000)
svn path=/trunk/kdenlive/; revision=5417

src/projectlist.cpp

index 87870c64d4d12efe0ac31550812afaba20f26e7b..cce8bb3d4bd7824ba8fc37dd44cc60c286b824c4 100644 (file)
@@ -2172,15 +2172,16 @@ void ProjectList::updateProxyConfig()
         }
         CLIPTYPE t = item->clipType();
         if ((t == VIDEO || t == AV || t == UNKNOWN) && item->referencedClip() != NULL) {
-            if  (generateProxy() && useProxy()) {
+            if  (generateProxy() && useProxy() && !item->isProxyRunning()) {
                 DocClipBase *clip = item->referencedClip();
                 if (clip->getProperty("frame_size").section('x', 0, 0).toInt() > proxyMinSize()) {
-                    kDebug()<<"// UPDATE ST PROXY";
-                    slotCreateProxy(clip->getId());
-                    setProxyStatus(item, PROXYWAITING);
+                    if (clip->getProperty("proxy").isEmpty()) {
+                        QString proxydir = m_doc->projectFolder().path( KUrl::AddTrailingSlash) + "proxy/";
+                        clip->setProperty("proxy", proxydir + item->referencedClip()->getClipHash() + ".avi");
+                    }
                 }
             }
-            else if (!item->hasProxy()) {
+            else if (item->hasProxy()) {
                 // remove proxy
                 item->referencedClip()->clearProperty("proxy");
                 QDomElement e = item->toXml().cloneNode().toElement();