Skip to content

primetime43/plexLocationBlock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

plexLocationBlock

Block Plex streams via location. Can block by city, state or add users to allow the user to override a block. The script will automatically kill any stream that tries too start in a blocked location.

Requirements:

  • Python 3
  • Tautulli v2.5.2 or newer to run Python 3 or configure older versions to run Python 3)

How to Setup - Windows

  • Download the script Plex Location Block and place it anywhere locally on your machine
  • In Tautulli go to Settings and then Notification Agents image
  • Once in the above location, select add Add a new notification agent and scroll down to script in the list image
  • There you select where the script you downloaded in step 1 is located on your machine and set up like so image
  • Then the only other setting you need to set is on the Triggers tab. Check the Playback Start trigger and click save image

How to Use the Script

  • Once you have the above completed and set-up, you can modify the script to your needs (use notepad++ or whatever you prefer)
  • The only changes to the script that are needed are at the top on lines 8-10 (nothing else needs modified). The locationsToBlock array currently accepts cities and states to block, but allows users to override blocks. Users can be added when you want to block a state, but want to allow a certain user in that state to be allowed to watch (may add more specific locations later)

locationsToBlock

locationsToBlock = ["Florida", "Pennsylvania", "Los Angeles", "Houston"]

locationsToAllow

locationsToAllow = ["New York"]

usersToAllow

usersToAllow = ['test1', 'userNameEx']  # used to override locations

image

Releases

No releases published

Packages

No packages published

Languages