Example #1
0
def to_kodi_movie_item(item):
    return {
        'label': utils.safe_decode(item.title),
        'path': plugin.url_for('play_movie', url=item.player_url),
        'thumbnail': swefilm.BASE_URL + item.poster,
        'is_playable': True
    }
Example #2
0
def to_kodi_movie_item(item):
    return {
        'label': utils.safe_decode(item.title),
        'path': plugin.url_for('play_movie', url=item.player_url),
        'thumbnail': swefilm.BASE_URL + item.poster,
        'is_playable': True
    }
Example #3
0
    def getResult(self, waitTime=5000):
        if not self.getResult_flag:
            print 'upload audio first'
            return None

        resultData = ''
        while True:
            err, rsltStaus, rsltStr = core.qisrGetResult(self.sessid, waitTime)
            print err, rsltStaus
            if err != 0: # get result err
                print "qisr get result error, error no is %s"%err
                return resultData
            if rsltStaus == 1:
                print 'get result nomatch'
            if rsltStr:
                resultData += rsltStr
            if rsltStaus == 5:
                break
            time.sleep(0.5)

        return safe_decode(resultData)
Example #4
0
def to_kodi_serie_item(item):
    return {
        'label': utils.safe_decode(item.title),
        'path': plugin.url_for('list_episodes', url=item.player_url),
        'thumbnail': swefilm.BASE_URL + item.poster
    }
Example #5
0
fishinfo = req_safe(gameService, "getCatchFishUserInfoAMF", uid)

if newmsg:
    print u"有 %d 条新信息." % newmsg.get('new_msg_num', 0)
if userinfo:
    # print userinfo
    print_userinfo(userinfo)
if (not main_level) or (main_level not in [2,3]):
    print u"自动根据等级设置抓鱼区域."
    main_level = fishinfo.get('tempo', 2)

# 好友 #############################
print u"= 好友信息 ="
friends = req_safe(spacesService, "getFriendListAMF", uid) # or refreshFriendListAMF
for f in friends.get('friend_list', []):
    print u"%s 等级%d Id#%d" % (safe_decode(f['nickname']), f['almanac_level'], f['id'])
print u"共 %d 好友" % len( friends.get('friend_list', []))

#membersService.getUserInfoByXiaoneiIdAMF(uid,  xxxxxxxxx)
#spacesService.getDynamicMessageListAMF(uid, 1)


# 收鱼部分 ########################################
print u"= 潜艇鱼 ="
def pet_dispath():
    global petst
    petst = req_safe(gameService, "getPetStatusAMF", uid, uid)
    if petst:
        if petst['status']== u'c':
            print u"抓鱼剩余时间 %d 秒." % (petst['rest_time'] or 0)
            time_line[now()+(petst['rest_time'] or 1000)] = ('HARVEST', ())
Example #6
0
def to_kodi_serie_item(item):
    return {
        'label': utils.safe_decode(item.title),
        'path': plugin.url_for('list_episodes', url=item.player_url),
        'thumbnail': swefilm.BASE_URL + item.poster
    }