当前位置: 首页>>代码示例>>Python>>正文


Python Quality.scene_quality方法代码示例

本文整理汇总了Python中sickbeard.common.Quality.scene_quality方法的典型用法代码示例。如果您正苦于以下问题:Python Quality.scene_quality方法的具体用法?Python Quality.scene_quality怎么用?Python Quality.scene_quality使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sickbeard.common.Quality的用法示例。


在下文中一共展示了Quality.scene_quality方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_quality

# 需要导入模块: from sickbeard.common import Quality [as 别名]
# 或者: from sickbeard.common.Quality import scene_quality [as 别名]
    def get_quality(self, item, anime=False):
        (title, url_) = self._get_title_and_url(item)
        quality = Quality.scene_quality(title, anime)
        logger.log(u"Parsed quality : %s" %quality, logger.DEBUG) 
        height=""
        logger.log(u"Check if size minimums should apply", logger.DEBUG)
        if quality == Quality.FULLHDTV or quality == Quality.FULLHDWEBDL or quality == Quality.FULLHDBLURAY:
            height="1080p"
        elif quality == Quality.HDTV or quality == Quality.HDWEBDL or quality == Quality.HDBLURAY:
            height="720p"
        if height != "":
            logger.log(u"Size minimums apply Height is: %s" %height, logger.DEBUG)
            rlsSize = self._get_size(item)
            if rlsSize > -1:
                logger.log(u"Rls has size, Size: %s" %rlsSize, logger.DEBUG)
                rlsCodec = Quality.sceneQualityFromName(title,quality)
                
                if rlsCodec == "":
                    rlsCodec = "x264"
                    logger.log(u"Rls has no codec, 'x264' set as default", logger.DEBUG)
                    
                logger.log(u"Rls has codec, codec: %s" %rlsCodec, logger.DEBUG) 
                logger.log(u"Rls has runtime, runtime: %s" %self.show.runtime, logger.DEBUG) 
                if "265" in rlsCodec or rlsCodec== "hevc":
                    if self.show.runtime > 30:
                        if (height=="1080p" and rlsSize <= 400000000) or (height=="720p" and rlsSize <= 200000000):
                            logger.log(u"Show has runtime over 30 and is x265", logger.DEBUG) 
                            quality = Quality.UNKNOWN
                    else:
                        if (height=="1080p" and rlsSize <= 200000000) or (height=="720p" and rlsSize <= 100000000):
                            logger.log(u"Show has runtime under 30 and is x265", logger.DEBUG) 
                            quality = Quality.UNKNOWN
                elif "264" in rlsCodec or rlsCodec== "avc":
                    if self.show.runtime > 30:
                        if (height=="1080p" and rlsSize <= 1000000000) or (height=="720p" and rlsSize <= 800000000):
                            logger.log(u"Show has runtime over 30 and is x264", logger.DEBUG) 
                            quality = Quality.UNKNOWN
                    else:
                        if (height=="1080p" and rlsSize <= 700000000) or (height=="720p" and rlsSize <= 500000000):
                            logger.log(u"Show has runtime under 30 and is x264", logger.DEBUG) 
                            quality = Quality.UNKNOWN

                logger.log(u"Quality set to: %s" %quality, logger.DEBUG) 

        return quality
开发者ID:Maximilian-Reuter,项目名称:SickRage-1,代码行数:47,代码来源:GenericProvider.py

示例2: get_quality

# 需要导入模块: from sickbeard.common import Quality [as 别名]
# 或者: from sickbeard.common.Quality import scene_quality [as 别名]
    def get_quality(self, item, anime=False):
        (title, url_) = self._get_title_and_url(item)
        quality = Quality.scene_quality(title, anime)

        return quality
开发者ID:NickMolloy,项目名称:SickRage,代码行数:7,代码来源:GenericProvider.py


注:本文中的sickbeard.common.Quality.scene_quality方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。