Пример #1
0
    def date_raw_update(self, torrent, torrent_name_search, raw_info: dict) -> dict:
        raw_info["descr"] = self.enhance_descr(torrent, raw_info["descr"], raw_info["clone_id"])
        type_ = int(raw_info["type"])
        if type_ in [412, 405]:  # TV-Episode, TV-Pack
            torrent_raw_name = torrent_name_search.group("full_name")
            raw_info["name"] = title_clean(torrent_raw_name)
            season_episode_info = episode_eng2chs(torrent_name_search.group("episode"))
            raw_info["small_descr"] = re.sub(r"第.+([集季])", season_episode_info, raw_info["small_descr"])

        return raw_info
Пример #2
0
    def date_raw_update(self, torrent_name_search, raw_info: dict) -> dict:
        type_ = int(raw_info["type"])
        if type_ == 418:  # 欧美剧集
            torrent_raw_name = torrent_name_search.group("full_name")
            raw_info["name"] = title_clean(torrent_raw_name)
            season_episode_info = episode_eng2chs(
                torrent_name_search.group("episode"))
            raw_info["small_descr"] = re.sub(r"第.+([集季])", season_episode_info,
                                             raw_info["small_descr"])

        return raw_info
Пример #3
0
    def date_raw_update(self, torrent_name_search, raw_info: dict) -> dict:
        if int(raw_info["category"]) == 402:  # Series
            raw_info["name"] = torrent_name_search.group("full_name")
            season_episode_info = episode_eng2chs(torrent_name_search.group("episode"))
            raw_info["small_descr"] = re.sub(r"第.+([集季])", season_episode_info, raw_info["small_descr"])
        elif int(raw_info["category"]) == 405:  # Anime
            episode = torrent_name_search.group("episode")
            raw_info["name"] = re.sub("^(.+?)\.\d{2,3}(?:\.5|[Vv]2)?\.(TV|BD|WEB|DVD)",
                                      "\g<1>.{ep}.\g<2>".format(ep=episode), raw_info["name"])

        return raw_info
Пример #4
0
    def date_raw_update(self, torrent_name_search, raw_info: dict) -> dict:
        type_ = int(raw_info["type"])
        if type_ == 418:  # 欧美剧集
            torrent_raw_name = torrent_name_search.group("full_name")
            raw_info["name"] = title_clean(torrent_raw_name)
            season_episode_info = episode_eng2chs(torrent_name_search.group("episode"))
            raw_info["small_descr"] = re.sub(r"第.+([集季])", season_episode_info, raw_info["small_descr"])
        if type_ == 427:  # 连载动漫
            ep = torrent_name_search.group("episode")
            raw_info["name"] = re.sub("^\d{2,3}(?:\.5|[Vv]2)? (TV|BD|WEB|DVD)", "{} \g<1>".format(ep), raw_info["name"])
            raw_info["small_descr"] = re.sub("第[\d ]+?话", "第 {} 话".format(ep), raw_info["small_descr"])

        return raw_info
Пример #5
0
    def date_raw_update(self, torrent, torrent_name_search, raw_info: dict) -> dict:
        raw_info["descr"] = self.enhance_descr(torrent, raw_info["descr"], raw_info["clone_id"])
        type_ = int(raw_info["type"])
        if type_ == 418:  # 欧美剧集
            torrent_raw_name = torrent_name_search.group("full_name")
            raw_info["name"] = title_clean(torrent_raw_name)
            season_episode_info = episode_eng2chs(torrent_name_search.group("episode"))
            raw_info["small_descr"] = re.sub(r"第.+([集季])", season_episode_info, raw_info["small_descr"])
        if type_ == 427:  # 连载动漫
            ep = torrent_name_search.group("episode")
            raw_info["name"] = re.sub("^\d{2,3}(?:\.5|[Vv]2)? (TV|BD|WEB|DVD)", "{} \g<1>".format(ep), raw_info["name"])
            raw_info["small_descr"] = re.sub("第[\d ]+?话", "第 {} 话".format(ep), raw_info["small_descr"])

        return raw_info
Пример #6
0
    def date_raw_update(self, torrent_name_search, raw_info: dict) -> dict:
        if int(raw_info["category"]) == 402:  # Series
            raw_info["name"] = torrent_name_search.group("full_name")
            season_episode_info = episode_eng2chs(
                torrent_name_search.group("episode"))
            raw_info["small_descr"] = re.sub(r"第.+([集季])", season_episode_info,
                                             raw_info["small_descr"])
        elif int(raw_info["category"]) == 405:  # Anime
            episode = torrent_name_search.group("episode")
            raw_info["name"] = re.sub(
                "^(.+?)\.\d{2,3}(?:\.5|[Vv]2)?\.(TV|BD|WEB|DVD)",
                "\g<1>.{ep}.\g<2>".format(ep=episode), raw_info["name"])

        return raw_info
Пример #7
0
    def date_raw_update(self, torrent, torrent_name_search,
                        raw_info: dict) -> dict:
        raw_info["descr"] = self.enhance_descr(torrent, raw_info["descr"],
                                               raw_info["clone_id"])
        if int(raw_info["category"]) == 402:  # Series
            raw_info["name"] = torrent_name_search.group("full_name")
            season_episode_info = episode_eng2chs(
                torrent_name_search.group("episode"))
            raw_info["small_descr"] = re.sub(r"第.+([集季])", season_episode_info,
                                             raw_info["small_descr"])
        elif int(raw_info["category"]) == 405:  # Anime
            episode = torrent_name_search.group("episode")
            group = torrent_name_search.group("group")
            # 替换集数信息
            raw_info["name"] = re.sub(
                "^(.+?)\.\d{2,3}(?:\.5|[Vv]2)?\.(TV|BD|WEB|DVD)",
                "\g<1>.{ep}.\g<2>".format(ep=episode), raw_info["name"])
            # 替换制作组信息
            raw_info["name"] = re.sub("^(.+?(?:MP4|MKV|M2TS))\.(.+)$",
                                      "\g<1>.{group}".format(group=group),
                                      raw_info["name"])

        return raw_info