Fix SabNZBd folder bug
If only one file is extracted the storage key contains the extracted file instead of the folder. This leads to CPS skipping the renamer. This check fixes that.
This commit is contained in:
1 parent
583bb1d0d9
commit
37e5f2c48b
1 file changed
+2
-1
@@ -6,6 +6,7 @@ from couchpotato.environment import Env
|
|||||||
from datetime import timedelta
|
from datetime import timedelta
|
||||||
from urllib2 import URLError
|
from urllib2 import URLError
|
||||||
import json
|
import json
|
||||||
|
import os
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
log = CPLog(__name__)
|
log = CPLog(__name__)
|
||||||
@@ -117,7 +118,7 @@ class Sabnzbd(Downloader):
|
|||||||
'status': status,
|
'status': status,
|
||||||
'original_status': nzb['status'],
|
'original_status': nzb['status'],
|
||||||
'timeleft': str(timedelta(seconds = 0)),
|
'timeleft': str(timedelta(seconds = 0)),
|
||||||
'folder': ss(nzb['storage']),
|
'folder': os.path.dirname(ss(nzb['storage'])) if os.path.isfile(ss(nzb['storage'])) else ss(nzb['storage']),
|
||||||
})
|
})
|
||||||
|
|
||||||
return release_downloads
|
return release_downloads
|
||||||
|
|||||||
Reference in new issue
Block a user