JuJuJurassic 49 Posted February 21, 2025 Posted February 21, 2025 Hi All, I want to trigger a library scan after an event in cron. The cron task looks and copies new files over, only if they are less than a day old, after it's found some and moved them, I'd like to trigger Emby to rescan it's libraries. However there may not be files always in which case I don't want it to trigger a rescan. Is there a way to do it? If not I've set the library to rescan every hour. Thanks and have a good evening
darkassassin07 652 Posted February 21, 2025 Posted February 21, 2025 (edited) curl -X 'POST' 'http://<emby-host>/emby/Library/Refresh?api_key=<key>' -H 'accept: */*' -d '' Â Add your hostname and api key and this will trigger a full library scan. Edited February 21, 2025 by darkassassin07 Missed a space
JuJuJurassic 49 Posted February 21, 2025 Author Posted February 21, 2025 I just copied and pasted it into a terminal curl -X 'POST' 'http://11.22.33.44/emby/Library/Refresh?api_key=123456' -H 'accept: */*' -d'' and got curl: option -d: requires parameter  The problem with a copy and paste is it sometimes misses something. is the line above correct? Thanks
darkassassin07 652 Posted February 21, 2025 Posted February 21, 2025 Also, unless you run emby on port 80, remember to add :8096 to your ip
Happy2Play 9780 Posted February 21, 2025 Posted February 21, 2025 There are many posts on this. Have you actually when to Emby's API? REST API Documentation
Happy2Play 9780 Posted February 21, 2025 Posted February 21, 2025 But can depend on if you want to scan a specific library or all libraries also. Â
JuJuJurassic 49 Posted February 21, 2025 Author Posted February 21, 2025 Thank you all so much. I'm going to have a look at this tomorrow, but for now I'm going to watch my emby, have a good evening  1
Happy2Play 9780 Posted February 21, 2025 Posted February 21, 2025 A side note you may run into CORS issues depending on your Emby connection as the Swagger will require localhost or https connection unless you adjust browser flags for your server connection mentioned at the beginning of this How to.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now