Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Commit

Permalink
Fix for chromecast notification when using ssl
Browse files Browse the repository at this point in the history
  • Loading branch information
DewGew authored Jul 27, 2023
1 parent d784f70 commit e8f22b3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions smarthome.py
Original file line number Diff line number Diff line change
Expand Up @@ -1197,8 +1197,11 @@ def play(self, s): #command "/play?soundfile.mp3@volume
filename = scomm
mp3_filename = FILE_DIR + "/sound/" + filename
mp3 = Path(mp3_filename)
uses_ssl = ('use_ssl' in configuration and configuration['use_ssl'] is True)
if mp3.is_file():
mp3_url = "http://" + IP_Address + ":" + IP_Port + "/sound?" + filename
if uses_ssl:
mp3_url = mp3_url.replace("http", "https")
#make a query request for Get /sound
rstatus, rmessage = SmartHomeReqHandler.playmedia(mp3_url,'audio/mp3','IDLE', 20)
else:
Expand Down

0 comments on commit e8f22b3

Please sign in to comment.