1
0
Fork 0
mirror of synced 2024-07-01 12:30:21 +12:00

Update some logging levels

This commit is contained in:
Serene-Arc 2021-03-27 20:50:09 +10:00 committed by Ali Parlakci
parent 91bebe5f68
commit 20f525bd0d

View file

@ -354,7 +354,7 @@ class RedditDownloader:
return return
for destination, res in self.file_name_formatter.format_resource_paths(content, self.download_directory): for destination, res in self.file_name_formatter.format_resource_paths(content, self.download_directory):
if destination.exists(): if destination.exists():
logger.warning(f'File already exists: {destination}') logger.debug(f'File {destination} already exists, continuing')
else: else:
try: try:
res.download() res.download()
@ -366,13 +366,12 @@ class RedditDownloader:
destination.parent.mkdir(parents=True, exist_ok=True) destination.parent.mkdir(parents=True, exist_ok=True)
if resource_hash in self.master_hash_list: if resource_hash in self.master_hash_list:
if self.args.no_dupes: if self.args.no_dupes:
logger.warning( logger.info(
f'Resource from "{res.url}" and hash "{resource_hash}" from submission {submission.id}' f'Resource hash {resource_hash} from submission {submission.id} downloaded elsewhere')
' downloaded elsewhere')
return return
elif self.args.make_hard_links: elif self.args.make_hard_links:
self.master_hash_list[resource_hash].link_to(destination) self.master_hash_list[resource_hash].link_to(destination)
logger.debug( logger.info(
f'Hard link made linking {destination} to {self.master_hash_list[resource_hash]}') f'Hard link made linking {destination} to {self.master_hash_list[resource_hash]}')
return return
with open(destination, 'wb') as file: with open(destination, 'wb') as file: