-
Notifications
You must be signed in to change notification settings - Fork 229
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement partial library scan (filescanner) #1179
base: master
Are you sure you want to change the base?
Conversation
af2374a
to
0ef850c
Compare
The last time I looked into implementing this, I ran into problems with the |
0ef850c
to
67b84af
Compare
Thanks for that - I was so tunnel visioned on the artwork piece i missed that rather large problem! I've given this a wider stress test today and it appears to resolve the problem on deleting too many items by doing a negative ping on |
67b84af
to
c97a25b
Compare
@ejurgensen @chme I've had this on my own branch for a while and its been fine - I use it most on a slow (secondary) RPi 1 that has its (largish) media library on a remote NFS and configured not to rescan on startup - changes on NFS arent picked up by inotify and thus when I modify existing albums I can force a rescan of that specific path rather than force full libraary rescan. |
Sorry haven't looked at it. I will try to get around it. |
0f216d5
to
3038cb4
Compare
@chme - i rebased this against the recent changes in master for the partial scanning basd on scna type. with that work fresh in your memory are you able to give any comments on this PR? |
…t request for path specific scans
3038cb4
to
d2af6f9
Compare
@ejurgensen - any thoughts on this PR? |
I'm a bit unsure about the intended use of this, could you share a bit on that? I mean, I get that it means that you can trigger a partial rescan, but how is the user supposed to use it? Is it the goal that advanced users can integrate in library update scripts via the api, or is it the goal that users in the web UI can navigate to the directory they want rescanned? Both seem a bit clunky to me, but maybe there isn't a better alternative. |
In my own branch, I've built the UI extensions to trigger rescan which i've kept out of this PR But the use case is the latter you described and echo'd on #382 - large library mounted on NFS, I add a new album under the artist directory like above ( This is a little pain for my ancient RPI1 - scanning my ~10k files takes about 2.5 mins rather than the few seconds it would for scanning the specific directory. |
Thanks for the elaboration, I will try to get around to looking at the change. Just out of curiousity, have you tried something like this https://github.com/mhallin/notify-forwarder? That particular project seems like it is dead, but that way of solving the problem might have some merit. |
i have successfully rebased the
which branch is that? would be great to have it in the UI like i can see in your screenshot. |
@benediktkr - thanks for testing. It should work as intended; i've been using it since the original submission although there were concerns raised by others about accuracy of the rescans impacting existing items in db (i've not observed though)
This might be messy as my tree (my master etc) have fixes that work for me but not been accepted into the upstream, that incls web work. If you can do a bit of manual cherry-picking and to rebuild the UI I can point you at the files of interest:
|
I actually like the web ui changes youve made :) so im fine with using them. slightly related, but ive been trying to get a dark theme working, using a css file that the Dark Reader addon for Firefox has generated. I havent gotten it to work though (but it works great in my browser using the addon itself). if youre interested you can find it in my own builds of OwnTone at git.sudo.is/ben/builds/owntone. |
Fixes #382, workaround to #1173
Extend
library
interface to provide arescan path
entry point and expose onjson api
. Accepts a path for scan - currently implemented infilescanner
and allows for partial local library (re)scanning.Could be future extended for RSS lib and spotify lib scanners, with RSS potentially forcing refresh of items under a server (ie a path being
https://bbc.co.uk/rss/
to force rescan of these hosted RSS).Uses existing
filescanner.c
'sbulk_scan()
function but extended to take a requestedpath
otherwise use library directories as existing functionality.