almost-stable-V2.0
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -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
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user