from os import environ
environ['PYGAME_HIDE_SUPPORT_PROMPT'] = '1'
import eel
from pygame import mixer
import time
mixer.init()
eel.init('web')
paused = False
queue = False
next_song = None
@eel.expose
def play_music(x):
global paused, queue
if paused:
mixer.music.unpause()
paused = False
elif queue:
mixer.music.load(next_song)
mixer.music.play()
queue = False
else:
mixer.music.load(x)
mixer.music.play()
@eel.expose
def queue_music(x):
global queue, next_song
next_song = x
queue = True
print("Next Music: " + x)
@eel.expose
def stop_music():
print("Music Stopped")
mixer.music.stop()
@eel.expose
def pause_music():
global paused
paused = True
mixer.music.pause()
eel.start('main.html', size=(500, 500))
CREATE TABLE "shop" (
"id" INT,
"type" TEXT,
"name" TEXT,
"cost" INT)
CREATE TABLE "users" (
"id" INT,
"nickname" TEXT,
"mention" TEXT,
"money" INT,
"rep_rank" TEXT,
"inventory" TEXT,
"lvl" INT,
"xp" INT)