Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Bastien Bron authored and Bastien Bron committed Sep 21, 2023
1 parent a049bc9 commit da6663c
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion machineatubes/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def playtube():
'''
print("received tube " + str(request.get_json(force=True)))
try:
json_file = Path(__file__).parent / ".." / "songs_json" / ("%s_%s.json" % ( time.time(), request.json["name"] ))
json_file = Path(__file__).parent / ".." / "songs_json" / ("%s_%s.json" % ( request.json["numero"], request.json["name"] ))
with open(json_file, "w") as fp:
json.dump(request.json, fp)
machine.load_tube(request.json)
Expand Down
12 changes: 5 additions & 7 deletions machineatubes/tube.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,27 +268,25 @@ def get_intro_video(self, id):
try:
retry = 10
while retry > 0:
print("getting d-id %s" % url)
time.sleep(3)
print("trying d-id %s" % url)
time.sleep(10)
response = requests.get(url, headers=headers)

pprint.pprint(response.json(), indent=4)

response = response.json()

if response.get("result_url"):
print("result ok from d-id !")
video_url = response.get("result_url")
response = requests.get(video_url)
pprint.pprint(response.__dict__, indent=4)
#pprint.pprint(response.__dict__, indent=4)
if response.status_code == 200:
print("result ok from d-id !")
self.infos["intro_video_url"] = video_url

if Tube.playing is False:
Tube.window.evaluate_js('loaded()')
break

print("retry")
print("retrying... %s" % retry)
retry -= 1

except Exception as e:
Expand Down
6 changes: 5 additions & 1 deletion notez.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,8 @@
- revoir cadxrage video
- OK enlever double guillemet dans les paroles
- OK update dossier videos
- BPM > STYLE > 1/2 > PARTIE
- BPM > STYLE > 1/2 > PARTIE

- refresh Page
- randomiser preset synthös
- revoir la fin
Binary file modified ui/assets/img/loading.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion ui/machine.html
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@
<div class="sleep"><img src="assets/img/logoinfos.png"></div>
<div class="loading"><img src="assets/img/loading.gif"></div>
<div class="jingle"><img src="assets/img/intro_landscape.gif"></div>
<div id="paroles">Dans ce mone informatique, une énigme ce dessine, Dans l'informatique</div>
<div id="paroles"></div>
</div>
<div class="screen vertical" id="infos" >
<div class="sleep"><img src="assets/img/logoinfos.png"></div>
Expand Down

0 comments on commit da6663c

Please sign in to comment.