Skip to content

Commit

Permalink
Fix: output if nothing new to rename
Browse files Browse the repository at this point in the history
  • Loading branch information
Drazzilb08 committed Feb 19, 2024
1 parent 0e4edaa commit cb760e4
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions modules/poster_renamerr.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,13 +326,14 @@ def rename_files(matched_assets, script_config):
process_file(file, new_file_path, action_type)

# Append the messages to the output
output[asset_type].append({
'title': item['title'],
'year': item['year'],
'folder': item['folder'],
'messages': messages,
'discord_messages': discord_messages,
})
if messages or discord_messages:
output[asset_type].append({
'title': item['title'],
'year': item['year'],
'folder': item['folder'],
'messages': messages,
'discord_messages': discord_messages,
})
else:
print(f"No {asset_type} to rename")
return output
Expand Down

0 comments on commit cb760e4

Please sign in to comment.