@@ -58,15 +58,15 @@ def invoke(self, option: JmOption, feature_from: str, when: str, **kwargs):
5858 # ---- 组合运算符,统一返回 FeatureChain ----
5959
6060 def __add__ (self , other ):
61- return FeatureChain ._combine (self , other )
61+ return FeatureChain .combine (self , other )
6262
6363 def __or__ (self , other ):
64- return FeatureChain ._combine (self , other )
64+ return FeatureChain .combine (self , other )
6565
6666 def __and__ (self , other ):
67- return FeatureChain ._combine (self , other )
67+ return FeatureChain .combine (self , other )
6868
69- def _to_list (self ):
69+ def to_list (self ):
7070 return [self ]
7171
7272
@@ -122,7 +122,7 @@ def _adapt_plugin_kwargs(self, feature_from: str, when: str) -> dict:
122122 filename_rule
123123 """
124124 kwargs = self .kwargs .copy ()
125- kwargs .setdefault ('filename_rule' , '[JM{Aid}]{Atitle}' if feature_from == 'download_album ' else '[JM{Pid}]{Ptitle}' )
125+ kwargs .setdefault ('filename_rule' , '[JM{Aid}]{Atitle}' if when == 'after_album ' else '[JM{Pid}]{Ptitle}' )
126126 return kwargs
127127
128128 def __repr__ (self ):
@@ -139,19 +139,19 @@ def __init__(self, features):
139139 self ._features = features
140140
141141 @classmethod
142- def _combine (cls , left , right ):
143- return cls (left ._to_list () + right ._to_list ())
142+ def combine (cls , left , right ):
143+ return cls (left .to_list () + right .to_list ())
144144
145145 def __add__ (self , other ):
146- return FeatureChain ._combine (self , other )
146+ return FeatureChain .combine (self , other )
147147
148148 def __or__ (self , other ):
149- return FeatureChain ._combine (self , other )
149+ return FeatureChain .combine (self , other )
150150
151151 def __and__ (self , other ):
152- return FeatureChain ._combine (self , other )
152+ return FeatureChain .combine (self , other )
153153
154- def _to_list (self ):
154+ def to_list (self ):
155155 return list (self ._features )
156156
157157 def __repr__ (self ):
0 commit comments