From d09e543c3bd0fb6c5b3a7b261ebfabd89f9be85a Mon Sep 17 00:00:00 2001
From: zentis <nicolas.john611@gmail.com>
Date: Fri, 8 Sep 2023 12:20:35 +0800
Subject: [PATCH] Fix issue with MTV torrent creation not working (#241)

When using torf, create_torrent did not respect output_filename

Co-authored-by: Zentis <>
---
 src/prep.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/prep.py b/src/prep.py
index 60d0c731e..7bbbd970a 100644
--- a/src/prep.py
+++ b/src/prep.py
@@ -1999,7 +1999,7 @@ def create_torrent(self, meta, path, output_filename, piece_size_max):
             torrent.piece_size = 2**piece_size
             torrent.piece_size_max = 16777216
             torrent.generate(callback=self.torf_cb, interval=5)
-            torrent.write(f"{meta['base_dir']}/tmp/{meta['uuid']}/BASE.torrent", overwrite=True)
+            torrent.write(f"{meta['base_dir']}/tmp/{meta['uuid']}/{output_filename}.torrent", overwrite=True)
             torrent.verify_filesize(path)
         console.print("[bold green].torrent created", end="\r")
         return torrent