Command Line Scanner and Partial Refresh

I think you misunderstood what I meant. I was using a script to find files with a modtime of less than 24 hours, then getting the directory of said files and telling the plex scanner to scan them in. I was doing that in both the TV and Movies libraries.

In the case of TV we have seen what happens so instead of invoking the refresh -r flag I decided to just use scan and then once all the files were scanned run another command to refresh the metadata, which in turn scans the files I want it to scan and then some as we have seen. I can deal with this as instead of rescanning the extra files multiple times it just scans them once.

The issue I’m talking about now is related to how this scan method affect movies. When I try the same process for movies running the refresh on its own in the movie directory scanned does not pick up the unmatched movies. It is almost as if the movies section is doing what one would expect it to do, while the tv section does not.

Due to BOTH of these issues I simply made two different scan starters, one for tv and one for movies. I have included them below as that might be a better explanation.

TVUpdate

su - plex -c /bin/sh << eof
        export LD_LIBRARY_PATH=/usr/lib/plexmediaserver
        find /mnt/nt -type f -mmin -$((60*24)) -print0 | xargs -0 dirname -z | sort -uz | xargs -0 -I {} /usr/lib/plexmediaserver/Plex\ Media\ Scanner -p -s -c 2 -d "{}" 2>&1
        /usr/lib/plexmediaserver/Plex\ Media\ Scanner -r -p -c 2 2>&1
eof

MovieUpdate

su - plex -c /bin/sh << eof
        export LD_LIBRARY_PATH=/usr/lib/plexmediaserver
        find /mnt/nm -type f -mmin -$((60*24)) -print0 | xargs -0 dirname -z | sort -uz | xargs -0 -I {} /usr/lib/plexmediaserver/Plex\ Media\ Scanner -p -s -r -c 1 -d "{}" 2>&1
eof

As you can see in the TVUpdate section I run multiple scans, based on the results of the find command and after all those run refresh on the library to match the tv shows that were just scanned in. In the MovieUpdate section I have to include the refresh flag in the scan command as doing a refresh command like I did in the TVUpdate script after all the finds have been scanned will not actually tag the scanned files as it does with the TVUpdate.

I do hope this makes sense and you can see where the issue is.