From 11c3b7820d0e9c4a6e1500e15eda33ce07a433ff Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Sat, 4 Nov 2023 15:48:05 +0100 Subject: [PATCH] [`torrent`] Create `download_dir` if it doesn't exist. --- platypush/plugins/torrent/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/platypush/plugins/torrent/__init__.py b/platypush/plugins/torrent/__init__.py index dc3d3a3b57..58ce31a9cd 100644 --- a/platypush/plugins/torrent/__init__.py +++ b/platypush/plugins/torrent/__init__.py @@ -1,4 +1,5 @@ import os +import pathlib import queue import random import threading @@ -67,6 +68,8 @@ class TorrentPlugin(Plugin): 'tv': f'{popcorn_base_url}/show/{{}}', } + pathlib.Path(self.download_dir).mkdir(parents=True, exist_ok=True) + @action def search( self,