main.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:YoutubeTV 作者: dude56987 项目源码 文件源码
def removeChannel(self,channelUsername):
        '''
        Remove channel with username channelUsername.

        :return None
        '''
        # check if channel exists in channels
        if channelUsername in self.cache.names:
            # remove the channel from the cache
            self.cache.deleteValue(channelUsername)
            # if channel has playlists in cache
            if channelUsername in self.playlistCache.names:
                # delete the playlists for the channel
                self.playlistCache.deleteValue(channelUsername)
            # delte the channel timer
            #del self.timer[channelUsername]
            self.timer.deleteValue(channelUsername)
            # delete the channel playlist timers
            #for timer in self.timer.keys():
            killArray=[]
            for timer in self.timer.names:
                if channelUsername+':' in timer:
                    killArray.append(timer)
                    #del self.timer[timer]
            for item in killArray:
                self.timer.deleteValue(item)
        # save the changes to the data
        xbmc.executebuiltin('container.Update('+_url+',replace)')
        popup('YoutubeTV','Channel '+channelUsername+' removed')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号