elibroftw / music-caster

Music Caster is a modern music player with the ability to cast audio files, system audio, and URLs to Google Chromecasts, Google Home/Nest Minis, etc.
https://elijahlopez.ca/music-caster/
Other
149 stars 17 forks source link

high frequency of connections to google dns / 8.8.8.8 #23

Closed onegrasshopper closed 3 years ago

onegrasshopper commented 3 years ago

Traffic to 8.8.8.8 is constantly generated. Especially when the playing window is open. Looks like get_track_position() calls internet_available(). This seems unnecessary? As well as the other internet_available calls for stop/pause, etc. Those calls to stop/pause/etc could just be in a try block? Since a temporary glitch in access to 8.8.8.8 should have no bearing on the devices on the subnet?

elibroftw commented 3 years ago

I think I did that as a quick fix. Before if there was no internet, the whole program would hang, it wouldn't just crash but I'll see if it's possible to not try to access 8.8.8.8.

Do you know how to simulate beign connected to the router without internet access? I'll have to figure that out as well.

elibroftw commented 3 years ago

I removed the internet check and the program doesn't seem to hang without any internet.