mirror of https://github.com/meeb/tubesync
Downgrade logs to to info, make error message more helpful
parent
510f4c2f60
commit
1dea5b05fd
|
@ -31,7 +31,7 @@ def filter_media(instance: Media):
|
||||||
# Check if skipping
|
# Check if skipping
|
||||||
if instance.skip != skip:
|
if instance.skip != skip:
|
||||||
instance.skip = skip
|
instance.skip = skip
|
||||||
log.warn(f'Media: {instance.source} / {instance} has changed skip setting to {skip}')
|
log.info(f'Media: {instance.source} / {instance} has changed skip setting to {skip}')
|
||||||
return True
|
return True
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
@ -40,7 +40,7 @@ def filter_media(instance: Media):
|
||||||
def filter_published(instance: Media):
|
def filter_published(instance: Media):
|
||||||
# Check if the instance is not published, we have to skip then
|
# Check if the instance is not published, we have to skip then
|
||||||
if not isinstance(instance.published, datetime):
|
if not isinstance(instance.published, datetime):
|
||||||
log.warn(f'Media: {instance.source} / {instance} has no published date '
|
log.info(f'Media: {instance.source} / {instance} has no published date '
|
||||||
f'set, marking to be skipped')
|
f'set, marking to be skipped')
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
@ -85,13 +85,13 @@ def filter_source_cutoff(instance: Media):
|
||||||
if instance.source.delete_old_media and instance.source.days_to_keep > 0:
|
if instance.source.delete_old_media and instance.source.days_to_keep > 0:
|
||||||
if not isinstance(instance.published, datetime):
|
if not isinstance(instance.published, datetime):
|
||||||
# Media has no known published date or incomplete metadata
|
# Media has no known published date or incomplete metadata
|
||||||
log.warn(f'Media: {instance.source} / {instance} has no published date, skipping')
|
log.info(f'Media: {instance.source} / {instance} has no published date, skipping')
|
||||||
return True
|
return True
|
||||||
|
|
||||||
delta = timezone.now() - timedelta(days=instance.source.days_to_keep)
|
delta = timezone.now() - timedelta(days=instance.source.days_to_keep)
|
||||||
if instance.published < delta:
|
if instance.published < delta:
|
||||||
# Media was published after the cutoff date, skip it
|
# Media was published after the cutoff date, skip it
|
||||||
log.warn(f'Media: {instance.source} / {instance} is older than '
|
log.info(f'Media: {instance.source} / {instance} is older than '
|
||||||
f'{instance.source.days_to_keep} days, skipping')
|
f'{instance.source.days_to_keep} days, skipping')
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
{% if media.manual_skip %}{% include 'errorbox.html' with message='Media is marked to be skipped and will not be downloaded.' %}
|
{% if media.manual_skip %}{% include 'errorbox.html' with message='Media is marked to be skipped and will not be downloaded.' %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% if not media.can_download %}{% include 'errorbox.html' with message='Media cannot be downloaded because it has no formats which match the source requirements.' %}{% endif %}
|
{% if not media.can_download %}{% include 'errorbox.html' with message='Media cannot be downloaded because it has no formats which match the source requirements.' %}{% endif %}
|
||||||
{% if media.skip %}{% include 'errorbox.html' with message='This media may be skipped due to error(s).' %}{% endif %}
|
{% if media.skip %}{% include 'errorbox.html' with message='This media may be skipped due to error(s) or not matching a filter condition.' %}{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% include 'infobox.html' with message=message %}
|
{% include 'infobox.html' with message=message %}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
Loading…
Reference in New Issue