Skip to content

Instantly share code, notes, and snippets.

View Hellowlol's full-sized avatar

Steffen Fredriksen Hellowlol

  • Kristiansand, Norway
View GitHub Profile
@Hellowlol
Hellowlol / update_all_metadata.py
Last active August 19, 2017 21:17 — forked from JonnyWong16/update_all_metadata.py
Updates all metadata in the PlexPy database after moving Plex libraries.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Updates all metadata in the PlexPy database after moving Plex libraries.
# Author: /u/SwiftPanda16
# Requires: plexapi, requests
from plexapi.server import PlexServer
import requests
@Hellowlol
Hellowlol / collection_from_rating_keys.py
Created July 15, 2017 23:49 — forked from JonnyWong16/collection_from_rating_keys.py
Create a Plex collection from a text file list of rating keys.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Create a Plex collection from a text file list of rating keys.
# Author: /u/SwiftPanda16
# Requires: plexapi, requests
import requests
from plexapi.server import PlexServer
@Hellowlol
Hellowlol / async.py
Created April 23, 2017 01:01 — forked from hemanth/async.py
Async subprocess execution in python.
import sys
from subprocess import PIPE, Popen
from threading import Thread
try:
from Queue import Queue, Empty
except ImportError:
from queue import Queue, Empty # python 3.x
ON_POSIX = 'posix' in sys.builtin_module_names
@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
@Hellowlol
Hellowlol / simple_convert.py
Created July 13, 2016 16:22 — forked from onedr0p/simple_convert.py
A simple script to convert media files to MP4 for a better Plex experiance
import os
import sys
import time
import platform
import subprocess
import urllib2
import logging
""" Are we windoze or linux """
is_windows = any(platform.win32_ver())
@Hellowlol
Hellowlol / login.html
Created January 3, 2016 01:01
PlexPy Login Page
<%
import plexpy
from plexpy import version
%>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
import os, sys
import xbmc, xbmcaddon
import json
def log(msg):
xbmc.log('GETADDONS TEST: ' + str(msg), level=xbmc.LOGDEBUG)
if ( __name__ == "__main__" ):
installedAddons = []
installedJson = xbmc.executeJSONRPC('{ "jsonrpc": "2.0", "id": 1, "method": "Addons.GetAddons", "params": { "type": "xbmc.gameclient", "enabled": "all" } }')