Giter Club home page Giter Club logo

jbops's Introduction

JBOPS - Just a Bunch Of Plex Scripts

Donate PM PM Issue

Most of these scripts utilize a combination of Tautulli, python-plexapi, and requests.

Notice:

Updated for Tautulli. Use plexpy-branch if you are still using PlexPy.

Scripts List

Gist

Scripts pulled from my gist profile.

Maps
Example File Description
Maps Using Tautulli data, draw a map connecting Server to Clients based on IP addresses.
Fun
Gist File Description
aired_today_playlist Create a Plex Playlist with what was aired on this today's month-day, sort by oldest first. If Playlist from yesterday exists delete and create today's. If today's Playlist exists exit.
plexapi_haiku Create a hiaku from titles found in Plex.
Kill stream Killing streams is a Plex Pass only feature. So these scripts will only work for Plex Pass users.
Gist File Description
wait_kill_pause_notify_main Receive session_key from Tautulli when paused. Use sub-script wait_kill_pause_notify_sub to wait for X time then check if still paused. If so, kill. Toggle whether you'd like to be notified through a Tautulli notification agent.
watch_limit Kill streams if user has watched too much Plex Today.
play_limit Kill streams if user has played too much Plex Today.
kill_time Limit number of plays of TV Show episodes during time of day. Idea is to reduce continuous plays while sleeping.
kill_trans_pause_notify Kill Plex paused video transcoding streams and receive notification.
ip_whitelist Receive session_key and IP from Tautulli when playback starts. Use IP to check against whitelist. If not in whitelist use session_key to determine stream and kill.
kill_all_more_than If user has 2 or more concurrent streams kill all streams
kill_else_if_buffering Kill concurrent transcode streams of other users if Admin user is experiencing buffering warnings from Tautulli.
kill_more_than If user has 2 or more concurrent streams and the IP of the 2nd stream differs from 1st kill 2nd. If 2nd stream IP is the same as 1st stream don't kill.
kill_outsider_stream Kill stream if user is outside of local network.
kill_plex_streams Kill all Plex streams for whatever reason you want.
kill_session_bitrate Kill stream if bitrate is greater than 4 Mbps
kill_trans_exp_audio Kill Plex video transcoding streams only. All audio streams are left alone. Kill message based on platform.
kill_trans_pause Kill Plex paused video transcoding streams using Tautulli.
Notify
Gist File Description
notify_delay Delay Notification Agent message for concurrent streams.
find_unwatched_notify Find what was added TFRAME ago and not watched and notify admin using Tautulli.
notify_added_custom Send an email with what was added to Plex in the past week using Tautulli. Email includes title (TV: Show Name: Episode Name; Movie: Movie Title), time added, image, and summary.
notify_fav_tv_all_movie Notify users of recently added episode to show that they have watched at least LIMIT times via email. Also notify users of new movies.
notify_newip If a new IP is found send notification via the Email Notification Agent. Email contains User's Avatar image, link to location, IP address, and User's Email address.
notify_on_added Send an Email notification when a specific show is added to Plex. Add shows to list that you want notifications for.
notify_user_favorites Notify users of recently added episode to show that they have watched at least LIMIT times via email.
notify_user_newip Notify user that their account has been accessed by a new IP. IP is cleared to make sure notification is sent again.
twitter_notify Post to Twitter when TV/Movie is added to Plex. Include custom message and embed poster image. Option to tweet to TWITTER_USER if title is inside TITLE_FIND.
Utility
Gist File Description
plex_api_parental_control Set as cron or task for times of allowing and not allowing user access to server. Unsharing will kill any current stream from user before unsharing.
plex_api_share Share or unshare libraries
bypass_auth_name Use Tautulli to pull last IP address from user and add to List of IP addresses and networks that are allowed without auth in Plex.
delete_watched_TV From a list of TV shows, check if users in a list has watched shows episodes. If all users in list have watched an episode of listed show, then delete episode.
find_plex_meta Find location of Plex metadata.
find_unwatched Find what was added TFRAME ago and not watched using Tautulli.
grab_gdrive_media Grab media (videos, pictures) from Google Drive. All videos and pictures were automatically synced from Google Photos to Google Drive. Puts media into MEDIA_TYPE/YEAR/MONTH-DAY/FILE.ext directory structure.
plex_api_poster_pull Pull Movie and TV Show poster images from Plex.
plex_imgur_dl Pull poster images from Imgur and places them inside Shows root folder.
plex_theme_songs Download theme songs from Plex TV Shows.
plexapi_delete_playlists Delete all playlists from Plex using PlexAPI.
plexapi_search_file Find full path for Plex items.
refresh_next_episode Refresh the next episode of show once current episode is watched.
remove_watched_movies Find Movies that have been watched by a list of users. If all users have watched movie then delete.
stream_limiter_ban_email This is indented to restrict a user to the LIMIT amount of concurrent streams. User will be warned, punished, and banned completely if violations continue.
Reporting
Gist File Description
weekly_stats_reporting Pull library and user statistics of last week.
added_to_plex Find when media was added between STARTFRAME and ENDFRAME to Plex through Tautulli.
check_play Check if user has play a file more than 3 times but has not finished watching. Hoping to catch play failures.
check_plex_log Checking plex logs for debug code WARN and 'Failed to obtain a streaming resource for transcode of key /library/metadata/"titleID"'.
drive_check Check if drive exists. If not then notify via Tautulli notifier agent.
userplays_weekly_reporting Use Tautulli to count how many plays per user occurred this week and send email via Tautulli.

Setting Up Tautulli for Custom Scripts

Enabling Scripts in Tautulli:

Taultulli > Settings > Notification Agents > Add a Notification Agent > Script

Configuration

Taultulli > Settings > Notification Agents > New Script > Configuration:

  • Set scripts location to location of your script
  • Scroll down to option you want to use and select the script from the drop down menu
  • Set desired Script Timeout value
  • Optional - Add a description of the script for easy reference
  • Save

Triggers

Taultulli > Settings > Notification Agents > New Script > Triggers:

  • Check desired trigger
  • Save

Conditions

Taultulli > Settings > Notification Agents > New Script > Conditions:

  • Set desired conditions
  • Save

For more information on Tautulli conditions see here

Script Arguments

Taultulli > Settings > Notification Agents > New Script > Script Arguments:

  • Select desired trigger
  • Input desired notification parameters (List of parameters will likely be found inside script)
  • Save
  • Close

Common variables
Plex
Tautulli

jbops's People

Contributors

blacktwin avatar dirtycajunrice avatar philosowaffle avatar kurtzpt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.