Don't use directory when it's empty. fix #1448
This commit is contained in:
@@ -41,7 +41,7 @@ config = [{
|
|||||||
{
|
{
|
||||||
'name': 'directory',
|
'name': 'directory',
|
||||||
'type': 'directory',
|
'type': 'directory',
|
||||||
'description': 'Where should Transmission saved the downloaded files?',
|
'description': 'Download to this directory. Keep empty for default Transmission download directory.',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'name': 'ratio',
|
'name': 'ratio',
|
||||||
|
|||||||
@@ -27,17 +27,19 @@ class Transmission(Downloader):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
# Set parameters for Transmission
|
# Set parameters for Transmission
|
||||||
folder_name = self.createFileName(data, filedata, movie)[:-len(data.get('type')) - 1]
|
|
||||||
folder_path = os.path.join(self.conf('directory', default = ''), folder_name).rstrip(os.path.sep)
|
|
||||||
|
|
||||||
# Create the empty folder to download too
|
|
||||||
self.makeDir(folder_path)
|
|
||||||
|
|
||||||
params = {
|
params = {
|
||||||
'paused': self.conf('paused', default = 0),
|
'paused': self.conf('paused', default = 0),
|
||||||
'download-dir': folder_path
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(self.conf('directory', default = '')) > 0:
|
||||||
|
folder_name = self.createFileName(data, filedata, movie)[:-len(data.get('type')) - 1]
|
||||||
|
folder_path = os.path.join(self.conf('directory', default = ''), folder_name).rstrip(os.path.sep)
|
||||||
|
|
||||||
|
# Create the empty folder to download too
|
||||||
|
self.makeDir(folder_path)
|
||||||
|
|
||||||
|
params['download-dir'] = folder_path
|
||||||
|
|
||||||
torrent_params = {}
|
torrent_params = {}
|
||||||
if self.conf('ratio'):
|
if self.conf('ratio'):
|
||||||
torrent_params = {
|
torrent_params = {
|
||||||
|
|||||||
Reference in New Issue
Block a user