Skip to content

Instantly share code, notes, and snippets.

@JonnyWong16
JonnyWong16 / mass_plex_accounts.py
Last active Jul 5, 2021
Generate Plex accounts
View mass_plex_accounts.py
import random
import requests
import string
import sys
import time
import uuid
try:
NUMBER_OF_ACCOUNTS = int(sys.argv[1])
except (IndexError, ValueError):
@JonnyWong16
JonnyWong16 / rename_seasons_masterclass.py
Last active Jul 25, 2021
Rename Masterclass seasons in Plex with summary.
View rename_seasons_masterclass.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Rename season title for TV shows on Plex.
# Author: /u/SwiftPanda16
# Requires: plexapi
from plexapi.server import PlexServer
@JonnyWong16
JonnyWong16 / get_plex_token.py
Created Jun 17, 2021
Create a new Plex.tv token for your app.
View get_plex_token.py
import uuid
from plexapi.utils import getMyPlexAccount, createMyPlexDevice
account = getMyPlexAccount()
product = input("App name: ")
headers = {
'X-Plex-Platform': '',
'X-Plex-Platform-Version': '',
'X-Plex-Provides': '',
'X-Plex-Version': '',
@JonnyWong16
JonnyWong16 / openPlexMetadataXML.js
Last active May 30, 2021
Open the Plex metadata XML info for any media page with Ctrl+I
View openPlexMetadataXML.js
// ==UserScript==
// @name Open Plex Metadata XML
// @namespace https://app.plex.tv
// @version 1.0
// @description Open the Plex metadata XML info for any media page with Ctrl+I.
// @author JonnyWong16
// @homepage https://gist.github.com/JonnyWong16/ec660094e4cd7233f1dd96b4b4d62e21
// @match https://app.plex.tv/*
// @grant none
// ==/UserScript==
@JonnyWong16
JonnyWong16 / README.md
Created Jul 12, 2020 — forked from MarMed/README.md
Routing plex traffic through an SSH tunnel
View README.md

Routing plex traffic through an SSH tunnel

This guide creates a reverse SSH tunnel to route all Plex server traffic through it.

Step 2 is done on the tunnel, all other steps are done on the plex server.

1. Setup SSH keys (if you already have key based authenthication setup skip to step 2)

On plex server:

@JonnyWong16
JonnyWong16 / canyouseemeorg_check.py
Last active May 15, 2020
Check Plex remote access using CanYouSeeMe.org and send a notification
View canyouseemeorg_check.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Check Plex remote access using CanYouSeeMe.org and send a notification
# Author: /u/SwiftPanda16
# Tautulli script trigger:
# * Plex Remote Access Down
# Tautulli script conditions:
# * None
# Tautulli script arguments:
@JonnyWong16
JonnyWong16 / recently_added_collection.py
Last active May 15, 2019
Automatically add a movie to a collection based on release date.
View recently_added_collection.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Automatically add a movie to a collection based on release date.
# Author: /u/SwiftPanda16
# Requires: plexapi
# Tautulli script trigger:
# * Notify on recently added
# Tautulli script conditions:
# * Filter which media to add to collection.
@JonnyWong16
JonnyWong16 / hide_episode_spoilers.py
Last active Jul 2, 2021
Automatically change episode artwork in Plex to hide spoilers.
View hide_episode_spoilers.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Automatically change episode artwork in Plex to hide spoilers.
# Author: /u/SwiftPanda16
# Requires: plexapi, requests
# Tautulli script trigger:
# * Notify on recently added
# * Notify on watched (optional - to remove the artwork after being watched)
# Tautulli script conditions:
@JonnyWong16
JonnyWong16 / mark_multiepisode_watched.py
Last active May 7, 2019
Automatically mark a multi-episode file as watched in Plex.
View mark_multiepisode_watched.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Automatically mark a multi-episode file as watched in Plex.
# Author: /u/SwiftPanda16
# Requires: plexapi
# Tautulli script trigger:
# * Notify on watched
# Tautulli script conditions:
# * Condition {1}:
@JonnyWong16
JonnyWong16 / rename_seasons.py
Last active Jan 20, 2021
Rename season title for TV shows on Plex.
View rename_seasons.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Rename season title for TV shows on Plex.
# Author: /u/SwiftPanda16
# Requires: plexapi
from plexapi.server import PlexServer