Fiabilize transmission import
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2858283ffd
commit
1bb019cc13
@ -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'))
|
||||
|
||||
|
@ -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):
|
||||
|
@ -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):
|
||||
|
@ -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):
|
||||
|
@ -6,13 +6,13 @@
|
||||
|
||||
<div class="field is-horizontal">
|
||||
<div class="field-body">
|
||||
<div class="field column">
|
||||
<div class="field column is-5">
|
||||
<div class="control is-expanded">
|
||||
{{ action_form.name(class='input', placeholder='Name') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="field column">
|
||||
<div class="field column is-5">
|
||||
<div class="control is-expanded">
|
||||
{{ action_form.path(class='input', placeholder='Path') }}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user