fix problem with getting a stream where the file has been deleted

This commit is contained in:
Jack 2016-05-10 21:01:53 -04:00
parent b04cfdc091
commit 1c507393a9

View file

@ -913,7 +913,10 @@ class LBRYDaemon(jsonrpc.JSONRPC):
d = self._get_lbry_file_by_sd_hash(stream_hash)
def _add_results(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