#!/usr/bin/python3 # Simple PartyMode Web Console # Limited interface for normal party goers # Copyright (c) 2015,2016 Clinton Ebadi # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # limit playlist view to next five import cgi, cgitb from datetime import datetime import hashlib import numbers import os import random import subprocess import sys from kodijson import Kodi from yattag import Doc import partyparty from partyparty import Song, SongControls, Search, Playlist, PartyManager cgitb.enable() print ("content-type: text/html; charset=utf-8\n\n") sys.stdout.flush () print ("\npartyparty beb") print (partyparty.css ()) print ('

Upload A Song | Add From YouTube | home | browse

') class NormalsPlaylist (Playlist): def get_playlist (self): return Playlist.get_playlist (self)#[0:10] class NormalsManager (PartyManager): DEFAULT_QUEUE_DIVISOR = 1 xbmc = partyparty.connect (Kodi ("http://localhost:8080/jsonrpc")) manager = NormalsManager (cgi.FieldStorage ()) manager.process () playlist = NormalsPlaylist () print ('') Search ().show_quick_search (thereal=True) print ('

What\'s Playing

') print (playlist.show (controls = [])) print ('')