After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 690772 - Several issues related to tracking changes
Several issues related to tracking changes
Status: RESOLVED FIXED
Product: rygel
Classification: Applications
Component: MediaExport plugin
0.17.x
Other Linux
: Normal normal
: ---
Assigned To: Jens Georg
rygel-maint
ivi
Depends on:
Blocks:
 
 
Reported: 2012-12-27 14:10 UTC by regis.merlino
Modified: 2013-02-28 15:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
LastChange when adding a new picture file (1.15 KB, text/xml)
2012-12-27 14:10 UTC, regis.merlino
  Details
Change event when deleting an image file (1.15 KB, text/xml)
2012-12-27 14:10 UTC, regis.merlino
  Details
media-export: Fix missing objAdd event (1.10 KB, patch)
2012-12-27 20:21 UTC, Jens Georg
committed Details | Review
server: Don't add non-tracked LastChange events (1.19 KB, patch)
2012-12-27 20:42 UTC, Jens Georg
committed Details | Review
Event when starting Rygel (1.16 KB, text/xml)
2013-01-03 10:19 UTC, regis.merlino
  Details

Description regis.merlino 2012-12-27 14:10:16 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)
Comment 1 regis.merlino 2012-12-27 14:10:50 UTC
Created attachment 232270 [details]
Change event when deleting an image file
Comment 2 Jens Georg 2012-12-27 20:21:00 UTC
Created attachment 232296 [details] [review]
media-export: Fix missing objAdd event
Comment 3 Jens Georg 2012-12-27 20:42:53 UTC
Created attachment 232299 [details] [review]
server: Don't add non-tracked LastChange events
Comment 4 regis.merlino 2013-01-03 10:16:02 UTC
Review of attachment 232296 [details] [review]:

This patch looks fine and fixes the lack of "objAdd" line in the event.
Comment 5 regis.merlino 2013-01-03 10:19:06 UTC
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.
Comment 6 regis.merlino 2013-01-03 10:19:47 UTC
Created attachment 232621 [details]
Event when starting Rygel
Comment 7 regis.merlino 2013-01-03 10:24:17 UTC
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
Comment 8 Jens Georg 2013-01-07 14:39:02 UTC
(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>
Comment 9 Jens Georg 2013-01-07 14:46:55 UTC
when adding, there's some change events on the modified folder I don't really understand though
Comment 10 Jens Georg 2013-01-10 15:56:18 UTC
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
Comment 11 regis.merlino 2013-01-14 09:27:02 UTC
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.
Comment 12 Jens Georg 2013-02-27 17:12:09 UTC
Do we still need to keep this open?
Comment 13 regis.merlino 2013-02-28 15:12:56 UTC
Hi Jens,

No, this is old an too generic.
We'll open dedicated bugs if needed.

Thanks.
Comment 14 Jens Georg 2013-02-28 15:22:36 UTC
closing as per comment 13.