Re: [Tracker] How to get newly added audio files?



2011/3/28 Adrien Bustany <abustany gnome org>

On Mon, 28 Mar 2011 13:52:24 +0900, simon hong wrote:

Dear Tracker folks,

I want to write small  program by using tracker.
(I want to use tracker because tracker can add new files automatically.)

That program loops infinitely, and gets newly added audio file list
from tracker.

At first loop, it gets all audio files from tracker.
And next loop (maybe some hours later), it fetches new files (if new
audio files are created or copied).

How can I get only new file list?

Any ideas (timestamp ?) will be appreciated.

Thank you.
Simon

Hello Simon,


Hello Adrien,


I guess you can use the tracker:modified or tracker:added properties here
(I'd recommend tracker:modified, but am not sure how it's defined for newly
saved resources).

Now, I use "SELECT nie:url(?u) WHERE {?u a nfo:Audio}" to get audio files.
I don't know how to use above properties (tracker:modified or
tracker:added)  for fetching newly added files.
Can you give some advice how to make sparql query for my purpose?
Or any documentation or guide for sparql will be appreciate.

Note that instead of looping, you could also use the GraphUpdated signal to
get updates in real time.

GraphUpdated signal is what I wanted ^^;
It works well :)

Thank you.
Simon

Cheers

Adrien
_______________________________________________
tracker-list mailing list
tracker-list gnome org
http://mail.gnome.org/mailman/listinfo/tracker-list



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