Skip to content

Commit 5ace74e

Browse files
When syncing use all sets by user instead of just the first
1 parent 1ee48f2 commit 5ace74e

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.8.2
3+
rev: v0.8.3
44
hooks:
55
- id: ruff-format
66
- id: ruff

mediux_posters/__main__.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,9 @@ def sync_posters(
105105
if not set_list:
106106
continue
107107
for username in Constants.settings().priority_usernames:
108-
if set_data := next(
109-
iter(
110-
x
111-
for x in set_list
112-
if x.get("user_created", {}).get("username") == username
113-
),
114-
None,
115-
):
108+
for set_data in [
109+
x for x in set_list if x.get("user_created", {}).get("username") == username
110+
]:
116111
LOGGER.info(
117112
"Downloading '%s' by '%s'",
118113
set_data.get("set_name"),

0 commit comments

Comments
 (0)