コード例 #1
0
ファイル: PlayList.py プロジェクト: iiccn/kwplayer
 def _failed_to_download(song_path, status):
     self.cache_enabled = False
     if status == 'URLError':
         Widget.network_error(self.app.window,
                 _('Failed to cache song'))
     elif status == 'FileNotFoundError':
         Widgets.filesystem_error(self.app.window, song_path)
コード例 #2
0
ファイル: PlayList.py プロジェクト: dissipator/kwplayer
        def _on_can_play(widget, song_path, status, error=None):
            if status == 'OK':
                return

            # stop cache service when error occurs
            self.cache_enabled = False
            if status == 'URLError':
                Widgets.network_error(self.app.window,
                        _('Failed to cache song'))
            elif status == 'FileNotFoundError':
                Widgets.filesystem_error(self.app.window, song_path)
コード例 #3
0
ファイル: PlayList.py プロジェクト: baiyunping333/kwplayer
        def _on_can_play(widget, song_path, status, error=None):
            if status == 'OK':
                return

            # stop cache service when error occurs
            self.cache_enabled = False
            if status == 'URLError':
                Widgets.network_error(
                        self.app.window, _('Failed to cache song'))
            elif status == 'FileNotFoundError':
                Widgets.filesystem_error(self.app.window, song_path)
コード例 #4
0
ファイル: Player.py プロジェクト: iiccn/kwplayer
 def failed_to_download(self, song_path, status):
     self.pause_player()
     
     if status == 'FileNotFoundError':
         Widgets.filesystem_error(self.app.window, song_path)
     elif status == 'URLError':
         if self.play_type == PlayType.MV:
             msg = _('Failed to download MV')
         elif self.play_type in (PlayType.SONG, PlayType.RADIO):
             msg = _('Failed to download song')
         Widgets.network_error(self.app.window, msg)
コード例 #5
0
    def failed_to_download(self, song_path, status):
        self.stop_player_cb()

        if status == 'FileNotFoundError':
            Widgets.filesystem_error(self.app.window, song_path)
        elif status == 'URLError':
            if self.play_type == PlayType.MV:
                msg = _('Failed to download MV')
            elif self.play_type in (PlayType.SONG, PlayType.RADIO):
                msg = _('Failed to download song')
            #Widgets.network_error(self.app.window, msg)
            print('Error:', msg)
            self.load_next_cb()
コード例 #6
0
 def on_disk_error():
     logger.warn('Playlist.on_disk_error: %s, %s' %
                 (song_path, error))
     self.stop_caching_daemon()
     Widgets.filesystem_error(self.app.window, song_path)
コード例 #7
0
ファイル: PlayList.py プロジェクト: 958887233/kwplayer
 def on_disk_error():
     logger.warn('Playlist.on_disk_error: %s, %s' %
                 (song_path, error))
     self.stop_caching_daemon()
     Widgets.filesystem_error(self.app.window, song_path)