Example #1
0
 def items(self):
     args = {"volume": player.volume() * 100, "repeat": 0, "random": int(player.random()), "xfade": 0}
     status = player.status()
     if status == "play":
         return self.helper_status_play(
             elapsedTime=player.timePosition(),
             durationTime=player.timeDuration(),
             playlistSongNumber=player.getCurrentIdx(),
             playlistSongId=generateId(player[player.getCurrentIdx()]),
             **args
         )
     elif status == "pause":
         return self.helper_status_pause(
             elapsedTime=player.timePosition(),
             durationTime=player.timeDuration(),
             playlistSongNumber=player.getCurrentIdx(),
             playlistSongId=generateId(player[player.getCurrentIdx()]),
             **args
         )
     elif status == "stop":
         return self.helper_status_stop(**args)
Example #2
0
 def handle_args(self, volume):
     return player.volume(float(volume) / 100)