Skip to content
Snippets Groups Projects
Commit df0b01cb authored by BuildTools's avatar BuildTools
Browse files

amélioration de download_server

parent 7092ed31
No related branches found
No related tags found
No related merge requests found
...@@ -11,8 +11,8 @@ from credentials import KEY ...@@ -11,8 +11,8 @@ from credentials import KEY
#commande test : "yt-dlp -f 'ba' -x --audio-format mp3 https://www.youtube.com/watch?v=zA2YBT9z6pA -o '%(id)s.mp3' " #commande test : "yt-dlp -f 'ba' -x --audio-format mp3 https://www.youtube.com/watch?v=zA2YBT9z6pA -o '%(id)s.mp3' "
caracteres = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_=+\';,:!?$%&#~<> " caracteres = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_=+\';!?$%&#~<> "
remplacements = {"(":"-" , ")": "-" , "\"" : "\'","":"e","":"a","":"e","":"u","":"e","":"a","":"o","":"i","":"u","":"U","/":" "} remplacements = {"(":"-" , ")": "-" , "\"" : "\'","":"e","":"a","":"e","":"u","":"e","":"a","":"o","":"o" ,"":"o","":"i","":"u","":"U","/":" "}
def replace(caract,remplacements) : def replace(caract,remplacements) :
if caract in remplacements.keys() : if caract in remplacements.keys() :
...@@ -81,7 +81,7 @@ while True : ...@@ -81,7 +81,7 @@ while True :
for playlist in data : for playlist in data :
if playlist not in os.listdir("musics"): if playlist not in os.listdir("musics"):
print("La playlist " + playlist + " n\'est pas dans le rpertoire" ) print("La playlist " + playlist + " n\'est pas dans le repertoire" )
os.chdir("musics") os.chdir("musics")
os.mkdir(playlist) os.mkdir(playlist)
......
#!/bin/bash #!/bin/bash
screen -S music_downloading python download_server.py ### BEGIN INIT INFO
# Provides: bleezrstart
# Required-Start: $all
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Begins bleezr server and service
### END INIT INFO
screen -dmS music_downloading python3 /home/pi/bleezr/bleezr/download_server.py
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment