From 1c507393a95647921e1c50d4733816715bd7c2dc Mon Sep 17 00:00:00 2001 From: Jack Date: Tue, 10 May 2016 21:01:53 -0400 Subject: [PATCH] fix problem with getting a stream where the file has been deleted --- lbrynet/lbrynet_daemon/LBRYDaemon.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lbrynet/lbrynet_daemon/LBRYDaemon.py b/lbrynet/lbrynet_daemon/LBRYDaemon.py index d0ecc8fb6..75179f88e 100644 --- a/lbrynet/lbrynet_daemon/LBRYDaemon.py +++ b/lbrynet/lbrynet_daemon/LBRYDaemon.py @@ -913,7 +913,10 @@ class LBRYDaemon(jsonrpc.JSONRPC): d = self._get_lbry_file_by_sd_hash(stream_hash) def _add_results(l): - return defer.succeed((stream_info, l)) + if l: + if os.path.isfile(os.path.join(self.download_directory, l.file_name)): + return defer.succeed((stream_info, l)) + return defer.succeed((stream_info, None)) d.addCallback(_add_results) return d