Merge pull request #845 from radiorabe/fix/756-ignore-filesize-check-in-cache

Remove fs block size based check in pypo cache
This commit is contained in:
Kyle Robbertze 2019-08-01 11:39:06 -03:00 committed by GitHub
commit 3477ffb3ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -49,10 +49,13 @@ class PypoFile(Thread):
do_copy = False
if dst_exists:
if src_size != dst_size:
do_copy = True
else:
self.logger.debug("file %s already exists in local cache as %s, skipping copying..." % (src, dst))
# TODO: Check if the locally cached variant of the file is sane.
# This used to be a filesize check that didn't end up working.
# Once we have watched folders updated files from them might
# become an issue here... This needs proper cache management.
# https://github.com/LibreTime/libretime/issues/756#issuecomment-477853018
# https://github.com/LibreTime/libretime/pull/845
self.logger.debug("file %s already exists in local cache as %s, skipping copying..." % (src, dst))
else:
do_copy = True