played around with cover image + deleted old files
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
40
|
||||
42
|
||||
Tennessee Waltz - New 101 Strings Orchestra | Slow Walz (Langsam),Morning has broken - Cat Stevens | Walzer (Mittel),Magia - Alvaro Soler | Flashmob (Mittel),Say So - Doja Cat | Discofox (Langsam),Save Your Tears (Remix) - The Weeknd & Ariana Grande | Discofox (Langsam),Shivers - Ed Sheeran | Jive/ Rocknroll (Mittel),I feel good - Ray Charles | Jive/Rocknroll (Mittel),Muevelo - Rey Ruiz | Cha cha cha (Mittel),Suelta la cintura - Ruben leon | Cha cha cha (Mittel),Como Volver a Ser Feliz - Luis Enrique | Salsa (Mittel),Mas que nada - black eyed peas | Salsa/Discofox (Mittel),Moon River - Henry Mancini | Slow Walz (Langsam),Dancing Queen - ABBA | Discofox (Langsam),Don't Call Me Up - Mabel | Discofox (Mittel),Magia - Alvaro Soler | Flashmob (Mittel),Lets have a Party - Wanda Jackson | Jive (mittel),Crazy Little Thing Called Love - Queen | Jive / Rocknroll (Schnell),El Diablo Anda Suelto - Rey Ruiz | Cha cha cha (Mittel),Lets get loud - Jennifer Lopez | Cha cha cha (Schnell),Enamorame - Somos del Barrio | Salsa (Mittel),Something Stupid (feat. Reese Witherspoon) - Michael Bublé | Rumba/cha cha cha (Langsam),When a man loves a woman - Percy Sledge | (Langsam),Scharlachrot - Patent Ochsner | Walzer (Langsam),Ily (i love you baby) [feat. Emilee] - Surf Mesa | Discofox (Mittel),Like a sex machine - James Brown | Discofox (Mittel),Uptown Funk (feat. Bruno Mars) - Discofox | Discofox (Schnell),Tutti Frutti - Little Richard | Jive / Rocknroll (Mittel),Jailhouse Rock - Elvis Presley | Jive / Rocknroll (Schnell),Are you lonesome - Elvis Presley | Slow Walz (Langsam),Ay Mujer - Rey Ruiz | Cha cha cha (Mittel),Rico Vacilon - Pedro Garcia & His Del Prado Orchestra | Cha cha cha (Mittel),Jeepers creepers - Benny Goodmann | Foxtrott (Mittel),An der schönen blauen Donau - New 101 Strings Orchestra | Wiener Walzer (Schnell),The Last Waltz - Engelbert Humperdinck | Walzer (Mittel),Stand by me - Sam Brown | Cha cha cha (Lansam),Stayin' Alive - Bee Gees | Discofox (Mittel),Easy On Me - Adele | (Langsam),Magia - Alvaro Soler | Flashmob (Mittel),Friday (feat. Mufasa & Hypeman) [Dopamine Re-Edit] - Riton & Nightcrawlers | Party (Mittel),YMCA - Village People | Party (Mittel),Cotton eyed Joe (Hennustall zermatt mix) - Rednex | Party (Mittel),Gangnam style - PSY | Party (Mittel),Take On Me - a-ha | Jive (Schnell),Rock Around the Clock - Bill Haley & His Comets | Jive / Rocknroll (Schnell),Satisfaction - Rolling Stones | Party (Mittel),"Un, dos, tres - Ricky Martin | Party (Mittel)",Party Rock anthem - LFMBQ | Party (Mittel),I don't care - Icona Pop | Party (Mittel),Love tonight - Shouse & David Guetta | Party (Mittel),Insomnia - Faithless | Party (Mittel),Angels - Robbie Williams | Slow (Langsam),Nothing compares to you - Sinead O'Connor | Slow (Langsam)
|
||||
193.99110412597656
|
||||
219.21958923339844
|
||||
|
||||
|
@@ -1,55 +0,0 @@
|
||||
from code import interact
|
||||
from http.server import HTTPServer, BaseHTTPRequestHandler
|
||||
import cgi
|
||||
import os
|
||||
|
||||
|
||||
class MusicPlayerServer(BaseHTTPRequestHandler):
|
||||
def _set_headers(self):
|
||||
self.send_response(200)
|
||||
self.send_header('Content-type', 'text/html')
|
||||
self.end_headers()
|
||||
|
||||
def do_GET(self):
|
||||
self._set_headers()
|
||||
if self.path == '/reloadstyling':
|
||||
pass
|
||||
elif self.path == '/connect':
|
||||
print("connection being established")
|
||||
global details
|
||||
details.value = 1
|
||||
else:
|
||||
try:
|
||||
self.opened_file = open(f".{self.path}").read()
|
||||
self.wfile.write(bytes(self.opened_file, 'utf-8'))
|
||||
except Exception as e:
|
||||
print("There was an error in opening the specified file: 404")
|
||||
|
||||
def do_POST(self):
|
||||
self._set_headers()
|
||||
self.returnsPOST = cgi.FieldStorage(
|
||||
fp=self.rfile,
|
||||
headers=self.headers,
|
||||
environ={ 'REQUEST_METHOD' : 'POST'}
|
||||
)
|
||||
if self.path == '/publishtime':
|
||||
global playtime
|
||||
playtime.value = 1
|
||||
elif self.path == '/publishsonginfo':
|
||||
global com
|
||||
print(self.returnsPOST.value[0].value)
|
||||
if self.returnsPOST.value[0].name == "songinfos":
|
||||
com.value = self.returnsPOST.value[0].value
|
||||
|
||||
|
||||
def run(interact, instructions, pos, server_class=HTTPServer, handler_class=MusicPlayerServer, port=9999):
|
||||
server_address = ('', port)
|
||||
global details
|
||||
details = interact
|
||||
global com
|
||||
com = instructions
|
||||
global playtime
|
||||
playtime = pos
|
||||
httpd = server_class(server_address, handler_class)
|
||||
print(f"Server started on {port}")
|
||||
httpd.serve_forever()
|
||||
@@ -1,39 +0,0 @@
|
||||
import handlers.server
|
||||
import handlers.server_translator as st
|
||||
import multiprocessing as mp
|
||||
import ctypes
|
||||
|
||||
servert = st.ServerTranslator()
|
||||
|
||||
class ServerHandler:
|
||||
def __init__(self):
|
||||
self.details = mp.Manager().Value('i', 0)
|
||||
self.com = mp.Manager().Value(ctypes.c_wchar_p, "Test")
|
||||
self.playbackpos = mp.Manager().Value('i', 0)
|
||||
|
||||
def start_server(self):
|
||||
print("starting server")
|
||||
try:
|
||||
if self.mpserver.is_alive():
|
||||
pass
|
||||
else:
|
||||
self.mpserver = mp.Process(name="runserver", target=handlers.server.run, args=(self.details, self.com, self.playbackpos ))
|
||||
self.mpserver.start()
|
||||
except AttributeError as e:
|
||||
self.mpserver = mp.Process(name="runserver", target=handlers.server.run, args=(self.details, self.com, self.playbackpos, ))
|
||||
self.mpserver.start()
|
||||
|
||||
def stop_server(self):
|
||||
self.mpserver.kill()
|
||||
|
||||
def get_server_status(self):
|
||||
try:
|
||||
return self.mpserver.is_alive()
|
||||
except AttributeError:
|
||||
return False
|
||||
|
||||
def get_connection_status(self):
|
||||
return servert.connection(self.details)
|
||||
|
||||
def getData(self):
|
||||
return self.com.value
|
||||
@@ -1,13 +0,0 @@
|
||||
from tkinter.tix import Tree
|
||||
|
||||
|
||||
class ServerTranslator:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def connection(self, details):
|
||||
print(details.value)
|
||||
if details.value == 1:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
15
testfile.py
15
testfile.py
@@ -1,5 +1,12 @@
|
||||
import requests
|
||||
from mutagen.mp3 import MP3
|
||||
from mutagen.id3 import ID3, APIC, error
|
||||
from PIL import Image
|
||||
from io import BytesIO
|
||||
|
||||
x = requests.post('http://localhost:8000/testrequest', {"Test":"test"})
|
||||
|
||||
print(x.text)
|
||||
songpath = '/mnt/storage/SORTED/Music/KB/01 Tennessee Waltz.mp3'
|
||||
audio = MP3(songpath)
|
||||
tags = ID3(songpath)
|
||||
print(tags.pprint())
|
||||
pic = tags.get("APIC:").data
|
||||
img = Image.open(BytesIO(pic))
|
||||
img.save('./coverart.png')
|
||||
Reference in New Issue
Block a user