Skip to content

Instantly share code, notes, and snippets.

@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 ###
@wrboyce
wrboyce / random_preroll.py
Created March 13, 2017 17:58
Plex Random Pre-Rolls
#!/usr/bin/env python
import random
import sys
import urllib
import requests
from lxml import etree
@Hellowlol
Hellowlol / aired_today_playlist.py
Last active March 4, 2017 15:20 — forked from blacktwin/aired_today_playlist.py
Create a Plex Playlist with what was aired on this today's month-day, sort by oldest first, using PlexAPI
"""
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.
"""
# Untested requires plexapi 3.0.0.
from plexapi.server import PlexServer
import requests
@JonnyWong16
JonnyWong16 / create_plex_library.py
Last active June 8, 2017 14:04
Create a Plex movies library using the API
import platform
import requests
from uuid import getnode
'''
Available options to create a movie library:
agent: com.plexapp.agents.imdb # Freebase
com.plexapp.agents.themoviedb # The Movie Database
com.plexapp.agents.none # Personal Media
@revolunet
revolunet / backup.py
Last active October 14, 2022 22:12
download your google drive files with python
# -*- encoding: UTF-8 -*-
import os
import httplib2
# pip install --upgrade google-api-python-client
from oauth2client.file import Storage
from apiclient.discovery import build
from oauth2client.client import OAuth2WebServerFlow