GNOME Bugzilla – Bug 690772
Several issues related to tracking changes
Last modified: 2013-02-28 15:22:36 UTC
Created attachment 232269 [details] LastChange when adding a new picture file I attached 2 xml files to show the various issues: * add.xml: change event after a new image file is created in the "Pictures" folder * remove.xml: change event when an image file is deleted from the "Pictures" folder Hereafter are the comments on those generated events: * When adding an item, there is no "objAdd" line in the change event, only an "objMod" for this new item * Unrelated containers appear in the change event: the videos container and the root container should not appear in the change event for a new image created into the "Pictures" folder * There are several lines referencing the same object in the change event, there should be only one I think * Not sure if this is actually an issue, but the objectUpdateID property for virtual parents/containers do not persist in the DB * Virtual containers such as "All", "Year", etc. should appear in the change event if the @refID is used as described in bug #690770 (I could not verify this because currently not used this in the plugin)
Created attachment 232270 [details] Change event when deleting an image file
Created attachment 232296 [details] [review] media-export: Fix missing objAdd event
Created attachment 232299 [details] [review] server: Don't add non-tracked LastChange events
Review of attachment 232296 [details] [review]: This patch looks fine and fixes the lack of "objAdd" line in the event.
Review of attachment 232299 [details] [review]: Seems to partly fix the unrelated containers issue. But I still get lines for "0" and "FileSystem" containers in the event. They should not be present. Only the "Pictures" parent folder should be listed.
Created attachment 232621 [details] Event when starting Rygel
I would like to add some new comments: * the systemUpdateID / objectUpdateID attributes are incremented many times while this seems not necessary: the Rygel.ContentDirectory::on_container_updated() method is called when no change occured * Each time I start Rygel I get a lastChange event even though nothing changed since last launch (see attached start.xml file). The event always contains an "objDel" line
(In reply to comment #5) > Review of attachment 232299 [details] [review]: > > Seems to partly fix the unrelated containers issue. > But I still get lines for "0" and "FileSystem" containers in the event. > They should not be present. Only the "Pictures" parent folder should be listed. "0" gets updates since the virtual folders are regenerated and thus change the root container. "Filesystem" I don't know, that needs checking. (In reply to comment #7) > I would like to add some new comments: > > * the systemUpdateID / objectUpdateID attributes are incremented many times > while this seems not necessary: the > Rygel.ContentDirectory::on_container_updated() method is called when no change > occured Well, that happens through the regeneration of the virtual folders. Not sure if that's necessary anymore, but it generates the the ContainerUpdateIDs event list. > > * Each time I start Rygel I get a lastChange event even though nothing changed > since last launch (see attached start.xml file). The event always contains an > "objDel" line That is weird. My initial XML looks like this: <?xml version="1.0" encoding="UTF-8"?><StateEvent xmlns="urn:schemas-upnp-org:av:cds-event" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:schemas-upnp-org:av:cds-event http://www.upnp.org/schemas/av/cds-events.xsd"><objMod objID="0" updateID="347" stUpdate="0"/><objMod objID="7a0fb9805ceb4e990fffd98287b9b8b7" updateID="348" stUpdate="0"/><objMod objID="Filesystem" updateID="349" stUpdate="0"/><objMod objID="0" updateID="353" stUpdate="0"/></StateEvent>
when adding, there's some change events on the modified folder I don't really understand though
I've pushed the two patches and another one that removes some of the superflous events to master. For the objDel event on start-up, are you removing files from the monitored directores between rygel starts? Attachment 232296 [details] pushed as ad6626c - media-export: Fix missing objAdd event Attachment 232299 [details] pushed as 8caa11e - server: Don't add non-tracked LastChange events
It seems that your last commits did change the behavior: now I don't get the objDel anymore. I only get 2 objMod for objID="0". To answer your question, no I was not changing the dir contents at all. Obly did a "ctrl+c" and relaunch rygel just after.
Do we still need to keep this open?
Hi Jens, No, this is old an too generic. We'll open dedicated bugs if needed. Thanks.
closing as per comment 13.