Script to find "orphaned" recording files

I have created a script after seeing this thread:

Actually, I have two versions of the script: one Python script, and one PowerShell script.

They both do exactly the same thing:

  1. Fetch the paths of all recordings from a Channels DVR server database
  2. Fetch the defined storage locations from the server
  3. Get the list of all movies and TV shows present on the disk(s) at the storage locations
  4. Compare the list of files on the disk(s) with the recording paths that the server knows about
  5. Print on the screen all the orphaned files (recordings present on the disk(s) but not known to the DVR)

Code and scripts on my GitHub:

Instructions to run the scripts are on GitHub.