diff --git a/pynyaata/__init__.py b/pynyaata/__init__.py index 5cad36f..67bd6e7 100644 --- a/pynyaata/__init__.py +++ b/pynyaata/__init__.py @@ -243,11 +243,12 @@ def admin_edit(link_id=None): clean_titles() # Transmission - 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) - transmission.move_torrent_data(torrent.id, torrent_path) + if TRANSMISSION_ENABLED and isinstance(instance, Nyaa): + if title.folder.path is not None and title.folder.path != '': + 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) + transmission.move_torrent_data(torrent.id, torrent_path) return redirect(url_for('admin')) diff --git a/pynyaata/connectors/nyaa.py b/pynyaata/connectors/nyaa.py index 4bd6c8d..f4cfb79 100644 --- a/pynyaata/connectors/nyaa.py +++ b/pynyaata/connectors/nyaa.py @@ -73,7 +73,7 @@ class Nyaa(ConnectorCore): }) self.on_error = False - self.is_more = valid_trs and valid_trs is not len(trs) - 1 + self.is_more = valid_trs and valid_trs != len(trs) - 1 @ConnectorCache.cache_data def is_vf(self, url): diff --git a/pynyaata/connectors/pantsu.py b/pynyaata/connectors/pantsu.py index 076867b..0a15c5e 100644 --- a/pynyaata/connectors/pantsu.py +++ b/pynyaata/connectors/pantsu.py @@ -66,7 +66,7 @@ class Pantsu(ConnectorCore): }) self.on_error = False - self.is_more = valid_trs and valid_trs is not len(trs) - 1 + self.is_more = valid_trs and valid_trs != len(trs) - 1 @ConnectorCache.cache_data def is_vf(self, url): diff --git a/pynyaata/connectors/yggtorrent.py b/pynyaata/connectors/yggtorrent.py index 10fdf44..937251c 100644 --- a/pynyaata/connectors/yggtorrent.py +++ b/pynyaata/connectors/yggtorrent.py @@ -75,7 +75,7 @@ class YggTorrent(ConnectorCore): }) self.on_error = False - self.is_more = valid_trs and valid_trs is not len(trs) - 1 + self.is_more = valid_trs and valid_trs != len(trs) - 1 @ConnectorCache.cache_data def is_vf(self, url): diff --git a/pynyaata/templates/admin/folder/edit.html b/pynyaata/templates/admin/folder/edit.html index af8edb0..a0cf069 100644 --- a/pynyaata/templates/admin/folder/edit.html +++ b/pynyaata/templates/admin/folder/edit.html @@ -6,13 +6,13 @@
-
+
{{ action_form.name(class='input', placeholder='Name') }}
-
+
{{ action_form.path(class='input', placeholder='Path') }}