diff --git a/sickbeard/databases/mainDB.py b/sickbeard/databases/mainDB.py index 18403275cd3f06f374e11b84ee6c991fdb86c8d1..e6664053089a3d5d9d05cc04655017fc26e4df72 100644 --- a/sickbeard/databases/mainDB.py +++ b/sickbeard/databases/mainDB.py @@ -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"])