瀏覽代碼

UI: Remux mp4/mov to mp4/mov with suffix

derrod 2 年之前
父節點
當前提交
8e1cae4f02
共有 1 個文件被更改,包括 9 次插入1 次删除
  1. 9 1
      UI/window-remux.cpp

+ 9 - 1
UI/window-remux.cpp

@@ -474,10 +474,18 @@ void RemuxQueueModel::checkInputPath(int row)
 		else
 			entry.state = RemuxEntryState::InvalidPath;
 
+		QString newExt = ".mp4";
+		QString suffix = fileInfo.suffix();
+
+		if (suffix.contains("mov", Qt::CaseInsensitive) ||
+		    suffix.contains("mp4", Qt::CaseInsensitive)) {
+			newExt = ".remuxed." + suffix;
+		}
+
 		if (entry.state == RemuxEntryState::Ready)
 			entry.targetPath = QDir::toNativeSeparators(
 				fileInfo.path() + QDir::separator() +
-				fileInfo.completeBaseName() + ".mp4");
+				fileInfo.completeBaseName() + newExt);
 	}
 
 	if (entry.state == RemuxEntryState::Ready && isProcessing)