Skip to content

Commit

Permalink
send notification only if download found
Browse files Browse the repository at this point in the history
  • Loading branch information
Drazzilb08 committed Feb 18, 2024
1 parent 22117d2 commit 482847f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions modules/upgradinatorr.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,15 @@ def notification(output_dict):
title = item['title']
year = item['year']
download = item['download']
torrent_list = []
torrent_list.append(f"{title} ({year})")

# Construct a list of downloads and their format scores associated with the media
if download:
torrent_list = []
torrent_list.append(f"{title} ({year})")
for torrent_item, format_score in download.items():
torrent_list.append(f"\t{torrent_item}\n\tCF Score: {format_score}")
else:
continue
torrent_list.append("\tNo upgrades found for this item.")
server_list.append("\n".join(torrent_list))
value = "\n".join(server_list)
Expand Down

0 comments on commit 482847f

Please sign in to comment.