mirror of
https://gitlab.com/chicken-riders/RcGcDw.git
synced 2025-02-23 00:24:09 +00:00
Added #121
This commit is contained in:
parent
27e6a79737
commit
f6ecee6583
|
@ -312,6 +312,7 @@
|
||||||
"embed": {
|
"embed": {
|
||||||
"show_content": true
|
"show_content": true
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"show_forums": []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,6 +63,11 @@ def fetch_discussions():
|
||||||
def parse_discussion_post(post):
|
def parse_discussion_post(post):
|
||||||
"""Initial post recognition & handling"""
|
"""Initial post recognition & handling"""
|
||||||
post_type = post["_embedded"]["thread"][0]["containerType"]
|
post_type = post["_embedded"]["thread"][0]["containerType"]
|
||||||
|
# Filter posts by forum
|
||||||
|
if post_type == "FORUM" and settings["fandom_discussions"].get("show_forums", []):
|
||||||
|
if not post["forumName"] in settings["fandom_discussions"]["show_forums"]:
|
||||||
|
discussion_logger.debug(f"Ignoring post as it's from {post['forumName']}.")
|
||||||
|
return
|
||||||
formatter(post_type, post)
|
formatter(post_type, post)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue