当前位置: 首页>>代码示例>>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;未经允许,请勿转载。