當前位置: 首頁>>代碼示例>>Python>>正文


Python StorageServer.StorageServer方法代碼示例

本文整理匯總了Python中StorageServer.StorageServer方法的典型用法代碼示例。如果您正苦於以下問題:Python StorageServer.StorageServer方法的具體用法?Python StorageServer.StorageServer怎麽用?Python StorageServer.StorageServer使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在StorageServer的用法示例。


在下文中一共展示了StorageServer.StorageServer方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

# 需要導入模塊: import StorageServer [as 別名]
# 或者: from StorageServer import StorageServer [as 別名]
def __init__(self, provider, settings, addon):
        xbmcprovider.XBMCMultiResolverContentProvider.__init__(
            self, provider, settings, addon)
        provider.parent = self
        self.dialog = xbmcgui.DialogProgress()
        try:
            import StorageServer
            self.cache = StorageServer.StorageServer("Downloader")
        except:
            import storageserverdummy as StorageServer
            self.cache = StorageServer.StorageServer("Downloader") 
開發者ID:kodi-czsk,項目名稱:plugin.video.sosac.ph,代碼行數:13,代碼來源:sutils.py

示例2: __init__

# 需要導入模塊: import StorageServer [as 別名]
# 或者: from StorageServer import StorageServer [as 別名]
def __init__(self, database="whatever"):
        self.cache = StorageServer.StorageServer(database, 24)  # (Your plugin name, Cache time in hours) 
開發者ID:billythekids,項目名稱:plugin.video.bimozie,代碼行數:4,代碼來源:cache.py

示例3: run

# 需要導入模塊: import StorageServer [as 別名]
# 或者: from StorageServer import StorageServer [as 別名]
def run():
    sys.path = [settings.getAddonInfo('path') + "/lib"] + sys.path
    import StorageServer
    s = StorageServer.StorageServer(False)
    print " StorageServer Module loaded RUN"
    print s.plugin + " Starting server"
    s.run()
    return True 
開發者ID:seppius-xbmc-repo,項目名稱:ru,代碼行數:10,代碼來源:default.py

示例4: __init__

# 需要導入模塊: import StorageServer [as 別名]
# 或者: from StorageServer import StorageServer [as 別名]
def __init__(self):
        self.cache = StorageServer.StorageServer("mrknowfilm") 
開發者ID:mrknow,項目名稱:filmkodi,代碼行數:4,代碼來源:history.py

示例5: Search

# 需要導入模塊: import StorageServer [as 別名]
# 或者: from StorageServer import StorageServer [as 別名]
def Search(item):
    """Called when subtitle download is requested from XBMC."""
    log(u'item = %s' % pformat(item))
    # Do what's needed to get the list of subtitles from service site
    # use item["some_property"] that was set earlier.
    # Once done, set xbmcgui.ListItem() below and pass it to
    # xbmcplugin.addDirectoryItem()
    file_original_path = item['file_original_path']

    if item['manual_search']:
        searchstring = unquote(item['manual_search_string'])
    elif item['tvshow']:
        searchstring = build_tvshow_searchstring(item)
    else:
        searchstring = '%s%s' % (item['title'], ' (%s)' % item['year'].strip('()') if item.get('year') else '')
    log(u"Search string = %s" % searchstring)

    cache_ttl_value = __addon__.getSetting('cache_ttl')
    try:
        cache_ttl = int(cache_ttl_value)
    except Exception:
        cache_ttl = 0
    if cache_ttl:
        cache = StorageServer.StorageServer('service.subtitles.subdivx', cache_ttl / 60.0)
        subs_list = cache.cacheFunction(get_all_subs, searchstring, 'es', file_original_path)
    else:
        subs_list = get_all_subs(searchstring, 'es', file_original_path)

    compute_ratings(subs_list)

    for sub in subs_list:
        append_subtitle(sub, file_original_path) 
開發者ID:ramiro,項目名稱:service.subtitles.subdivx,代碼行數:34,代碼來源:service.py


注:本文中的StorageServer.StorageServer方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。