simplified getting file type

This commit is contained in:
Martin Wagner 2020-05-25 21:38:26 +02:00
parent 4245d49e95
commit 343a1d23dd

View File

@ -2807,8 +2807,8 @@ class AudioType(Gtk.Button):
def refresh(self, *args):
try:
self.enable()
file_type=self.client.currentsong()["file"].split('.')[-1]
status=self.client.status()
file_type=self.client.playlistinfo(status["song"])[0]["file"].split('.')[-1]
freq, res, chan=status["audio"].split(':')
freq=str(float(freq)/1000)
brate=status["bitrate"]