mirror of
https://github.com/zoriya/guessit.git
synced 2025-12-06 06:16:09 +00:00
Enable Filepart2EpisodeTitle rule with absolute episodes
This commit is contained in:
@@ -7,6 +7,7 @@ from collections import defaultdict
|
||||
from copy import copy
|
||||
|
||||
from rebulk import Rebulk, Rule, AppendMatch, RemoveMatch, RenameMatch, POST_PROCESS
|
||||
from rebulk.rebulk import Matches
|
||||
|
||||
from ..common import seps, title_seps
|
||||
from ..common.formatters import cleanup
|
||||
@@ -274,6 +275,9 @@ class Filepart2EpisodeTitle(Rule):
|
||||
|
||||
If BBBB contains season and episode and AAA contains a hole
|
||||
then title is to be found in AAAA.
|
||||
|
||||
If BBBB contais the episode and no season is found (absolute numbering)
|
||||
then title is to be found in AAAA.
|
||||
"""
|
||||
consequence = AppendMatch('title')
|
||||
|
||||
@@ -292,7 +296,7 @@ class Filepart2EpisodeTitle(Rule):
|
||||
if episode_number:
|
||||
season = (matches.range(directory.start, directory.end, lambda match: match.name == 'season', 0) or
|
||||
matches.range(filename.start, filename.end, lambda match: match.name == 'season', 0))
|
||||
if season:
|
||||
if season or not matches.named("season"):
|
||||
hole = matches.holes(directory.start, directory.end,
|
||||
ignore=or_(lambda match: 'weak-episode' in match.tags, TitleBaseRule.is_ignored),
|
||||
formatter=cleanup, seps=title_seps,
|
||||
|
||||
@@ -4776,3 +4776,10 @@
|
||||
title: "Youkoso Jitsuryoku Shijou Shugi no Kyoushitsu e"
|
||||
season: 3
|
||||
episode: 5
|
||||
|
||||
? video/zettai karen children/01 - Absolutely Lovely! Their Name Is The Children.mkv
|
||||
: title: "zettai karen children"
|
||||
episode: 1
|
||||
episode_title: "Absolutely Lovely! Their Name Is The Children"
|
||||
container: mkv
|
||||
type: episode
|
||||
|
||||
Reference in New Issue
Block a user