diff --git a/templates/twitch/dashboard.html b/templates/twitch/dashboard.html index f7ca59c..5ac4500 100644 --- a/templates/twitch/dashboard.html +++ b/templates/twitch/dashboard.html @@ -85,34 +85,47 @@ Hover over the end time to see the exact date and time. text-align: left"> Duration: {{ campaign.start_at|timesince:campaign.end_at }} - {% if campaign.allow_channels.all %} -
- Channels: - +
{% endfor %} diff --git a/twitch/models.py b/twitch/models.py index 153e578..4ba952b 100644 --- a/twitch/models.py +++ b/twitch/models.py @@ -172,6 +172,13 @@ class Game(models.Model): return self.slug return self.id + @property + def twitch_directory_url(self) -> str: + """Return the Twitch directory URL for this game with drops filter if slug is available.""" + if self.slug: + return f"https://www.twitch.tv/directory/category/{self.slug}?filter=drops" + return "" + class Channel(models.Model): """Represents a Twitch channel that can participate in drop campaigns."""