Changes to Aria
This commit is contained in:
		
							parent
							
								
									705a2aaaa7
								
							
						
					
					
						commit
						2dfb5381ae
					
				
					 1 changed files with 5 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -337,19 +337,19 @@ class MediaWidget(base.InLoopPollText):
 | 
			
		|||
            if data['playing'] and data['muted']:
 | 
			
		||||
                self.custom_player_data['firefox']['showing'] = True
 | 
			
		||||
                self.custom_player_data['firefox']['state'] = MediaWidget.Status.PAUSED
 | 
			
		||||
                self.custom_player_data['firefox']['title'] = data['title']
 | 
			
		||||
                self.custom_player_data['firefox']['title'] = data['title'][:50]
 | 
			
		||||
            elif data['playing'] and not data['muted']:
 | 
			
		||||
                self.custom_player_data['firefox']['showing'] = True
 | 
			
		||||
                self.custom_player_data['firefox']['state'] = MediaWidget.Status.PLAYING
 | 
			
		||||
                self.custom_player_data['firefox']['title'] = data['title']
 | 
			
		||||
                self.custom_player_data['firefox']['title'] = data['title'][:50]
 | 
			
		||||
            elif not data['playing'] and data['muted']:
 | 
			
		||||
                self.custom_player_data['firefox']['showing'] = True
 | 
			
		||||
                self.custom_player_data['firefox']['state'] = MediaWidget.Status.STOPPED
 | 
			
		||||
                self.custom_player_data['firefox']['title'] = data['title']
 | 
			
		||||
                self.custom_player_data['firefox']['title'] = data['title'][:50]
 | 
			
		||||
            elif not data['playing'] and not data['muted']:
 | 
			
		||||
                self.custom_player_data['firefox']['showing'] = False
 | 
			
		||||
                self.custom_player_data['firefox']['state'] = MediaWidget.Status.OFFLINE
 | 
			
		||||
                self.custom_player_data['firefox']['title'] = data['title']
 | 
			
		||||
                self.custom_player_data['firefox']['title'] = data['title'][:50]
 | 
			
		||||
 | 
			
		||||
    def _get_players(self):
 | 
			
		||||
        players = []
 | 
			
		||||
| 
						 | 
				
			
			@ -399,7 +399,7 @@ class MediaWidget(base.InLoopPollText):
 | 
			
		|||
                    text = "Unknown"
 | 
			
		||||
                    if cmd_result in ["Playing", "Paused"]:
 | 
			
		||||
                        artist = self.call_process(['playerctl', '-p', player, 'metadata', 'artist']).strip()
 | 
			
		||||
                        title = self.call_process(['playerctl', '-p', player, 'metadata', 'title']).strip()
 | 
			
		||||
                        title = self.call_process(['playerctl', '-p', player, 'metadata', 'title']).strip()[:50]
 | 
			
		||||
 | 
			
		||||
                        if artist and title:
 | 
			
		||||
                            text = "{} - {}".format(artist, title)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue