mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-21 20:46:36 +00:00
Removed extra characters
Also, use the new function.
This commit is contained in:
parent
0856c29b4d
commit
461ccf6017
@ -55,13 +55,11 @@ class Command(BaseCommand):
|
|||||||
item.downloaded = True
|
item.downloaded = True
|
||||||
item.downloaded_filesize = Path(filepath).stat().st_size
|
item.downloaded_filesize = Path(filepath).stat().st_size
|
||||||
# set a reasonable download date
|
# set a reasonable download date
|
||||||
date = item.metadata_published(Path(filepath).stat().st_mtime)
|
date = item.metadata_published(Path(filepath).stat().st_mtime)
|
||||||
if item.published and item.published > date:
|
if item.published and item.published > date:
|
||||||
date = item.published
|
date = item.published
|
||||||
if item.has_metadata:
|
if item.has_metadata:
|
||||||
# TODO: switch to the newer function when it is merged from PR 807
|
metadata_date = item.metadata_published(item.get_metadata_first_value('epoch', 0))
|
||||||
# item.get_metadata_first_value('epoch', 0)
|
|
||||||
metadata_date = item.metadata_published(item.loaded_metadata.get('epoch', 0))
|
|
||||||
if metadata_date and metadata_date > date:
|
if metadata_date and metadata_date > date:
|
||||||
date = metadata_date
|
date = metadata_date
|
||||||
if item.download_date and item.download_date > date:
|
if item.download_date and item.download_date > date:
|
||||||
|
Loading…
Reference in New Issue
Block a user