@@ -990,11 +990,10 @@ def updateStatus(self, *args):
990990 self .volume = '' .join (c for c in sp [- 1 ].split ()[0 ] if c .isdigit ())
991991
992992 self_show_volume = self .show_volume
993- with recording_lock :
994- self_oldUserInput_Title = self .oldUserInput ['Title' ]
995- # IMPORTANT: do this here, so that vlc actual_volume
996- # gets updated in _format_volume_string
997- string_to_show = self ._format_volume_string (subsystemOut ) + self ._format_title_string (self .oldUserInput ['Title' ])
993+ self_oldUserInput_Title = self .oldUserInput ['Title' ]
994+ # IMPORTANT: do this here, so that vlc actual_volume
995+ # gets updated in _format_volume_string
996+ string_to_show = self ._format_volume_string (subsystemOut ) + self ._format_title_string (self .oldUserInput ['Title' ])
998997
999998 if self_show_volume and self_oldUserInput_Title :
1000999 self .outputStream .write (msg_id = STATES .VOLUME , msg = string_to_show , counter = '' )
@@ -3923,7 +3922,7 @@ def get_volume(self, repeat=False):
39233922 sleep (1 )
39243923 self .get_volume (repeat = True )
39253924 self .actual_volume = self .volume
3926- self .volume = int (100 * self .actual_volume / self .max_volume )
3925+ self .volume = int (100 * int ( self .actual_volume ) / int ( self .max_volume ) )
39273926 # logger.error('Final')
39283927 # logger.error('self.actual_volume = {}'.format(self.actual_volume))
39293928 # logger.error('self.volume = {}'.format(self.volume))
@@ -3996,9 +3995,7 @@ def _win_show_vlc_volume(self):
39963995 pvol = int (100 * self .actual_volume / self .max_volume )
39973996 if pvol > 0 :
39983997 avol = '[' + M_STRINGS ['vol_' ] + f'{ pvol } %] '
3999- with recording_lock :
4000- title = self .oldUserInput ['Title' ]
4001- if self .show_volume and title :
3998+ if self .show_volume and self .oldUserInput ['Title' ]:
40023999 self .outputStream .write (msg_id = STATES .VOLUME , msg = avol + self .oldUserInput ['Title' ], counter = '' )
40034000 self .threadUpdateTitle ()
40044001
0 commit comments