[chronojump] Ensure encoder videoURL is always relative on database



commit 1ec4da8a0e17ec0d9eb419e170ac9c3c6f04dc8a
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Feb 10 22:48:59 2015 +0100

    Ensure encoder videoURL is always relative on database

 src/sqlite/encoder.cs |    2 +-
 src/util.cs           |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/sqlite/encoder.cs b/src/sqlite/encoder.cs
index 8b3ea09..e542e9b 100644
--- a/src/sqlite/encoder.cs
+++ b/src/sqlite/encoder.cs
@@ -137,7 +137,7 @@ class SqliteEncoder : Sqlite
                                ", minHeight = " + es.minHeight +
                                ", description = '" + es.description + 
                                "', status = '" + es.status + 
-                               "', videoURL = '" + es.videoURL + 
+                               "', videoURL = '" + removeURLpath(es.videoURL) + 
                                "', encoderConfiguration = '" + es.encoderConfiguration.ToString(":",true) + 
                                "', future1 = '" + Util.ConvertToPoint(es.future1) + 
                                "', future2 = '" + es.future2 + 
diff --git a/src/util.cs b/src/util.cs
index 5df0ec8..d7b1ace 100644
--- a/src/util.cs
+++ b/src/util.cs
@@ -839,6 +839,7 @@ public class Util
        }
 
        //returns absolute path, but in encoder this URL is stored in database as relative to be able to move 
data between computers
+       //see SqliteEncoder.removeURLpath
        public static string GetVideoFileName (int sessionID, Constants.TestTypes testType, int uniqueID) {
                return GetVideoSessionDir(sessionID) + Path.DirectorySeparatorChar + 
                        testType.ToString() + "-" + uniqueID.ToString() +


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]