Re: Baloo and Application using it

2017-02-18 Thread David Faure
On mardi 14 février 2017 08:17:33 CET Matthieu Gallien wrote:
> Hello,
> 
> I am using Baloo to collect all audio files in its database. I would like to
> keep the list up to date with the Baloo database when my application is
> running.
> 
> Currently Baloo DBus interface provides two information:
> * the files currently being scanned: could help discover new files ;
> * a signal with a list of modified files (as far as I understand, this is
> for metadata changes only).
> 
> I am missing notifications of moved files (with same metadata) or removed
> files.
> 
> I have thought of two solutions:
> * adding in my application the use of file system watchers such that I am
> notified directly about the missing changes. This would duplicate watchers
> set by Baloo;
> * adding code to Baloo to send signals about file moves and file deletes.
> Baloo is already keeping track of them.

I don't know much (if anything) about Baloo, but from what you say
it wouldn't cost much for baloo to emit these signals, since it has the 
information already. So it seems to me you could go ahead and write a patch 
for baloo to do this.

-- 
David Faure, fa...@kde.org, http://www.davidfaure.fr
Working on KDE Frameworks 5



Baloo and Application using it

2017-02-14 Thread Matthieu Gallien
Hello,

I am using Baloo to collect all audio files in its database. I would like to 
keep the list up to date with the Baloo database when my application is 
running.

Currently Baloo DBus interface provides two information:
* the files currently being scanned: could help discover new files ;
* a signal with a list of modified files (as far as I understand, this is for 
metadata changes only).

I am missing notifications of moved files (with same metadata) or removed 
files.

I have thought of two solutions:
* adding in my application the use of file system watchers such that I am 
notified directly about the missing changes. This would duplicate watchers set 
by Baloo;
* adding code to Baloo to send signals about file moves and file deletes. 
Baloo is already keeping track of them.

By the way, I did not yet check if Tracker provides something covering my 
needs.

What do you think ?
Any advice would be much appreciated.

Best regards