Only show DropCampaignDetails
This commit is contained in:
parent
fa197cf096
commit
026bc57f77
2 changed files with 32 additions and 9 deletions
|
|
@ -467,7 +467,12 @@ class DropCampaignFeed(Feed):
|
|||
|
||||
def items(self) -> list[DropCampaign]:
|
||||
"""Return the latest 100 drop campaigns."""
|
||||
return list(DropCampaign.objects.select_related("game").order_by("-added_at")[:100])
|
||||
return list(
|
||||
DropCampaign.objects
|
||||
.filter(operation_name="DropCampaignDetails")
|
||||
.select_related("game")
|
||||
.order_by("-added_at")[:100],
|
||||
)
|
||||
|
||||
def item_title(self, item: Model) -> SafeText:
|
||||
"""Return the campaign name as the item title (SafeText for RSS)."""
|
||||
|
|
@ -609,7 +614,12 @@ class GameCampaignFeed(Feed):
|
|||
|
||||
def items(self, obj: Game) -> list[DropCampaign]:
|
||||
"""Return the latest 100 drop campaigns for this game, ordered by most recently added."""
|
||||
return list(DropCampaign.objects.filter(game=obj).select_related("game").order_by("-added_at")[:100])
|
||||
return list(
|
||||
DropCampaign.objects
|
||||
.filter(game=obj, operation_name="DropCampaignDetails")
|
||||
.select_related("game")
|
||||
.order_by("-added_at")[:100],
|
||||
)
|
||||
|
||||
|
||||
# MARK: /rss/organizations/<twitch_id>/campaigns/
|
||||
|
|
@ -642,7 +652,12 @@ class OrganizationCampaignFeed(Feed):
|
|||
|
||||
def items(self, obj: Organization) -> list[DropCampaign]:
|
||||
"""Return the latest 100 drop campaigns for this organization, ordered by most recently added."""
|
||||
return list(DropCampaign.objects.filter(game__owner=obj).select_related("game").order_by("-added_at")[:100])
|
||||
return list(
|
||||
DropCampaign.objects
|
||||
.filter(game__owner=obj, operation_name="DropCampaignDetails")
|
||||
.select_related("game")
|
||||
.order_by("-added_at")[:100],
|
||||
)
|
||||
|
||||
def item_author_name(self, item: DropCampaign) -> str:
|
||||
"""Return the author name for the campaign, typically the game name."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue