sync file title update

This commit is contained in:
tmshv committed 2020-03-27 19:28:22 +03:00
1 parent 0ec86175b2
commit b50b4b3ab3
2 files changed
+9

No files matched your search

+4
View File
@@ -76,6 +76,10 @@ async def create_post(provider: Provider, folder: str, md: str, sizes):
filepath = os.path.join(folder, data['file'])
document = await Document.new(provider, filepath, settings.image_sizes)
title = data['caption']
if title:
document.set_title(title)
if not document:
raise Exception(f'Failed to build Document {filepath}')