From 2858283ffd2967c731052eab7d5dbfcba79c4997 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Sun, 11 Jul 2021 10:30:28 +0200 Subject: [PATCH] Fix folder appearance --- pynyaata/__init__.py | 2 +- pynyaata/templates/admin/folder/edit.html | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/pynyaata/__init__.py b/pynyaata/__init__.py index 0ece3c2..5cad36f 100644 --- a/pynyaata/__init__.py +++ b/pynyaata/__init__.py @@ -243,7 +243,7 @@ def admin_edit(link_id=None): clean_titles() # Transmission - if TRANSMISSION_ENABLED and isinstance(instance, Nyaa): + if TRANSMISSION_ENABLED and title.folder.path is not None and isinstance(instance, Nyaa): download_url = link.link.replace('/view/', '/download/') + '.torrent' torrent_path = '%s/%s' % (title.folder.path, title.name) torrent = transmission.add_torrent(download_url, download_dir=torrent_path) diff --git a/pynyaata/templates/admin/folder/edit.html b/pynyaata/templates/admin/folder/edit.html index 547ff78..af8edb0 100644 --- a/pynyaata/templates/admin/folder/edit.html +++ b/pynyaata/templates/admin/folder/edit.html @@ -6,7 +6,7 @@
-
+
{{ action_form.name(class='input', placeholder='Name') }}
@@ -17,11 +17,7 @@ {{ action_form.path(class='input', placeholder='Path') }}
-
-
-
-