mopidy / mopidy-local

Mopidy extension for playing music from your local music archive
https://mopidy.com/ext/local/
Apache License 2.0
62 stars 26 forks source link

Wishlist: Command to update local tag cache #5

Open fatg3erman opened 10 years ago

fatg3erman commented 10 years ago

Now that mopidy_scan is no more and that functionality is integrated into mopidy, would it be possible to implement mpd's 'update' command to permit the local files cache to be updated by a client. Many people are running mopidy on headless servers with remote clients, and running 'mopidy local scan' from a client isn't elegant or even possible sometimes.

The mopidy.library.refresh() API command would seem to be the obvious place to add this.

adamcik commented 10 years ago

We are fairly close to being able to add this. I just want to get my registry work in first, given that I'm improving how we extend the local library.

fatg3erman commented 10 years ago

Great news. I shall therefore give up on trying to get an Apache server to run mopidy local scan successfully :)

kcrwfrd commented 10 years ago

@adamcik how is this coming along? I'd love to help if there's anything I can do.

adamcik commented 10 years ago

Wiring up the update command to refresh should be trivial, this will not trigger a rescan, but it will ensure that the results from 'mopidy local scan' get loaded into memory.

fatg3erman commented 10 years ago

As far as I can tell, the HTTP API already does load the results of mopidy local scan via mopidy.library.refresh().

But I think a way of triggering a rescan - or even better would be automatic monitoring of the local files, with some HTTP API message to tell a client when something has changed - is a needed feature.

adamcik commented 10 years ago

Mhm, I agree about that, but even just wiring it up without the re-scan is a lot better than nothing.

mopidy/mopidy#742 is part of my plan to add background scanning using inotify with a mtime based fallback.

StephanMeijer commented 8 years ago

Is this already added?

adamcik commented 8 years ago

Don't think so.