-
Notifications
You must be signed in to change notification settings - Fork 237
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? |
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. |
In case you are still following this up @whatdoineed2do or @benediktkr : I would very much love something like this, even though my use case is different. I have the issue that my downloader seems to still have "a finger" on the file when it puts it into the download folder (if I understand the code correctly it downloads the content into the mp3 and then updates the id3 tags etc, but by that time, the folder watcher has already retrieved the non-existing info). So I have to do a "rescan all with metadata" every time I add something, because it wont update the metadata for just that one album or so. My collection is 100k+ files so its getting a little stupid in regards to runtime and also file reads (nothing to wear out a drive than to metadata scan 100k files for no good reason once in a while). So if you could get this into owntone, it would be awesome. As for the usecase: I would argue that most people that run owntone are advanced users in some manner, so that adding an additional scan option like this wont make a difference. Plex lets you do it too ;) |
@Bockiii that sounds like something isn't working as it should. Would you mind opening an issue with debug logging of when the downloader adds a track? Btw if the downloader is a script you might be able to add a 'touch' command to avoid a full rescan. |
The downloader is deemix and its development has been abandoned a while ago (but its still working until they fix the loophole). So I cant open a PR with the deemix dev :) I will open another issue for this |
…t request for path specific scans
d2af6f9
to
9999fbf
Compare
@Bockiii However, its less of a push for me since, as I say, I have my own tree with own features I wanted that were not accepted into the upstream. |
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.