mirror of
https://github.com/maxdorninger/MediaManager.git
synced 2026-04-17 15:43:28 +02:00
create list from range directly instead of using append
This commit is contained in:
@@ -55,9 +55,7 @@ class IndexerQueryResult(BaseModel):
|
||||
pattern = r"\bS(\d+)\b"
|
||||
matches = re.findall(pattern, self.title, re.IGNORECASE)
|
||||
if matches.__len__() == 2:
|
||||
result = []
|
||||
for i in range(int(matches[0]), int(matches[1]) + 1):
|
||||
result.append(i)
|
||||
result = list(range(int(matches[0]), int(matches[1]) + 1))
|
||||
elif matches.__len__() == 1:
|
||||
result = [int(matches[0])]
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user