From 68ed9f4ffc10334082473c230e4081a302e93c90 Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Sun, 17 May 2020 12:12:31 +0100 Subject: [PATCH] add download_path property to managed_stream --- lbry/stream/managed_stream.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lbry/stream/managed_stream.py b/lbry/stream/managed_stream.py index 73976a8a3..da625c381 100644 --- a/lbry/stream/managed_stream.py +++ b/lbry/stream/managed_stream.py @@ -120,6 +120,10 @@ class ManagedStream(ManagedDownloadSource): def mime_type(self): return guess_media_type(os.path.basename(self.descriptor.suggested_file_name))[0] + @property + def download_path(self): + return f"{self.download_directory}/{self._file_name}" if self.download_directory and self._file_name else None + # @classmethod # async def create(cls, loop: asyncio.AbstractEventLoop, config: 'Config', # file_path: str, key: Optional[bytes] = None,