[rygel] media-export: Fix handling virtual-id: ids with :



commit 5105e2ce4a63e4e6b4bf27707629ee8e70fe63ca
Author: Jens Georg <mail jensge org>
Date:   Thu Jul 30 00:21:09 2020 +0200

    media-export: Fix handling virtual-id: ids with :
    
    If there's more than 2 : it would fail right away. Instead of splitting
    into all parts, limit it to two.
    
    Fixes #167

 src/plugins/media-export/rygel-media-export-root-container.vala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/plugins/media-export/rygel-media-export-root-container.vala 
b/src/plugins/media-export/rygel-media-export-root-container.vala
index 6c80981b..ed5ed91b 100644
--- a/src/plugins/media-export/rygel-media-export-root-container.vala
+++ b/src/plugins/media-export/rygel-media-export-root-container.vala
@@ -114,7 +114,7 @@ public class Rygel.MediaExport.RootContainer : TrackableDbContainer {
             return container;
         } else if (id.has_prefix (QueryContainer.ITEM_PREFIX)) {
             var tmp_id = id.replace (QueryContainer.ITEM_PREFIX, "");
-            var parts = tmp_id.split (":");
+            var parts = tmp_id.split (":", 2);
             if (parts.length != 2) {
                 return null;
             }


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