Private GIT

Skip to content
Snippets Groups Projects
Commit 466e0e0d authored by Nic Wolfe's avatar Nic Wolfe
Browse files

Avoid upgrading blank files

parent 651e6857
No related branches found
No related tags found
No related merge requests found
......@@ -433,6 +433,9 @@ class AddSizeAndSceneNameFields(FixAirByDateSetting):
logger.log(u"Adding file size to all episodes in DB, please be patient")
for cur_ep in ep_results:
if not cur_ep["location"]:
continue
# if there is no size yet then populate it for us
if not cur_ep["file_size"] or (not int(cur_ep["file_size"]) and ek.ek(os.path.isfile, cur_ep["location"])):
cur_size = ek.ek(os.path.getsize, cur_ep["location"])
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment