Scan New media from command line

#1

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 ]
do
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 ))

done

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:

#2

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 ‘’ http://127.0.0.1:8096/Library/Refresh?api_key=XXXX
curl --data ‘’ http://127.0.0.1:8096/Emby/Library/Refresh?api_key=XXXX

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

regards

#3

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

#4

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

:stuck_out_tongue_winking_eye: