MPD Auto-Update

classic Classic list List threaded Threaded
7 messages Options
su-
Reply | Threaded
Open this post in threaded view
|

MPD Auto-Update

su-
hi guys,

just wondering if mpd can be compiled with the auto-update enabled ? Currently after installing mpd binary I have to manually update my database when files are removed / added. Thxs for your time


--
 Securely sent with Tutanota. Get your own encrypted, ad-free mailbox:
 https://tutanota.com
Reply | Threaded
Open this post in threaded view
|

Re: MPD Auto-Update

Stuart Henderson
On 2019/08/01 17:32, [hidden email] wrote:
> hi guys,
>
> just wondering if mpd can be compiled with the auto-update enabled ? Currently after installing mpd binary I have to manually update my database when files are removed / added. Thxs for your time
>
>
> --
>  Securely sent with Tutanota. Get your own encrypted, ad-free mailbox:
>  https://tutanota.com

It's not a simple case of "enable flag and build it", this features uses
a Linux-specific interface (inotify) to monitor directories.

It might be possible to convert to something using the BSD kqueue interface,
but this will use quite a lot of resources (a file descriptor for every
monitored file, not just directory), on even an average sized music
collection this is likely to run into kernel limits very easily ..

su-
Reply | Threaded
Open this post in threaded view
|

Re: MPD Auto-Update

su-
S,
Thxs for the explanation! (will just set up a cron job for the time being until i give it more thought)

--
 Securely sent with Tutanota. Get your own encrypted, ad-free mailbox:
 https://tutanota.com


1 Aug 2019, 16:40 by [hidden email]:

> On 2019/08/01 17:32, [hidden email] wrote:
>
>> hi guys,
>>
>> just wondering if mpd can be compiled with the auto-update enabled ? Currently after installing mpd binary I have to manually update my database when files are removed / added. Thxs for your time
>>
>>
>> --
>>  Securely sent with Tutanota. Get your own encrypted, ad-free mailbox:
>>  https://tutanota.com
>>
>
> It's not a simple case of "enable flag and build it", this features uses
> a Linux-specific interface (inotify) to monitor directories.
>
> It might be possible to convert to something using the BSD kqueue interface,
> but this will use quite a lot of resources (a file descriptor for every
> monitored file, not just directory), on even an average sized music
> collection this is likely to run into kernel limits very easily ..
>

prx
Reply | Threaded
Open this post in threaded view
|

Re: MPD Auto-Update

prx
Look at "entr"

Le August 1, 2019 4:56:44 PM UTC, [hidden email] a écrit :
>S,
>Thxs for the explanation! (will just set up a cron job for the time
>being until i give it more thought)

--
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.

Reply | Threaded
Open this post in threaded view
|

Re: MPD Auto-Update

Stuart Henderson
On 2019/08/01 18:40, Xavier wrote:
> Look at "entr"

There is no getting away from the fact that you either have to use
kqueue or do periodic scans to identify changes to files.

Reply | Threaded
Open this post in threaded view
|

Re: MPD Auto-Update

Antoine Jacoutot-7
In reply to this post by Stuart Henderson
On Thu, Aug 01, 2019 at 05:40:29PM +0100, Stuart Henderson wrote:

> On 2019/08/01 17:32, [hidden email] wrote:
> > hi guys,
> >
> > just wondering if mpd can be compiled with the auto-update enabled ? Currently after installing mpd binary I have to manually update my database when files are removed / added. Thxs for your time
> >
> >
> > --
> >  Securely sent with Tutanota. Get your own encrypted, ad-free mailbox:
> >  https://tutanota.com
>
> It's not a simple case of "enable flag and build it", this features uses
> a Linux-specific interface (inotify) to monitor directories.
>
> It might be possible to convert to something using the BSD kqueue interface,
> but this will use quite a lot of resources (a file descriptor for every
> monitored file, not just directory), on even an average sized music
> collection this is likely to run into kernel limits very easily ..

We have a port of inotify.
Maybe we could provide a FLAVOR?
(I don't need it, just saying)

--
Antoine

Reply | Threaded
Open this post in threaded view
|

Re: MPD Auto-Update

Solene Rapenne
On Fri, Aug 02, 2019 at 01:00:49AM +0200, Antoine Jacoutot wrote:

> On Thu, Aug 01, 2019 at 05:40:29PM +0100, Stuart Henderson wrote:
> > On 2019/08/01 17:32, [hidden email] wrote:
> > > hi guys,
> > >
> > > just wondering if mpd can be compiled with the auto-update enabled ? Currently after installing mpd binary I have to manually update my database when files are removed / added. Thxs for your time
> > >
> > >
> > > --
> > >  Securely sent with Tutanota. Get your own encrypted, ad-free mailbox:
> > >  https://tutanota.com
> >
> > It's not a simple case of "enable flag and build it", this features uses
> > a Linux-specific interface (inotify) to monitor directories.
> >
> > It might be possible to convert to something using the BSD kqueue interface,
> > but this will use quite a lot of resources (a file descriptor for every
> > monitored file, not just directory), on even an average sized music
> > collection this is likely to run into kernel limits very easily ..
>
> We have a port of inotify.
> Maybe we could provide a FLAVOR?
> (I don't need it, just saying)
>
wouldn't it require a change for mpd in login.conf to increase the
openfiles limits anyway?

one could use mpc package to run `mpc update --wait` from crontab, on my
laptop it takes 290 ms to scan 6000 files.