almost-stable-V2.0

This commit is contained in:
janis
2022-10-30 19:05:49 +01:00
parent 14d9620ab8
commit 52a15342e5
16 changed files with 185 additions and 34 deletions

View File

@@ -29,7 +29,7 @@ class Com:
self.x = requests.get(f"{url}/songmaxlength")
except Exception:
return 100
return int(self.x.text)
return float(self.x.text)
def getupcomingsongs(self, url):
try:
@@ -43,7 +43,7 @@ class Com:
self.x = requests.get(f"{url}/playbackpos")
except Exception:
return 0
return int(self.x.text)
return float(self.x.text)
def checkiffullscreen(self, url):
try:
@@ -52,5 +52,15 @@ class Com:
return False
if self.x.text == "True":
return True
else:
return False
def checkgo(self, url):
try:
self.x = requests.get(f"{url}/isrunning")
except Exception:
return False
if self.x.text == "True":
return True
else:
return False

View File

@@ -72,6 +72,11 @@ class ShowcaseScreen(MDScreen):
self.ids.progressbars.value = self.__songdisplay
self.ids.current_song.text = self.__current
self.ids.upcoming_songs.text = self.__upcoming
if comHandler.checkgo(address):
pass
else:
Window.fullscreen = False
screen_manager.current = "Login"
class MusicPlayerShowcaseScreen(MDApp):