We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7fa60f1 commit 11379ddCopy full SHA for 11379dd
src/program/utils/notifications.py
@@ -41,7 +41,8 @@ def _build_discord_notification(item: MediaItem) -> str:
41
"""Build a discord notification for the given item using markdown that lists the files completed."""
42
notification_message = f"### [{item.type.title()}] **{item.log_string}** ({item.aired_at.year})\n"
43
stream: Stream = next((stream for stream in item.streams if stream.infohash == item.active_stream.get("infohash")), None)
44
- notification_message += f"- {stream.raw_title}\n"
+ if stream:
45
+ notification_message += f"- {stream.raw_title}\n"
46
return notification_message
47
48
def notify_on_complete(item: MediaItem) -> None:
0 commit comments