From: Jean-Baptiste Mardelle Date: Fri, 7 Oct 2011 10:22:47 +0000 (+0000) Subject: Fix name of dvgrab captured file: X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;ds=sidebyside;h=677110c9805e1b3b44b9e8a472c67a617f476565;p=kdenlive Fix name of dvgrab captured file: http://kdenlive.org/mantis/view.php?id=2344 svn path=/trunk/kdenlive/; revision=5947 --- diff --git a/src/recmonitor.cpp b/src/recmonitor.cpp index a4708047..6330474c 100644 --- a/src/recmonitor.cpp +++ b/src/recmonitor.cpp @@ -830,7 +830,19 @@ void RecMonitor::manageCapturedFiles() KUrl url = KUrl(dir.filePath(name)); if (KIO::NetAccess::exists(url, KIO::NetAccess::SourceSide, this)) { KFileItem file(KFileItem::Unknown, KFileItem::Unknown, url, true); - if (file.time(KFileItem::ModificationTime) > m_captureTime) capturedFiles.append(url); + if (file.time(KFileItem::ModificationTime) > m_captureTime) { + // The file was captured in the last batch + if (url.fileName().contains(':')) { + // Several dvgrab options (--timecode,...) use : in the file name, which is + // not supported by MLT, so rename them + QString newUrl = url.directory(KUrl::AppendTrailingSlash) + url.fileName().replace(':', '_'); + if (QFile::rename(url.path(), newUrl)) { + url = KUrl(newUrl); + } + + } + capturedFiles.append(url); + } } } kDebug() << "Found : " << capturedFiles.count() << " new capture files";