Skip to content

Instantly share code, notes, and snippets.

@JonnyWong16
JonnyWong16 / rename_seasons.py
Last active August 28, 2023 17:32
Rename season title for TV shows on Plex.
#!/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 / rating_keys.txt
Last active December 17, 2018 00:25
Simulates shuffling of a Plex playlist to a CSV file
747
748
749
750
751
752
753
754
755
756
@JonnyWong16
JonnyWong16 / update_history_grouping.py
Last active October 17, 2018 19:44
Updates history grouping in the Tautulli database with the new logic on v2.1.12.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Updates history grouping in the Tautulli database with the new logic on v2.1.12.
# Author: /u/SwiftPanda16
# Requires: requests
import requests
### EDIT SETTINGS ###
@JonnyWong16
JonnyWong16 / plex_discord_rpc.py
Last active May 26, 2023 03:01
Discord Rich Presence for Plex
import asyncio
import json
import os
import struct
import sys
import time
from plexapi.myplex import MyPlexAccount
### EDIT SETTINGS ###
@JonnyWong16
JonnyWong16 / kill_stream.py
Created January 15, 2018 22:44
Kill a Plex stream
import requests
import sys
PLEXPY_URL = 'http://localhost:8181'
APIKEY = 'xxxxxxxxxx'
MESSAGE = 'Your stream was terminated for "reasons"'
session_id = sys.argv[1]
payload = {'apikey': APIKEY,
@JonnyWong16
JonnyWong16 / update_plex_movie_ratings.py
Last active December 17, 2022 17:32
Update Plex movie ratings from IMDB or Rotten Tomatoes
# -*- coding: utf-8 -*-
#------------------------------------------------------------------------------
#
# Plex movie ratings script by /u/SwiftPanda16
#
# *** Use at your own risk! ***
# *** I am not responsible for damages to your Plex server or libraries. ***
#
#------------------------------------------------------------------------------
@JonnyWong16
JonnyWong16 / update_all_metadata.py
Last active March 19, 2024 17:31
Updates all metadata in the Tautulli database after moving Plex libraries.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Updates all metadata in the Tautulli database after moving Plex libraries.
# Author: /u/SwiftPanda16
# Requires: plexapi, requests
from plexapi.server import PlexServer
import requests
@JonnyWong16
JonnyWong16 / save_artist_jpg.py
Created July 16, 2017 00:33
Saves artist.jpg to the Artist folder.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Saves artist.jpg to the Artist folder.
# Author: /u/SwiftPanda16
# Requires: plexapi, requests
from plexapi.server import PlexServer
import os
import requests
@JonnyWong16
JonnyWong16 / remove_movie_collections.py
Last active October 20, 2023 22:34
Removes ALL collections from ALL movies.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Removes ALL collections from ALL movies.
# Author: /u/SwiftPanda16
# Requires: plexapi
from plexapi.server import PlexServer
### EDIT SETTINGS ###
@JonnyWong16
JonnyWong16 / add_label_recently_added.py
Last active May 3, 2024 07:09
Automatically add a label to recently added items in your Plex library
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Automatically add a label to recently added items in your Plex library
# Author: /u/SwiftPanda16
# Requires: requests
# Tautulli script trigger:
# * Notify on recently added
# Tautulli script conditions:
# * Filter which media to add labels to using conditions. Examples: