Jump to content

Is it possible to trigger a library refresh from the host command line


ChrisJ60

Recommended Posts

ChrisJ60

Until recently my media library lived on an external RAID array directly attached to my Mac mini (where Emby runs). For various reasons, that are not especially relevant here, I have had to relocate it to my Synology NAS and mount the shared folder on the Mac mini (I know that Emby is available for Synology, but my Mac mini has far more horsepower than my NAS...).

This setup works fine except that Emby's automatic folder monitoring (which I imagine is based on filesystem change notifications from the OS) does not work on mounted network share volumes (I don't think SMB supports this kind of notification?). I have scheduled a nightly library refresh scan, which works fine, but sometimes we add something to the library and want it to be picked up ASAP. It is not super hard to do that by logging into Emby as an admin user and initiating a library refresh scan, but I was wondering if there is any way to trigger such a scan from the macOS command line (by sending some kind of command to Emby), or via some API call (maybe invoked via curl)? That way I could automate it a bit more and make for a slightly better experience.

Does anyone know if this is possible at all?

Thanks.

Link to comment
Share on other sites

Happy2Play

There are several topics with examples.

https://emby.media/community/index.php?/topic/112972-make-api-requests-for-library-scan-and-more-in-powershell-help/&do=findComment&comment=1190388

If you are on localhost or https connect you can open the API link at the bottom of dashboard.  If on LAN/non https connection you will run into CORS issues.

https://emby.media/community/index.php?/topic/110642-swagger-api-help/&do=findComment&comment=1191431

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...