Re: [Tracker] How to get newly added audio files?
- From: simon hong <simon hong81 gmail com>
- To: Adrien Bustany <abustany gnome org>
- Cc: Philip Van Hoof <philip codeminded be>, tracker-list gnome org
- Subject: Re: [Tracker] How to get newly added audio files?
- Date: Fri, 15 Apr 2011 10:27:37 +0900
2011/4/14 Adrien Bustany
<abustany gnome org>
Le Thu, 14 Apr 2011 10:37:27 +0200,
Philip Van Hoof <philip codeminded be> a éit :
> On Thu, 2011-04-14 at 17:19 +0900, simon hong wrote:
>
> There are two arrays, inserted and deleted. The inserted triples are
> in inserted and the deleted triples are in deleted.
>
> An overwrite means that there's one in inserted and one in deleted
> (one complete graphupdated signal is transactional).
So in that usecase you'd probably have to filter on the
tracker:available predicate in the GraphUpdated signal...
I can get only mounted files by filtering (tracker:available) :) thank you.
Now, I cannot fetch only newly added files based on tracker:modifled.
When I insert usb stick again without any copy or delete files in usb stick, tracker:modified value is increased.
So, I think tracker:added value is more suitable for my purpose.
File's tracker:added value is not changed during insert and remove many times.
To get latest tracker:added value, I used following query.
SELECT MAX (?t) WHERE { ?u a nmm:MusicPiece; tracker:added ?t }
The result is string formatted xsd:dateTime.
I want to convert above result to another format like timezone.
So, I made following query to convert xsd:dateTime, But tracker-sparql returns (null)...
SELECT fn:timezone-from-dateTime (?t) WHERE { ?u a nmm:MusicPiece; tracker:added ?t }
How can I convert dateTime?
Any advice will be appreciate.
Thank you.
Simon.
>
> > When I insert and remove usb stick, GraphUpdated signals from
> > tracker-store is delivered.
> > How can I differentiate insert from remove ?
>
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]