[rygel] media-export: Undo place-holder hack



commit 6cf1e9a624bbe35ec5d77173ebeea05b3dac7d67
Author: Jens Georg <jensg openismus com>
Date:   Mon Nov 26 14:29:14 2012 +0100

    media-export: Undo place-holder hack
    
    127244d6 introduced a mtime of int64.MAX as a hack to mark items as a
    place-holder in the db, unfortunately not all paths handling with mtime were
    updated to reflect this, so uploaded items were harvested (due to size
    difference) but under some circumstances the mtime wasn't updated properly.

 .../rygel-media-export-media-cache.vala            |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-media-cache.vala b/src/plugins/media-export/rygel-media-export-media-cache.vala
index 257929a..468527a 100644
--- a/src/plugins/media-export/rygel-media-export-media-cache.vala
+++ b/src/plugins/media-export/rygel-media-export-media-cache.vala
@@ -174,6 +174,11 @@ public class Rygel.MediaExport.MediaCache : Object {
         var cursor = this.exec_cursor (SQLString.EXISTS, values);
         var statement = cursor.next ();
         timestamp = statement->column_int64 (1);
+
+        // Placeholder item
+        if (timestamp == int64.MAX) {
+            timestamp = 0;
+        }
         size = statement->column_int64 (2);
 
         return statement->column_int (0) == 1;



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