Scan New media from command line


You guys are up the walls and I appreciate that but is there a way I can refresh all medai by running a scan from the command line?

For example - My Plex equivalent would be:-

while [ $section -le 50 ]
echo "$(date) Updating Plex Section: Server 1 DOCKERNAME " $section >> /tmp/Plex_Update
docker exec DOCKERNAME /usr/lib/plexmediaserver/Plex\ Media\ Scanner --scan --refresh --section $section
section=$(( $section + 1 ))


This would automatically scan the 1st 50 sections (I dont have anywhere near 50 sections but it does no harm if they don’t exist :stuck_out_tongue:


I found a similar thread in Emby ->scanning from terminal

and i have done the following from a Ubuntu OS with Docker install:

Note: API key has been configured and is correct!

curl --data ‘’
curl --data ‘’

both are giving me the error:
Access token is invalid or expired



@Choakem And this is an API key you’ve configured in your advanced settings?


That is correct - API key created and correct in the examples given above (although I have replaced the real API key with XXXX)