[rygel] media-export: Use file mtime as fallback
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] media-export: Use file mtime as fallback
- Date: Sat, 7 Aug 2010 16:04:35 +0000 (UTC)
commit 3886f3221f6636aa63bf12396f4ffc5425f29499
Author: Jens Georg <mail jensge org>
Date: Sat Aug 7 18:44:00 2010 +0300
media-export: Use file mtime as fallback
.../media-export/rygel-media-export-item.vala | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-item.vala b/src/plugins/media-export/rygel-media-export-item.vala
index f9c7114..d01425b 100644
--- a/src/plugins/media-export/rygel-media-export-item.vala
+++ b/src/plugins/media-export/rygel-media-export-item.vala
@@ -258,12 +258,15 @@ public class Rygel.MediaExport.Item : Rygel.MediaItem {
char[] datestr = new char[30];
date.strftime (datestr, "%F");
this.date = (string) datestr;
- } else {
- TimeVal tv = { (long) mtime, 0 };
- this.date = tv.to_iso8601 ();
}
}
+ // use mtime if no time tag was available
+ if (this.date == null) {
+ TimeVal tv = { (long) mtime, 0 };
+ this.date = tv.to_iso8601 ();
+ }
+
this.size = (long) size;
this.modified = (int64) mtime;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]