def open(self): Device.open(self) self.notify('status', _('Opening MP3 player')) if util.directory_is_writable(self.destination): self.notify('status', _('MP3 player opened')) self.tracks_list = self.get_all_tracks() return True return False
def open(self): self.notify('status', _('Opening MP3 player')) if util.directory_is_writable(self.destination): self.notify('status', _('MP3 player opened')) if gl.config.mp3_player_use_scrobbler_log: mp3_player_mount_point=util.find_mount_point(self.destination) # If a moint point cannot be found look inside self.destination for scrobbler_log_filenames # this prevents us from os.walk()'ing the entire / filesystem if mp3_player_mount_point == '/': mp3_player_mount_point=self.destination log_location=self.find_scrobbler_log(mp3_player_mount_point) if log_location is not None and self.load_audioscrobbler_log(log_location): log('Using Audioscrobbler log data to mark tracks as played', sender=self) return True else: return False
def open(self): Device.open(self) self.notify('status', _('Opening MP3 player')) if util.directory_is_writable(self.destination): self.notify('status', _('MP3 player opened')) # build the initial tracks_list self.tracks_list = self.get_all_tracks() if self._config.mp3_player_use_scrobbler_log: mp3_player_mount_point = util.find_mount_point(self.destination) # If a moint point cannot be found look inside self.destination for scrobbler_log_filenames # this prevents us from os.walk()'ing the entire / filesystem if mp3_player_mount_point == '/': mp3_player_mount_point = self.destination log_location = self.find_scrobbler_log(mp3_player_mount_point) if log_location is not None and self.load_audioscrobbler_log(log_location): log('Using Audioscrobbler log data to mark tracks as played', sender=self) return True else: return False