MCPcopy
hub / github.com/blacktwin/JBOPS

github.com/blacktwin/JBOPS @main sqlite

repository ↗ · DeepWiki ↗
317 symbols 1,128 edges 65 files 88 documented · 28%
README

JBOPS - Just a Bunch Of Plex Scripts

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

For use of config.ini for common variables please use plexapi.CONFIG

Default location ~/.config/plexapi/config.ini

# To find path
import plexapi
print(plexapi.CONFIG_PATH)

Contact

PM PM PM Issue

Donation

Buy Me a Coffee    or    Buy Me a Beer

Coins?

BTC:

 3FCb4F3bv1hHCJxq6HJMQiAMn883v3okdh

BCH:

qr758vkn7nv6hx0ur9m2tlv8q4qjrvg6pg3yw4kzwq

ETH:

0xa76c8EB9A4955023F0dAABfb32FCD2b460910F2b

LTC:

MCw3r6rC8jNCcUvSMSu9EqQyyvEDp8EpEf

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
playlist_manager Create and share playlists based on Most Popular TV/Movies from Tautulli and Aired this day in history.
plexapi_haiku Create a hiaku from titles found in Plex.

Kill stream

Killing streams is a Plex Pass feature. These scripts will only work for Plex Pass users.

Gist File Description
limiterr Limiting Plex users by plays, watches, or total time from Tautulli.. See killsteam section limiterr_readme.md
kill_stream Use Conditions, Arguements, and Parameters to kill a Plex stream. See killsteam section readme.md

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.
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 Ple

Core symbols most depended-on inside this repo

selectors
called by 9
fun/playlist_manager.py
get_metadata
called by 8
utility/media_manager.py
share
called by 7
utility/plex_api_share.py
date_split
called by 6
reporting/weekly_stats_reporting.py
_call_api
called by 6
reporting/weekly_stats_reporting.py
action_show
called by 6
utility/media_manager.py
check_users_access
called by 5
utility/sync_watch_status.py
_call_api
called by 5
utility/media_manager.py

Shape

Function 185
Method 87
Class 45

Languages

Python100%

Modules by API surface

utility/media_manager.py26 symbols
killstream/kill_stream.py25 symbols
utility/sync_watch_status.py22 symbols
reporting/weekly_stats_reporting.py21 symbols
reporting/watched_percentages.py17 symbols
fun/playlist_manager.py14 symbols
maps/ips_to_maps.py12 symbols
utility/stream_limiter_ban_email.py10 symbols
notify/notify_fav_tv_all_movie.py10 symbols
utility/find_unwatched.py9 symbols
reporting/added_to_plex.py9 symbols
notify/notify_user_newip.py9 symbols

For agents

$ claude mcp add JBOPS \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact