diff --git a/simpleextractor/core.py b/simpleextractor/core.py index 2d57f5d..ef7cb27 100644 --- a/simpleextractor/core.py +++ b/simpleextractor/core.py @@ -170,7 +170,12 @@ def _on_torrent_finished(self, torrent_id): except Exception, e: log.error("EXTRACTOR: Error creating destination folder: %s", e) return - + + # Dont Overwrite Existing Files + if os.stat(dest).st_size > 0 + log.error("EXTRACTOR: Extract failed: %s already exists (%s)", fpath, torrent_id) + continue + def on_extract_success(result, torrent_id, fpath): # XXX: Emit an event log.info("EXTRACTOR: Extract successful: %s (%s)", fpath, torrent_id)