{"action":"opened","issue":{"url":"https://api.github.com/repos/cosven/FeelUOwn/issues/90","labels_url":"https://api.github.com/repos/cosven/FeelUOwn/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/cosven/FeelUOwn/issues/90/comments","events_url":"https://api.github.com/repos/cosven/FeelUOwn/issues/90/events","html_url":"https://github.com/cosven/FeelUOwn/issues/90","id":128367974,"number":90,"title":"bug反馈，切换列表内的歌曲，总是调到单曲循环","user":{"login":"likeyiyy","id":5380901,"avatar_url":"https://avatars.githubusercontent.com/u/5380901?v=3","gravatar_id":"","url":"https://api.github.com/users/likeyiyy","html_url":"https://github.com/likeyiyy","followers_url":"https://api.github.com/users/likeyiyy/followers","following_url":"https://api.github.com/users/likeyiyy/following{/other_user}","gists_url":"https://api.github.com/users/likeyiyy/gists{/gist_id}","starred_url":"https://api.github.com/users/likeyiyy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/likeyiyy/subscriptions","organizations_url":"https://api.github.com/users/likeyiyy/orgs","repos_url":"https://api.github.com/users/likeyiyy/repos","events_url":"https://api.github.com/users/likeyiyy/events{/privacy}","received_events_url":"https://api.github.com/users/likeyiyy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-24T02:35:59Z","updated_at":"2016-01-24T02:35:59Z","closed_at":null,"body":"在base/player.py 77行\r\n```\r\ndef change_player_mode_to_normal(self):\r\n        self._other_mode = False\r\n        self.playback_mode = 4\r\n        self.signal_playback_mode_changed.emit(self.playback_mode)\r\n```\r\n1. 每次切换歌曲都会调用到这个函数。\r\n2.由于我当前模式是3，这时将模式设置为4，会导致FeelUOwn/feeluown/widgets/playmode_switch.py\r\n```\r\n    def _switch_mode(self):\r\n        if self._current_mode == 4:\r\n            self._current_mode = 1\r\n        elif self._current_mode == 1:\r\n            self._current_mode = 3\r\n        elif self._current_mode == 3:\r\n            self._current_mode = 4\r\n        self._set_mode()\r\n        self.player.set_play_mode(self._current_mode)\r\n\r\n    @pyqtSlot(int)\r\n    def on_mode_changed(self, mode):\r\n        LOG.info('current play mode is %d.'\r\n                 ' 1 for single in loop, 3 for loop, 4 for random' % mode)\r\n        if mode != self._current_mode:\r\n            self._current_mode = mode\r\n            self._switch_mode()\r\n```\r\n所以又会把模式切换为1，目前我是简单的把mode设置为3满足我自己的需求，稍后看怎么解决。"}}