Skip to content

Instantly share code, notes, and snippets.

View pgaras's full-sized avatar
🏠
Working from home

Peter Garas pgaras

🏠
Working from home
View GitHub Profile
# USE AT YOUR OWN RISK!!!!
#
# Requires eyed3 and plexapi libraries, written & tested in python 3.9
from plexapi.myplex import MyPlexAccount
import eyed3
LIB = 'INSERT LIBRARY NAME'
# Counters
insync = 0
@danni
danni / fields.py
Created March 8, 2016 08:52
Multi Choice Django Array Field
from django import forms
from django.contrib.postgres.fields import ArrayField
class ChoiceArrayField(ArrayField):
"""
A field that allows us to store an array of choices.
Uses Django 1.9's postgres ArrayField
and a MultipleChoiceField for its formfield.