Merge pull request #606 from tcely/patch-15

Made messages more human friendly
This commit is contained in:
meeb 2024-12-26 11:59:53 +11:00 committed by GitHub
commit e38709809e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -199,7 +199,7 @@ def index_source_task(source_id):
# Tack on a cleanup of old media # Tack on a cleanup of old media
cleanup_old_media() cleanup_old_media()
if source.delete_removed_media: if source.delete_removed_media:
log.info(f'Cleaning up media no longer in source {source}') log.info(f'Cleaning up media no longer in source: {source}')
cleanup_removed_media(source, videos) cleanup_removed_media(source, videos)
@ -236,7 +236,7 @@ def download_source_images(source_id):
f'source exists with ID: {source_id}') f'source exists with ID: {source_id}')
return return
avatar, banner = source.get_image_url avatar, banner = source.get_image_url
log.info(f'Thumbnail URL for source with ID: {source_id} ' log.info(f'Thumbnail URL for source with ID: {source_id} / {source} '
f'Avatar: {avatar} ' f'Avatar: {avatar} '
f'Banner: {banner}') f'Banner: {banner}')
if banner != None: if banner != None:
@ -269,7 +269,7 @@ def download_source_images(source_id):
with open(file_path, 'wb') as f: with open(file_path, 'wb') as f:
f.write(django_file.read()) f.write(django_file.read())
log.info(f'Thumbnail downloaded for source with ID: {source_id}') log.info(f'Thumbnail downloaded for source with ID: {source_id} / {source}')
@background(schedule=0) @background(schedule=0)
@ -285,7 +285,7 @@ def download_media_metadata(media_id):
f'media exists with ID: {media_id}') f'media exists with ID: {media_id}')
return return
if media.manual_skip: if media.manual_skip:
log.info(f'Task for ID: {media_id} skipped, due to task being manually skipped.') log.info(f'Task for ID: {media_id} / {media} skipped, due to task being manually skipped.')
return return
source = media.source source = media.source
metadata = media.index_metadata() metadata = media.index_metadata()
@ -306,7 +306,7 @@ def download_media_metadata(media_id):
# Don't filter media here, the post_save signal will handle that # Don't filter media here, the post_save signal will handle that
media.save() media.save()
log.info(f'Saved {len(media.metadata)} bytes of metadata for: ' log.info(f'Saved {len(media.metadata)} bytes of metadata for: '
f'{source} / {media_id}') f'{source} / {media}: {media_id}')
@background(schedule=0) @background(schedule=0)