Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions pytr/dl.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def dl_callback(self, event):
if subfolder is None:
self.log.warning(f"no subfolder mapping for {eventdesc}")

for doc in section["data"]:
for idx, doc in enumerate(section["data"]):
if isinstance(doc["action"]["payload"], dict):
self.log.warning(
f'Download of document with new API-Path URL "{doc["action"]["payload"]["path"]}" is not possible. (yet?)'
Expand All @@ -299,7 +299,9 @@ def dl_callback(self, event):
self.log.warning(f"no timestamp parseable from {timestamp_str}")
docdate = datetime.now()

title = f"{doc['title']} - {event['title']} - {event['subtitle']}"
suffix = f" - {idx}" if idx > 0 else ""
title = f"{doc['title']} - {event['title']} - {event['subtitle']}{suffix}"

self.dl_doc(doc, title, subfolder, docdate)

if has_docs:
Expand Down