Re: [Tracker] SubjectsChanged and nmm:MusicPiece



Hi,

El lun, 08-03-2010 a las 16:45 +0100, ext Florent Viard escribiÃ:
Hi,

When I do:
cp file1.mp3 indexed_directory/file1.mp3
Tracker triggers the subjectsAdded signal for nfo:audio and nmm:MusicPiece.

When I do:
rm indexed_directory/file1.mp3
Tracker triggers the subjectsRemoved signal for nfo:audio and 
nmm:MusicPiece.

But, when I already have indexed_directory/file1.mp3 and do:
cp file2.mp3 indexed_directory/file1.mp3
(or simply touch indexed_directory/file1.mp3)
Tracker triggers only the subjectsChanged signal for nfo:Audio and not 
for nmm:MusicPiece.

Is it a bug (I'm still using Tracker 0.7.17) or something I didn't 
understood ? 

It is exactly the expected behavior. From tracker point of view, it is
just an Mp3 where the properties has changed (including size :))

Indeed the application moving the file can play nicer and first remove
the old file, and then create the new file. If you are working in a
controlled environment this can be done.

Or even use the Direct Notification mechanism available:

http://live.gnome.org/Tracker/Discussion/DirectNotification

But these solutions requires changes on applications. Just as-it-is, to
move a file over a another already indexed is just a SubjectChanged
signal.

It is disturbing as my program is looking at the music 
pieces, and correctly see when a new music is added or removed, but 
can't be updated when a music is *modified*.

Well, you receive the SubjectsChanged signal that is a "modification"
indicator. The case of "move" it is special, but shouldn't be a big
drama for the client applications.

Regards,

Ivan




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