MCPcopy Index your code
hub / github.com/pyload/pyload / _prepare

Method _prepare

module/plugins/internal/SimpleCrypter.py:165–190  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

163 decode=self.TEXT_ENCODING)
164
165 def _prepare(self):
166 self.direct_dl = False
167
168 if self.LOGIN_PREMIUM:
169 self.no_fallback = True
170 if not self.premium:
171 self.fail(_("Required premium account not found"))
172
173 if self.LOGIN_ACCOUNT and not self.account:
174 self.fail(_("Required account not found"))
175
176 self.req.setOption("timeout", 120)
177
178 if self.LINK_PATTERN:
179 if self.LINK_FREE_PATTERN is None:
180 self.LINK_FREE_PATTERN = self.LINK_PATTERN
181
182 if self.LINK_PREMIUM_PATTERN is None:
183 self.LINK_PREMIUM_PATTERN = self.LINK_PATTERN
184
185 if self.DIRECT_LINK is None:
186 self.direct_dl = bool(self.premium)
187 else:
188 self.direct_dl = self.DIRECT_LINK
189
190 self.pyfile.url = replace_patterns(self.pyfile.url, self.URL_REPLACEMENTS)
191
192 def decrypt(self, pyfile):
193 self._prepare()

Callers 1

decryptMethod · 0.95

Calls 4

replace_patternsFunction · 0.85
setOptionMethod · 0.80
_Function · 0.50
failMethod · 0.45

Tested by

no test coverage detected