[rygel/rygel-0.16] core: Prepend generated filename with UUID
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/rygel-0.16] core: Prepend generated filename with UUID
- Date: Thu, 30 Aug 2012 18:17:47 +0000 (UTC)
commit 0ed9b5359394bff4c6677b600ee1061571036076
Author: Jens Georg <mail jensge org>
Date: Thu Aug 30 19:45:45 2012 +0200
core: Prepend generated filename with UUID
Make it easier for media-export to pick up the file by not modifying the
extension.
src/librygel-server/rygel-item-creator.vala | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/librygel-server/rygel-item-creator.vala b/src/librygel-server/rygel-item-creator.vala
index 80f01bd..65183a9 100644
--- a/src/librygel-server/rygel-item-creator.vala
+++ b/src/librygel-server/rygel-item-creator.vala
@@ -498,7 +498,13 @@ internal class Rygel.ItemCreator: GLib.Object, Rygel.StateMachine {
"_",
RegexMatchFlags.NOTEMPTY);
- return mangled;
+ var udn = new uchar[50];
+ var id = new uchar[16];
+
+ UUID.generate (id);
+ UUID.unparse (id, udn);
+
+ return (string) udn + "-" + mangled;
}
/**
@@ -522,13 +528,7 @@ internal class Rygel.ItemCreator: GLib.Object, Rygel.StateMachine {
var file = dir.get_child_for_display_name (this.mangle_title (title));
- var udn = new uchar[50];
- var id = new uchar[16];
-
- UUID.generate (id);
- UUID.unparse (id, udn);
-
- return file.get_uri () + (string) udn;
+ return file.get_uri ();
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]